Which Java archives have you referenced on your classpath? To work with the
xml based file format (XSSF) you will need to locate those files with names
similar to those on this list;

poi-3.6-beta1-20091007.jar
poi-oxml-3.6-beta1-20091007.jar
openxml4j-1.0-beta.jar
xmlbeans-2.3.0.jar
ooxml-schemas-1.0.jar
dom4j-1.6.1.jar 

and reference them all on your classpath for the project to both compile and
then run successfully. Sorry to say that I do not use Eclipse and so have no
real idea about how to add the archives to the projects classpath but it
should be easy enough to discover this information if you are similarly
unsure.

Further, there is an additional concern with the ooxml-schemas archive which
you can read about here;

http://old.nabble.com/Class-Not-found-in-version-3.6-20091214-to28069085.html

and David outlines where to obtain the 'full' version from in another post
here;

http://old.nabble.com/Class-Not-found-in-version-3.6-20091214-to28069085.html

Hope this helps.

Yours

Mark B



Bugzilla from [email protected] wrote:
> 
> https://issues.apache.org/bugzilla/show_bug.cgi?id=49042
> 
>            Summary: an error preventing from constructing an XSSFworkbook
>                     in the eclipse environment
>            Product: POI
>            Version: 3.6
>           Platform: PC
>         OS/Version: Windows XP
>             Status: NEW
>           Severity: critical
>           Priority: P2
>          Component: XSSF
>         AssignedTo: [email protected]
>         ReportedBy: [email protected]
> 
> 
> the problem is as such.
> 
> 
> i've imported  the right packages sufficient to construct an XSSFworkbook
> object.
> 
> i added the right jars in eclipse so it will be able to load these
> imports:
> import org.apache.poi.ss.usermodel.*;
> import org.apache.poi.xssf.usermodel.*;
> 
> 
> but then when i do the following:
>         Workbook wb = new XSSFWorkbook();
>         FileOutputStream fileOut = new
> FileOutputStream("workbook123.xlsx");
>         wb.write(fileOut);
>         fileOut.close();
> 
> it is able to run smooth from the eclips point of view
> however in the runtime i get this error:
> 
>     at POIWrite.main(POIWrite.java:13)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.xmlbeans.XmlException
>     at java.net.URLClassLoader$1.run(Unknown Source)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at java.net.URLClassLoader.findClass(Unknown Source)
>     at java.lang.ClassLoader.loadClass(Unknown Source)
>     at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>     at java.lang.ClassLoader.loadClass(Unknown Source)
>     ... 1 more
> 
> i thought it was a problem of package loading
> but i saw two other dudes who ran into this exact error, all of them in
> eclipse.
> 
> http://www.mail-archive.com/[email protected]/msg01944.html
> http://forums.sun.com/thread.jspa?threadID=5389309
> 
> btw with HSSFworkbook things run smooth as smooth can get.
> 
> anyway, i hope this but will be fixed next version cause eclipse is my
> favorite
> environment for java.
> 
> -- 
> Configure bugmail:
> https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are the assignee for the bug.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/DO-NOT-REPLY--Bug-49042--New%3A-an-error-preventing-from-constructing-an-XSSFworkbook-in-the-eclipse-environment-tp28130217p28131486.html
Sent from the POI - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to