You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Dale Monti <dm...@linoma.com> on 2009/05/06 23:55:37 UTC

Error creating XSSFWorkbook

Hi,
I am getting an exception when creating an XSSFWorkbook object using the 
constructor - new XSSFWorkbook();

It must have something to do with the way I am running it. Either 
because I am using a Thread. Or maybe my classpath. I am using eclipse, 
and have the below jar files in  'Bootstrap Entries' section

poi-3.5-beta5-20090219.jar
poi-ooxml-3.5-beta5-20090219.jar
xmlbeans-2.3.0.jar
ooxml-schemas-1.0.jar
dom4j-1.6.1.jar
log4j-1.2.13.jar
jsr173_1.0_api.jar


Exception in thread "Thread-7" java.lang.ExceptionInInitializerError
    at 
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorkbook$Factory.newInstance(Unknown 
Source)
    at 
org.apache.poi.xssf.usermodel.XSSFWorkbook.onWorkbookCreate(XSSFWorkbook.java:227)
    at 
org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:146)
    at com.myclass.........
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at 
org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:769)
    at 
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorkbook.<clinit>(Unknown 
Source)
    ... 8 more

Thanks







---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Error creating XSSFWorkbook

Posted by Dale Monti <dm...@linoma.com>.
The problem seems to be that you cannot specify the ooxml related jar 
files on bootclasspath

Dale Monti wrote:
> Hi,
> I am getting an exception when creating an XSSFWorkbook object using 
> the constructor - new XSSFWorkbook();
>
> It must have something to do with the way I am running it. Either 
> because I am using a Thread. Or maybe my classpath. I am using 
> eclipse, and have the below jar files in  'Bootstrap Entries' section
>
> poi-3.5-beta5-20090219.jar
> poi-ooxml-3.5-beta5-20090219.jar
> xmlbeans-2.3.0.jar
> ooxml-schemas-1.0.jar
> dom4j-1.6.1.jar
> log4j-1.2.13.jar
> jsr173_1.0_api.jar
>
>
> Exception in thread "Thread-7" java.lang.ExceptionInInitializerError
>    at 
> org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorkbook$Factory.newInstance(Unknown 
> Source)
>    at 
> org.apache.poi.xssf.usermodel.XSSFWorkbook.onWorkbookCreate(XSSFWorkbook.java:227) 
>
>    at 
> org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:146)
>    at com.myclass.........
>    at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.NullPointerException
>    at 
> org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:769)
>    at 
> org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorkbook.<clinit>(Unknown 
> Source)
>    ... 8 more
>
> Thanks
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus 
> signature database 4058 (20090507) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Error creating XSSFWorkbook

Posted by tahasharif2000 <ta...@tcs.com>.
Hi,

I added all the jars required, including the jar u specified, but still am
getting the same error, when creating the object,

	Workbook wb = new XSSFWorkbook();

the exception is shown below,

Exception in thread "main" java.lang.ExceptionInInitializerError
	at
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorkbook$Factory.newInstance(Unknown
Source)
	at
org.apache.poi.xssf.usermodel.XSSFWorkbook.onWorkbookCreate(XSSFWorkbook.java:256)
	at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:169)
	at Test.main(Test.java:14)
Caused by: java.lang.NullPointerException
	at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:769)
	at
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorkbook.<clinit>(Unknown
Source)
	... 4 more

Can anyone help me pls......My purpose isto create a sheet having rows more
than 65536.

Thanks in advance,
Taha Sharif
-- 
View this message in context: http://apache-poi.1045710.n5.nabble.com/Error-creating-XSSFWorkbook-tp2306423p3347446.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org