You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by gudfooht <gu...@yahoo.com> on 2010/05/20 20:01:05 UTC

POI 3.6: class not found: org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPhoneticRun

Hi all,

I've been trying to resolve an issue for a couple of hours now, but I'm not making too much progress and I'd really appreciate any insight.

I'm getting the following exception when trying to open an .xlsx spreadsheet that I'm uploading via Struts1 (full stack trace at the bottom).

java.lang.NoClassDefFoundError: org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPhoneticRun

Here's the code I'm using:

WorkbookFactory.create(in);  // where 'in' is an InputStream of the file.

This appears to be working fine for plain ol' .xls.

I've placed every jar I could find inside the poi-bin-3.6-20091214 distribution into WEB-INF/lib.  Here is the listing of jars (with POI-related jars called out with *):

activation.jar
commons-beanutils.jar
commons-cli-1.0.jar
commons-collections-3.2.jar
commons-digester.jar
commons-fileupload-1.2.1.jar
commons-io-1.4.jar
commons-lang-2.4.jar
commons-logging-log4j.jar
commons-validator.jar
*dom4j-1.6.1.jar
*geronimo-stax-api_1.0_spec-1.0.jar
ibatis-common-2.jar
ibatis-sqlmap-2.jar
jakarta-oro-2.0.6.jar
Jimi.jar
joda-time-1.6.jar
json_simple.jar
jt400.jar
junit.jar
log4j-1.2.9.jar
lucene-1.4.3.jar
mail.jar
*poi-3.6-20091214.jar
*poi-contrib-3.6-20091214.jar
*poi-examples-3.6-20091214.jar
*poi-ooxml-3.6-20091214.jar
*poi-ooxml-schemas-3.6-20091214.jar
*poi-scratchpad-3.6-20091214.jar
struts.jar
velocity-1.5.jar
velocity-tools-generic-1.2.jar
*xmlbeans-2.3.0.jar

I've cracked open poi-ooxml-schemas-3.6-20091214.jar and, sure enough, CTPhoneticRun isn't in there. So now I'm thinking maybe Websphere 6.1 for Windows has another version of POI that's messing things up, but I couldn't find anything.

Any ideas?

Thanks!

Ted



org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException
	at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:61)
	at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:256)
	at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:196)
	at org.apache.poi.xssf.usermodel.XSSFWorkbook.(XSSFWorkbook.java:172)
	at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:63)
	at golf.poi.ExcelWorkbook.load(ExcelWorkbook.java:50)
	at golf.poi.ExcelWorkbook.(ExcelWorkbook.java:40)
	at golf.actions.pdt.ProjectUploadNonGolfProcess.execute(ProjectUploadNonGolfProcess.java:29)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:995)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
	at golf.filter.UserSessionFilter.doFilter(UserSessionFilter.java:100)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761)
	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
	at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
	at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3168)
	at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:254)
	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
	at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:96)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
	at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
	at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
	at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
	at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
	at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:521)
	at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:59)
	... 40 more
Caused by: java.lang.NoClassDefFoundError: org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPhoneticRun
	at java.lang.J9VMInternals.verifyImpl(Native Method)
	at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
	at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:521)
	at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createUnattachedNode(SchemaTypeImpl.java:1859)
	at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createElementType(SchemaTypeImpl.java:1021)
	at org.apache.xmlbeans.impl.values.XmlObjectBase.create_element_user(XmlObjectBase.java:893)
	at org.apache.xmlbeans.impl.store.Xobj.getUser(Xobj.java:1657)
	at org.apache.xmlbeans.impl.store.Xobj.find_all_element_users(Xobj.java:2080)
	at org.openxmlformats.schemas.spreadsheetml.x2006.main.impl.CTSstImpl.getSiArray(Unknown Source)
	at org.apache.poi.xssf.model.SharedStringsTable.readFrom(SharedStringsTable.java:113)
	at org.apache.poi.xssf.model.SharedStringsTable.(SharedStringsTable.java:97)
	... 45 more





      

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


Re: POI 3.6: class not found: org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPhoneticRun

Posted by gudfooht <gu...@yahoo.com>.
Thanks for the comprehensive answer, Dave!

In regards to your suggested options below:

(1) Wow, that's a hefty jar file, but it did the trick. Thanks!
(2) I'll get started on the bug submission.
(3) My present schedule won't allow me to jump in this deep at the moment, but I'll consider it. If I do, I'll be sure to take you up on the offer to help me out on the dev list.

Thanks again!

Ted

--- On Thu, 5/20/10, David Fisher <df...@jmlafferty.com> wrote:

> From: David Fisher <df...@jmlafferty.com>
> Subject: Re: POI 3.6: class not found: org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPhoneticRun
> To: "POI Users List" <us...@poi.apache.org>
> Date: Thursday, May 20, 2010, 2:27 PM
> The poi-ooxml-schemas jar is a
> cut-down version of ooxml-schemas-1.0.jar - the full schemas
> are about 13 MB.
> 
> So, you will need to do one or more of three actions.
> 
> (1) Replace poi-ooxml-schemas in your classpath with
> ooxml-schemas-1.0.jar. 
> 
> You can get this from the maven repository:
> 
>   groupId: org.apache.poi
>   artifactId: ooxml-schemas
> 
> Or, you can download the poi source (http://poi.apache.org/howtobuild.html) and do "ant
> fetch-ooxml-jars"
> 
> (2) You should report that this class is missing in
> Bugzilla and attach the simplest example that shows the
> missing class.
> 
> (3) You could provide a patch which assures that your
> missing class is added to poi-ooxml-schemas. To do so you
> should download the source, and provide a patch that adds a
> Junit test that uses your simple test document. The unit
> test will cause the poi-ooxml-schemas build to include
> needed classes from the full ooxml-schemas.jar.
> 
> If you take path (3), please join the dev list and we will
> help you.
> 
> Regards,
> Dave
> 
> 
> On May 20, 2010, at 11:07 AM, gudfooht wrote:
> 
> > Oh yeah, I forgot to mention that I tried setting
> Websphere's classloader policy to "parent last" and I still
> got the exception.
> > 
> > Thanks,
> > 
> > Ted
> > 
> > --- On Thu, 5/20/10, gudfooht <gu...@yahoo.com>
> wrote:
> > 
> >> From: gudfooht <gu...@yahoo.com>
> >> Subject: POI 3.6: class not found:
> org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPhoneticRun
> >> To: user@poi.apache.org
> >> Date: Thursday, May 20, 2010, 2:01 PM
> >> Hi all,
> >> 
> >> I've been trying to resolve an issue for a couple
> of hours
> >> now, but I'm not making too much progress and I'd
> really
> >> appreciate any insight.
> >> 
> >> I'm getting the following exception when trying to
> open an
> >> .xlsx spreadsheet that I'm uploading via Struts1
> (full stack
> >> trace at the bottom).
> >> 
> >> java.lang.NoClassDefFoundError:
> >>
> org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPhoneticRun
> >> 
> >> Here's the code I'm using:
> >> 
> >> WorkbookFactory.create(in);  // where 'in' is
> an
> >> InputStream of the file.
> >> 
> >> This appears to be working fine for plain ol'
> .xls.
> >> 
> >> I've placed every jar I could find inside the
> >> poi-bin-3.6-20091214 distribution into
> WEB-INF/lib. 
> >> Here is the listing of jars (with POI-related jars
> called
> >> out with *):
> >> 
> >> activation.jar
> >> commons-beanutils.jar
> >> commons-cli-1.0.jar
> >> commons-collections-3.2.jar
> >> commons-digester.jar
> >> commons-fileupload-1.2.1.jar
> >> commons-io-1.4.jar
> >> commons-lang-2.4.jar
> >> commons-logging-log4j.jar
> >> commons-validator.jar
> >> *dom4j-1.6.1.jar
> >> *geronimo-stax-api_1.0_spec-1.0.jar
> >> ibatis-common-2.jar
> >> ibatis-sqlmap-2.jar
> >> jakarta-oro-2.0.6.jar
> >> Jimi.jar
> >> joda-time-1.6.jar
> >> json_simple.jar
> >> jt400.jar
> >> junit.jar
> >> log4j-1.2.9.jar
> >> lucene-1.4.3.jar
> >> mail.jar
> >> *poi-3.6-20091214.jar
> >> *poi-contrib-3.6-20091214.jar
> >> *poi-examples-3.6-20091214.jar
> >> *poi-ooxml-3.6-20091214.jar
> >> *poi-ooxml-schemas-3.6-20091214.jar
> >> *poi-scratchpad-3.6-20091214.jar
> >> struts.jar
> >> velocity-1.5.jar
> >> velocity-tools-generic-1.2.jar
> >> *xmlbeans-2.3.0.jar
> >> 
> >> I've cracked open
> poi-ooxml-schemas-3.6-20091214.jar and,
> >> sure enough, CTPhoneticRun isn't in there. So now
> I'm
> >> thinking maybe Websphere 6.1 for Windows has
> another version
> >> of POI that's messing things up, but I couldn't
> find
> >> anything.
> >> 
> >> Any ideas?
> >> 
> >> Thanks!
> >> 
> >> Ted
> >> 
> >> 
> >> 
> >> org.apache.poi.POIXMLException:
> >> java.lang.reflect.InvocationTargetException
> >>     at
> >>
> org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:61)
> >>     at
> >>
> org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:256)
> >>     at
> >>
> org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:196)
> >>     at
> >>
> org.apache.poi.xssf.usermodel.XSSFWorkbook.(XSSFWorkbook.java:172)
> >>     at
> >>
> org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:63)
> >>     at
> >>
> golf.poi.ExcelWorkbook.load(ExcelWorkbook.java:50)
> >>     at
> >> golf.poi.ExcelWorkbook.(ExcelWorkbook.java:40)
> >>     at
> >>
> golf.actions.pdt.ProjectUploadNonGolfProcess.execute(ProjectUploadNonGolfProcess.java:29)
> >>     at
> >>
> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
> >>     at
> >>
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
> >>     at
> >>
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
> >>     at
> >>
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
> >>     at
> >>
> javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> >>     at
> >>
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> >>     at
> >>
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:995)
> >>     at
> >>
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)
> >>     at
> >>
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
> >>     at
> >>
> golf.filter.UserSessionFilter.doFilter(UserSessionFilter.java:100)
> >>     at
> >>
> com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
> >>     at
> >>
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
> >>     at
> >>
> com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
> >>     at
> >>
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761)
> >>     at
> >>
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673)
> >>     at
> >>
> com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
> >>     at
> >>
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
> >>     at
> >>
> com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3168)
> >>     at
> >>
> com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:254)
> >>     at
> >>
> com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
> >>     at
> >>
> com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
> >>     at
> >>
> com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:96)
> >>     at
> >>
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
> >>     at
> >>
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
> >>     at
> >>
> com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
> >>     at
> >>
> com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
> >>     at
> >>
> com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
> >>     at
> >>
> com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
> >>     at
> >>
> com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
> >>     at
> >>
> com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
> >>     at
> >>
> com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
> >>     at
> >>
> com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
> >>     at
> >>
> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
> >> Caused by:
> java.lang.reflect.InvocationTargetException
> >>     at
> >>
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> >> Method)
> >>     at
> >>
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
> >>     at
> >>
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> >>     at
> >>
> java.lang.reflect.Constructor.newInstance(Constructor.java:521)
> >>     at
> >>
> org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:59)
> >>     ... 40 more
> >> Caused by: java.lang.NoClassDefFoundError:
> >>
> org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPhoneticRun
> >>     at
> >> java.lang.J9VMInternals.verifyImpl(Native Method)
> >>     at
> >>
> java.lang.J9VMInternals.verify(J9VMInternals.java:59)
> >>     at
> >>
> java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
> >>     at
> >>
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> >> Method)
> >>     at
> >>
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
> >>     at
> >>
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> >>     at
> >>
> java.lang.reflect.Constructor.newInstance(Constructor.java:521)
> >>     at
> >>
> org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createUnattachedNode(SchemaTypeImpl.java:1859)
> >>     at
> >>
> org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createElementType(SchemaTypeImpl.java:1021)
> >>     at
> >>
> org.apache.xmlbeans.impl.values.XmlObjectBase.create_element_user(XmlObjectBase.java:893)
> >>     at
> >>
> org.apache.xmlbeans.impl.store.Xobj.getUser(Xobj.java:1657)
> >>     at
> >>
> org.apache.xmlbeans.impl.store.Xobj.find_all_element_users(Xobj.java:2080)
> >>     at
> >>
> org.openxmlformats.schemas.spreadsheetml.x2006.main.impl.CTSstImpl.getSiArray(Unknown
> >> Source)
> >>     at
> >>
> org.apache.poi.xssf.model.SharedStringsTable.readFrom(SharedStringsTable.java:113)
> >>     at
> >>
> org.apache.poi.xssf.model.SharedStringsTable.(SharedStringsTable.java:97)
> >>     ... 45 more
> > 
> > 
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> > For additional commands, e-mail: user-help@poi.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
> 
> 


      

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


Re: POI 3.6: class not found: org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPhoneticRun

Posted by David Fisher <df...@jmlafferty.com>.
The poi-ooxml-schemas jar is a cut-down version of ooxml-schemas-1.0.jar - the full schemas are about 13 MB.

So, you will need to do one or more of three actions.

(1) Replace poi-ooxml-schemas in your classpath with ooxml-schemas-1.0.jar. 

You can get this from the maven repository:

  groupId: org.apache.poi
  artifactId: ooxml-schemas

Or, you can download the poi source (http://poi.apache.org/howtobuild.html) and do "ant fetch-ooxml-jars"

(2) You should report that this class is missing in Bugzilla and attach the simplest example that shows the missing class.

(3) You could provide a patch which assures that your missing class is added to poi-ooxml-schemas. To do so you should download the source, and provide a patch that adds a Junit test that uses your simple test document. The unit test will cause the poi-ooxml-schemas build to include needed classes from the full ooxml-schemas.jar.

If you take path (3), please join the dev list and we will help you.

Regards,
Dave


On May 20, 2010, at 11:07 AM, gudfooht wrote:

> Oh yeah, I forgot to mention that I tried setting Websphere's classloader policy to "parent last" and I still got the exception.
> 
> Thanks,
> 
> Ted
> 
> --- On Thu, 5/20/10, gudfooht <gu...@yahoo.com> wrote:
> 
>> From: gudfooht <gu...@yahoo.com>
>> Subject: POI 3.6: class not found: org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPhoneticRun
>> To: user@poi.apache.org
>> Date: Thursday, May 20, 2010, 2:01 PM
>> Hi all,
>> 
>> I've been trying to resolve an issue for a couple of hours
>> now, but I'm not making too much progress and I'd really
>> appreciate any insight.
>> 
>> I'm getting the following exception when trying to open an
>> .xlsx spreadsheet that I'm uploading via Struts1 (full stack
>> trace at the bottom).
>> 
>> java.lang.NoClassDefFoundError:
>> org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPhoneticRun
>> 
>> Here's the code I'm using:
>> 
>> WorkbookFactory.create(in);  // where 'in' is an
>> InputStream of the file.
>> 
>> This appears to be working fine for plain ol' .xls.
>> 
>> I've placed every jar I could find inside the
>> poi-bin-3.6-20091214 distribution into WEB-INF/lib. 
>> Here is the listing of jars (with POI-related jars called
>> out with *):
>> 
>> activation.jar
>> commons-beanutils.jar
>> commons-cli-1.0.jar
>> commons-collections-3.2.jar
>> commons-digester.jar
>> commons-fileupload-1.2.1.jar
>> commons-io-1.4.jar
>> commons-lang-2.4.jar
>> commons-logging-log4j.jar
>> commons-validator.jar
>> *dom4j-1.6.1.jar
>> *geronimo-stax-api_1.0_spec-1.0.jar
>> ibatis-common-2.jar
>> ibatis-sqlmap-2.jar
>> jakarta-oro-2.0.6.jar
>> Jimi.jar
>> joda-time-1.6.jar
>> json_simple.jar
>> jt400.jar
>> junit.jar
>> log4j-1.2.9.jar
>> lucene-1.4.3.jar
>> mail.jar
>> *poi-3.6-20091214.jar
>> *poi-contrib-3.6-20091214.jar
>> *poi-examples-3.6-20091214.jar
>> *poi-ooxml-3.6-20091214.jar
>> *poi-ooxml-schemas-3.6-20091214.jar
>> *poi-scratchpad-3.6-20091214.jar
>> struts.jar
>> velocity-1.5.jar
>> velocity-tools-generic-1.2.jar
>> *xmlbeans-2.3.0.jar
>> 
>> I've cracked open poi-ooxml-schemas-3.6-20091214.jar and,
>> sure enough, CTPhoneticRun isn't in there. So now I'm
>> thinking maybe Websphere 6.1 for Windows has another version
>> of POI that's messing things up, but I couldn't find
>> anything.
>> 
>> Any ideas?
>> 
>> Thanks!
>> 
>> Ted
>> 
>> 
>> 
>> org.apache.poi.POIXMLException:
>> java.lang.reflect.InvocationTargetException
>>     at
>> org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:61)
>>     at
>> org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:256)
>>     at
>> org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:196)
>>     at
>> org.apache.poi.xssf.usermodel.XSSFWorkbook.(XSSFWorkbook.java:172)
>>     at
>> org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:63)
>>     at
>> golf.poi.ExcelWorkbook.load(ExcelWorkbook.java:50)
>>     at
>> golf.poi.ExcelWorkbook.(ExcelWorkbook.java:40)
>>     at
>> golf.actions.pdt.ProjectUploadNonGolfProcess.execute(ProjectUploadNonGolfProcess.java:29)
>>     at
>> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
>>     at
>> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
>>     at
>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
>>     at
>> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
>>     at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>>     at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>>     at
>> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:995)
>>     at
>> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)
>>     at
>> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
>>     at
>> golf.filter.UserSessionFilter.doFilter(UserSessionFilter.java:100)
>>     at
>> com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
>>     at
>> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
>>     at
>> com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
>>     at
>> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761)
>>     at
>> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673)
>>     at
>> com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
>>     at
>> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
>>     at
>> com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3168)
>>     at
>> com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:254)
>>     at
>> com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
>>     at
>> com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
>>     at
>> com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:96)
>>     at
>> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
>>     at
>> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
>>     at
>> com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
>>     at
>> com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
>>     at
>> com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
>>     at
>> com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
>>     at
>> com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
>>     at
>> com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
>>     at
>> com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
>>     at
>> com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
>>     at
>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
>> Caused by: java.lang.reflect.InvocationTargetException
>>     at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>> Method)
>>     at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
>>     at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>>     at
>> java.lang.reflect.Constructor.newInstance(Constructor.java:521)
>>     at
>> org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:59)
>>     ... 40 more
>> Caused by: java.lang.NoClassDefFoundError:
>> org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPhoneticRun
>>     at
>> java.lang.J9VMInternals.verifyImpl(Native Method)
>>     at
>> java.lang.J9VMInternals.verify(J9VMInternals.java:59)
>>     at
>> java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
>>     at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>> Method)
>>     at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
>>     at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>>     at
>> java.lang.reflect.Constructor.newInstance(Constructor.java:521)
>>     at
>> org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createUnattachedNode(SchemaTypeImpl.java:1859)
>>     at
>> org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createElementType(SchemaTypeImpl.java:1021)
>>     at
>> org.apache.xmlbeans.impl.values.XmlObjectBase.create_element_user(XmlObjectBase.java:893)
>>     at
>> org.apache.xmlbeans.impl.store.Xobj.getUser(Xobj.java:1657)
>>     at
>> org.apache.xmlbeans.impl.store.Xobj.find_all_element_users(Xobj.java:2080)
>>     at
>> org.openxmlformats.schemas.spreadsheetml.x2006.main.impl.CTSstImpl.getSiArray(Unknown
>> Source)
>>     at
>> org.apache.poi.xssf.model.SharedStringsTable.readFrom(SharedStringsTable.java:113)
>>     at
>> org.apache.poi.xssf.model.SharedStringsTable.(SharedStringsTable.java:97)
>>     ... 45 more
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
> 


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


Re: POI 3.6: class not found: org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPhoneticRun

Posted by gudfooht <gu...@yahoo.com>.
Oh yeah, I forgot to mention that I tried setting Websphere's classloader policy to "parent last" and I still got the exception.

Thanks,

Ted

--- On Thu, 5/20/10, gudfooht <gu...@yahoo.com> wrote:

> From: gudfooht <gu...@yahoo.com>
> Subject: POI 3.6: class not found: org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPhoneticRun
> To: user@poi.apache.org
> Date: Thursday, May 20, 2010, 2:01 PM
> Hi all,
> 
> I've been trying to resolve an issue for a couple of hours
> now, but I'm not making too much progress and I'd really
> appreciate any insight.
> 
> I'm getting the following exception when trying to open an
> .xlsx spreadsheet that I'm uploading via Struts1 (full stack
> trace at the bottom).
> 
> java.lang.NoClassDefFoundError:
> org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPhoneticRun
> 
> Here's the code I'm using:
> 
> WorkbookFactory.create(in);  // where 'in' is an
> InputStream of the file.
> 
> This appears to be working fine for plain ol' .xls.
> 
> I've placed every jar I could find inside the
> poi-bin-3.6-20091214 distribution into WEB-INF/lib. 
> Here is the listing of jars (with POI-related jars called
> out with *):
> 
> activation.jar
> commons-beanutils.jar
> commons-cli-1.0.jar
> commons-collections-3.2.jar
> commons-digester.jar
> commons-fileupload-1.2.1.jar
> commons-io-1.4.jar
> commons-lang-2.4.jar
> commons-logging-log4j.jar
> commons-validator.jar
> *dom4j-1.6.1.jar
> *geronimo-stax-api_1.0_spec-1.0.jar
> ibatis-common-2.jar
> ibatis-sqlmap-2.jar
> jakarta-oro-2.0.6.jar
> Jimi.jar
> joda-time-1.6.jar
> json_simple.jar
> jt400.jar
> junit.jar
> log4j-1.2.9.jar
> lucene-1.4.3.jar
> mail.jar
> *poi-3.6-20091214.jar
> *poi-contrib-3.6-20091214.jar
> *poi-examples-3.6-20091214.jar
> *poi-ooxml-3.6-20091214.jar
> *poi-ooxml-schemas-3.6-20091214.jar
> *poi-scratchpad-3.6-20091214.jar
> struts.jar
> velocity-1.5.jar
> velocity-tools-generic-1.2.jar
> *xmlbeans-2.3.0.jar
> 
> I've cracked open poi-ooxml-schemas-3.6-20091214.jar and,
> sure enough, CTPhoneticRun isn't in there. So now I'm
> thinking maybe Websphere 6.1 for Windows has another version
> of POI that's messing things up, but I couldn't find
> anything.
> 
> Any ideas?
> 
> Thanks!
> 
> Ted
> 
> 
> 
> org.apache.poi.POIXMLException:
> java.lang.reflect.InvocationTargetException
>     at
> org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:61)
>     at
> org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:256)
>     at
> org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:196)
>     at
> org.apache.poi.xssf.usermodel.XSSFWorkbook.(XSSFWorkbook.java:172)
>     at
> org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:63)
>     at
> golf.poi.ExcelWorkbook.load(ExcelWorkbook.java:50)
>     at
> golf.poi.ExcelWorkbook.(ExcelWorkbook.java:40)
>     at
> golf.actions.pdt.ProjectUploadNonGolfProcess.execute(ProjectUploadNonGolfProcess.java:29)
>     at
> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
>     at
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
>     at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
>     at
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
>     at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>     at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>     at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:995)
>     at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)
>     at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
>     at
> golf.filter.UserSessionFilter.doFilter(UserSessionFilter.java:100)
>     at
> com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
>     at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
>     at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
>     at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761)
>     at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673)
>     at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
>     at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
>     at
> com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3168)
>     at
> com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:254)
>     at
> com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
>     at
> com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
>     at
> com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:96)
>     at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
>     at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
>     at
> com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
>     at
> com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
>     at
> com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
>     at
> com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
>     at
> com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
>     at
> com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
>     at
> com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
>     at
> com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
>     at
> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
> Caused by: java.lang.reflect.InvocationTargetException
>     at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>     at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
>     at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>     at
> java.lang.reflect.Constructor.newInstance(Constructor.java:521)
>     at
> org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:59)
>     ... 40 more
> Caused by: java.lang.NoClassDefFoundError:
> org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPhoneticRun
>     at
> java.lang.J9VMInternals.verifyImpl(Native Method)
>     at
> java.lang.J9VMInternals.verify(J9VMInternals.java:59)
>     at
> java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
>     at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>     at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
>     at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>     at
> java.lang.reflect.Constructor.newInstance(Constructor.java:521)
>     at
> org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createUnattachedNode(SchemaTypeImpl.java:1859)
>     at
> org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createElementType(SchemaTypeImpl.java:1021)
>     at
> org.apache.xmlbeans.impl.values.XmlObjectBase.create_element_user(XmlObjectBase.java:893)
>     at
> org.apache.xmlbeans.impl.store.Xobj.getUser(Xobj.java:1657)
>     at
> org.apache.xmlbeans.impl.store.Xobj.find_all_element_users(Xobj.java:2080)
>     at
> org.openxmlformats.schemas.spreadsheetml.x2006.main.impl.CTSstImpl.getSiArray(Unknown
> Source)
>     at
> org.apache.poi.xssf.model.SharedStringsTable.readFrom(SharedStringsTable.java:113)
>     at
> org.apache.poi.xssf.model.SharedStringsTable.(SharedStringsTable.java:97)
>     ... 45 more


      

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