|
From: <php...@li...> - 2008-12-12 00:06:49
|
Hello, I've got this error I'd like some help with. I'm using Apache POI 3.5 to read XLS and XLSX files, but trying to do: $workbook = new org_apache_poi_xssf_usermodel_XSSFWorkbook(); fails with: java.lang.Exception: CreateInstance failed: new org.apache.poi.xssf.usermodel.XSSFWorkbook. Cause: java.lang.ClassNotFoundException: Unresolved external reference: java.lang.NoClassDefFoundError: Could not initialize class org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorkbook. -- Unable to call constructor, see the README section "Java platform issues" for details. However, in the same page, when I call: $wb = new org_openxmlformats_schemas_spreadsheetml_x2006_main_CTWorkbook(); the code doesn't complain. Also, a pure Java application that instantiates XSSFWorkbook and manipulates it works fine. So my question is: how to debug such problems? Where to start? I downloaded DependencyFinder (http://depfind.sourceforge.net/) to see if the referenced jars use other packages that are not present, but I didn't find any. TIA, Karim |