导入xls文件时出错 - Java Application

时间:2017-07-26 09:08:59

标签: java apache azure xlsx rhel

我有一个基于Java的Web应用程序,我在Microsoft Azure中运行。 操作系统:RHEL 7.3版本。 Web服务器:Apache 9 所以问题是当上传.xlsx文件时它会给我以下错误。对于具有相同配置的所有其他基础设施(包括AWS,本地),每件事情都运行良好。我很困惑可能是错误,即AT服务器级别配置或Java应用程序代码中的错误?

  

HTTP状态[500] - [内部服务器错误]

     

类型例外报告

     

描述服务器遇到阻止>的意外情况。它来自履行请求。

     

异常

     

java.lang.reflect.InvocationTargetException       sun.reflect.NativeMethodAccessorImpl.invoke0(原生方法)       sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)       sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)       java.lang.reflect.Method.invoke(Method.java:498)       com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)       com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)       com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)       com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)       org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)       com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)       com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)       com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:306)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)       com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.vspl.asp.interceptors.SessionInterceptor.intercept(SessionInterceptor.java:40)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:306)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)       org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)       org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)       org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)   根本原因

     

java.lang.VerifyError:错误的返回类型   例外细节:     地点:       COM / monitorjbl / XLSX / IMPL / StreamingSheet.getPaneInformation()Lorg /阿帕奇/ POI / SS / util的/ PaneInformation; @ 4:转过来     原因:       键入' org / apache / poi / hssf / util / PaneInformation' (当前帧,堆栈[0])不能分配给' org / apache / poi / ss / util / PaneInformation' (来自方法签名)     当前框架:       bci:@ 4       旗帜:{}       locals:{' com / monitorjbl / xlsx / impl / StreamingSheet' }       stack:{' org / apache / poi / hssf / util / PaneInformation' }     字节码:       0x0000000:2ab6 0117 b0

     

com.monitorjbl.xlsx.impl.StreamingWorkbookReader.loadSheets(StreamingWorkbookReader.java:160)       com.monitorjbl.xlsx.impl.StreamingWorkbookReader.init(StreamingWorkbookReader.java:132)       com.monitorjbl.xlsx.impl.StreamingWorkbookReader.init(StreamingWorkbookReader.java:91)       com.monitorjbl.xlsx.StreamingReader $ Builder.open(StreamingReader.java:263)       com.vspl.asp.util.ReadR2Excelsheet.noOfRows(ReadR2Excelsheet.java:57)       com.action.gstr2.ReturnsGstr2Action.readFile(ReturnsGstr2Action.java:161)       com.action.gstr2.ReturnsGstr2Action.loadExcelFile(ReturnsGstr2Action.java:141)       com.action.gstr2.ReturnsGstr2Action.uploadInvoices(ReturnsGstr2Action.java:112)       sun.reflect.NativeMethodAccessorImpl.invoke0(原生方法)       sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)       sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)       java.lang.reflect.Method.invoke(Method.java:498)       com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)       com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)       com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)       com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)       org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)       com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)       com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)       com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:306)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)       com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       com.vspl.asp.interceptors.SessionInterceptor.intercept(SessionInterceptor.java:40)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:306)       com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)       org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)       org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)       org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)       org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)   注意服务器日志中提供了根本原因的完整堆栈跟踪。

Apache Tomcat / 9.0.0.M21

1 个答案:

答案 0 :(得分:0)

没关系。我正在使用Apache POI hssf库来处理.xlsx文件。你可以检查错误。它应该是" xssf"版。

参考链接:https://poi.apache.org/spreadsheet/