1
异常代码
com.alibaba.excel.exception.ExcelGenerateException: java.lang.NoClassDefFoundError: Could not initialize class org.apache.poi.openxml4j.opc.internal.marshallers.ZipPackagePropertiesMarshaller
at com.alibaba.excel.write.ExcelBuilderImpl.<init>(ExcelBuilderImpl.java:41)
at com.alibaba.excel.ExcelWriter.<init>(ExcelWriter.java:47)
at com.alibaba.excel.write.builder.ExcelWriterBuilder.build(ExcelWriterBuilder.java:257)
at com.csii.mcs.ibs.util.ExcelUtil.exportActDetail(ExcelUtil.java:23)
at com.csii.mcs.ibs.equery.action.ActTrsInfoQryMainAcMPrintAction.execute(ActTrsInfoQryMainAcMPrintAction.java:132)
at com.csii.ibs.workflow.QueryTrsTemplate.execute(QueryTrsTemplate.java:56)
at sun.reflect.GeneratedMethodAccessor243.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy339.execute(Unknown Source)
at com.csii.pe.chain.command.DelegateCommand.execute(DelegateCommand.java:39)
at com.csii.pe.chain.ChainImpl.execute(ChainImpl.java:114)
at com.csii.pe.core.ServiceBasedCoreController.execute(ServiceBasedCoreController.java:229)
at com.csii.pe.channel.http.servlet.MainController.process(MainController.java:127)
at com.csii.pe.dynamic.http.MainServlet.process(MainServlet.java:381)
at com.csii.pe.dynamic.http.MainServlet.doPost(MainServlet.java:291)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:148)
at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:134)
at org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:63)
at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49)
at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
at org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48)
at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)
at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:55)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at org.apache.felix.http.jetty.internal.FixEncodingFilter.doFilter(FixEncodingFilter.java:58)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:930)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.poi.openxml4j.opc.internal.marshallers.ZipPackagePropertiesMarshaller
at org.apache.poi.openxml4j.opc.OPCPackage.init(OPCPackage.java:161)
at org.apache.poi.openxml4j.opc.OPCPackage.<init>(OPCPackage.java:141)
at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:97)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:324)
at org.apache.poi.util.PackageHelper.open(PackageHelper.java:37)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:295)
at com.alibaba.excel.util.WorkBookUtil.createWorkBook(WorkBookUtil.java:32)
at com.alibaba.excel.context.WriteContextImpl.<init>(WriteContextImpl.java:83)
at com.alibaba.excel.write.ExcelBuilderImpl.<init>(ExcelBuilderImpl.java:35)
... 58 more
2020-07-22 09:13:52.463 [DEBUG] org.springframework.orm.ibatis.SqlMapClientTemplate zwpqzkgsjozu ZHM70AE7XA#1595380430712#48 ActDetailListQryPrint /80000353701 Opened SqlMapSession [com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl@1eafe13] for iBATIS operation
2020-07-22 09:13:52.463 [DEBUG] org.springframework.jdbc.datasource.DataSourceUtils zwpqzkgsjozu ZHM70AE7XA#1595380430712#48 ActDetailListQryPrint /80000353701 Fetching JDBC Connection from DataSource
2020-07-22 09:13:52.463 [DEBUG] java.sql.Connection zwpqzkgsjozu ZHM70AE7XA#1595380430712#48 ActDetailListQryPrint /80000353701 {conn-100480} Connection
2020-07-22 09:13:52.463 [DEBUG] org.springframework.orm.ibatis.SqlMapClientTemplate zwpqzkgsjozu ZHM70AE7XA#1595380430712#48 ActDetailListQryPrint /80000353701 Obtained JDBC Connection [ProxyConnection[PooledConnection[oracle.jdbc.driver.T4CConnection@1df7322]]] for iBATIS operation
2020-07-22 09:13:52.463 [DEBUG] java.sql.Connection zwpqzkgsjozu ZHM70AE7XA#1595380430712#48 ActDetailListQryPrint /80000353701 {conn-100480} Preparing Statement: insert into IBSJNLQUERYLOG ( JNLNO,LOGINTYPE,CIFSEQ,USERSEQ,ACNO, BANKACTYPE,TRANSDATE,TRANSTIME,RETURNTIME,JNLSTATE, TRANSCODE,RETURNCODE,RETURNMSG ) values ( ?,?,?,?,?, ?,?,?,?,?, ?,?,? )
2020-07-22 09:13:52.463 [DEBUG] java.sql.PreparedStatement zwpqzkgsjozu ZHM70AE7XA#1595380430712#48 ActDetailListQryPrint /80000353701 {pstm-100481} Executing Statement: insert into IBSJNLQUERYLOG ( JNLNO,LOGINTYPE,CIFSEQ,USERSEQ,ACNO, BANKACTYPE,TRANSDATE,TRANSTIME,RETURNTIME,JNLSTATE, TRANSCODE,RETURNCODE,RETURNMSG ) values ( ?,?,?,?,?, ?,?,?,?,?, ?,?,? )
2020-07-22 09:13:52.463 [DEBUG] java.sql.PreparedStatement zwpqzkgsjozu ZHM70AE7XA#1595380430712#48 ActDetailListQryPrint /80000353701 {pstm-100481} Parameters: [7393240, R, 800003537, 130641, 8104014000000001278, null, 2020-07-22, 2020-07-22 09:13:50.712, 2020-07-22 09:13:52.463, C, ActDetailListQryPrint, 000000, null]
2020-07-22 09:13:52.463 [DEBUG] java.sql.PreparedStatement zwpqzkgsjozu ZHM70AE7XA#1595380430712#48 ActDetailListQryPrint /80000353701 {pstm-100481} Types: [java.math.BigDecimal, java.lang.String, java.lang.Long, java.lang.Long, java.lang.String, null, java.sql.Date, java.sql.Timestamp, java.sql.Timestamp, java.lang.String, java.lang.String, java.lang.String, null]
2020-07-22 09:13:52.463 [DEBUG] org.springframework.jdbc.datasource.DataSourceUtils zwpqzkgsjozu ZHM70AE7XA#1595380430712#48 ActDetailListQryPrint /80000353701 Returning JDBC Connection to DataSource
2020-07-22 09:13:52.463 [INFO ] com.csii.pe.chain.command.TimestampCommand zwpqzkgsjozu ZHM70AE7XA#1595380430712#48 ActDetailListQryPrint /80000353701 elapsed time for ActDetailListQryPrint is : 1751
2020-07-22 09:13:52.463 [DEBUG] com.csii.pe.channel.http.servlet.DownloadView attachment; filename=ActDetailListQryPrint_1595380432431.xlsx
2020-07-22 09:13:52.463 [ERROR] com.csii.pe.channel.http.servlet.DownloadView render
java.lang.NullPointerException: null
at org.mortbay.io.ByteArrayBuffer.wrap(ByteArrayBuffer.java:361) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:588) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at com.csii.pe.channel.http.servlet.DownloadView.render(DownloadView.java:95) [com.csii.pe.http_6.0.0.201211091009.jar:na]
at com.csii.pe.dynamic.http.MainServlet.render(MainServlet.java:439) [com.csii.pe.dynamic.http_6.0.0.201108021456.jar:na]
at com.csii.pe.dynamic.http.MainServlet.process(MainServlet.java:391) [com.csii.pe.dynamic.http_6.0.0.201108021456.jar:na]
at com.csii.pe.dynamic.http.MainServlet.doPost(MainServlet.java:291) [com.csii.pe.dynamic.http_6.0.0.201108021456.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:148) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:134) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:63) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:55) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.apache.felix.http.jetty.internal.FixEncodingFilter.doFilter(FixEncodingFilter.java:58) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.mortbay.jetty.Server.handle(Server.java:326) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:930) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) [org.apache.felix.http.jetty-2.0.4-patch.jar:na]
异常提示 由于在内网, 没办法把异常日志提交上来, 请帮忙分析一下问题, 非常感谢! 是执行到 这行抛出的异常: ExcelWriter excelWriter = EasyExcel.write(baos).withTemplate(file).build();
File file = new File("src/main/resources/测试填充模板.xlsx"); ByteArrayOutputStream baos = new ByteArrayOutputStream(); System.out.println(file.getName()); ExcelWriter excelWriter = EasyExcel.write(baos).withTemplate(file).build(); 建议描述