cfspreadsheet: Could not initialize class org.apache.poi.xssf.usermodel.XSSFWorkbook

637 views
Skip to first unread message

Michael Vornkahl

unread,
Jan 2, 2017, 6:12:26 AM1/2/17
to Lucee
Hi,
I'm using lucee Lucee 5.1.0.3
If I call cfspreadsheet I get the following error:

Could not initialize class org.apache.poi.xssf.usermodel.XSSFWorkbook
The error occurred on line 2189 in file /org/cfpoi/spreadsheet/Spreadsheet.cfc. 

Could someone give me a tipp what I can do?

Happy New Year to every one!!!

Michael

Michael Vornkahl

unread,
Jan 2, 2017, 7:29:29 AM1/2/17
to Lucee
Under Lucee 5.1.1.51 I could get the debug log:

Lucee 5.1.1.51-SNAPSHOT Error (java.lang.NoClassDefFoundError)
Message org/apache/xmlbeans/XmlException
Cause java.lang.NoClassDefFoundError
Stacktrace The Error Occurred in
/org/cfpoi/spreadsheet/Spreadsheet.cfc: line 2189
called from /org/cfpoi/spreadsheet/Spreadsheet.cfc: line 68
called from /spreadsheet.cfc: line 185
called from D:\Inetpub\wwwroot\Hepatitis-C-Register\status2excel_Hepatitis-C-Register.cfm: line 321
Java Stacktrace lucee.runtime.exp.NativeException: org/apache/xmlbeans/XmlException
  at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
  at org.apache.felix.framework.BundleWiringImpl.doImplicitBootDelegation(BundleWiringImpl.java:1765)
  at org.apache.felix.framework.BundleWiringImpl.searchDynamicImports(BundleWiringImpl.java:1700)
  at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1536)
  at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
  at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1998)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
  at com.compoundtheory.classloader.NetworkClassLoader.loadClass(NetworkClassLoader.java:463)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
  at java.lang.Class.getDeclaredConstructors0(Native Method)
  at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
  at java.lang.Class.getConstructors(Class.java:1651)
  at lucee.runtime.reflection.storage.WeakConstructorStorage.store(WeakConstructorStorage.java:58)
  at lucee.runtime.reflection.storage.WeakConstructorStorage.getConstructors(WeakConstructorStorage.java:43)
  at lucee.runtime.reflection.Reflector.getConstructorInstance(Reflector.java:418)
  at lucee.runtime.reflection.Reflector.getConstructorInstance(Reflector.java:411)
  at lucee.runtime.reflection.Reflector.callConstructor(Reflector.java:801)
  at lucee.runtime.java.JavaObject.init(JavaObject.java:296)
  at lucee.runtime.java.JavaObject.call(JavaObject.java:222)
  at lucee.runtime.java.JavaObject.call(JavaObject.java:259)
  at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:754)
  at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1599)
  at org.cfpoi.spreadsheet.spreadsheet_cfc$cf.udfCall7(/org/cfpoi/spreadsheet/Spreadsheet.cfc:2189)
  at org.cfpoi.spreadsheet.spreadsheet_cfc$cf.udfCall(/org/cfpoi/spreadsheet/Spreadsheet.cfc)
  at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:105)
  at lucee.runtime.type.UDFImpl._call(UDFImpl.java:337)
  at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:210)
  at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:781)
  at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:823)
  at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1614)
  at org.cfpoi.spreadsheet.spreadsheet_cfc$cf.udfCall1(/org/cfpoi/spreadsheet/Spreadsheet.cfc:68)
  at org.cfpoi.spreadsheet.spreadsheet_cfc$cf.udfCall(/org/cfpoi/spreadsheet/Spreadsheet.cfc)
  at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:105)
  at lucee.runtime.type.UDFImpl._call(UDFImpl.java:337)
  at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:210)
  at lucee.runtime.ComponentImpl._call(ComponentImpl.java:662)
  at lucee.runtime.ComponentImpl._call(ComponentImpl.java:579)
  at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1934)
  at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:823)
  at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1614)
  at spreadsheet_cfc$cf.udfCall(/spreadsheet.cfc:185)
  at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:105)
  at lucee.runtime.type.UDFImpl._call(UDFImpl.java:337)
  at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:210)
  at lucee.runtime.ComponentImpl._call(ComponentImpl.java:662)
  at lucee.runtime.ComponentImpl._call(ComponentImpl.java:579)
  at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1934)
  at lucee.runtime.tag.CFTag.cfcStartTag(CFTag.java:396)
  at lucee.runtime.tag.CFTag.doStartTag(CFTag.java:178)
  at hepatitis_c_register990.status2excel_hepatitis_c_register_cfm2160$cf.call(/Hepatitis-c-register/status2excel_Hepatitis-C-Register.cfm:321)
  at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:888)
  at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:833)
  at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:828)
  at lucee.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:62)
  at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:44)
  at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2293)
  at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2284)
  at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2252)
  at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:891)
  at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:102)
  at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:62)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
  at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
  at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:476)
  at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
  at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802)
  at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410)
  at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  at java.lang.Thread.run(Thread.java:745)
 Caused by: java.lang.ClassNotFoundException: org.apache.xmlbeans.XmlException
  ... 85 more
 
Timestamp 02.01.17 13:26:32 MEZ

I call the function with the following tag.
<cfspreadsheet action="write" filename="#Exportdatei#" query="Excelquery" sheetname="Reconciliation" overwrite="true" columnnames="#Spaltennamen#" />
(It worked under Lucee 4.5)

Thank you for your help

Michael

Michael Vornkahl

unread,
Jan 2, 2017, 7:51:20 AM1/2/17
to Lucee
3. Amendment: I found the problem :-)
If I try to create a xlsx-file the problem occurs, if i change it into xls (old excel-format) no error occurs. There was a hint in the source code of the spreadsheet.cfc which helped me.

Thank you

Michael

Am Montag, 2. Januar 2017 12:12:26 UTC+1 schrieb Michael Vornkahl:
Reply all
Reply to author
Forward
0 new messages