zoukankan      html  css  js  c++  java
  • java.lang.ClassNotFoundException: org.apache.poi.POIXMLTypeLoader

            <easyexcel.version>2.2.7</easyexcel.version>
    

      

    接入easyexcel 时出现如下问题,解决方法就是将poi的版本升高,但也不能使用最新的,做项目,维护老项目的坑

            <poi.version>3.15</poi.version>
    

      

    HTTP Status 500 - Handler processing failed; nested exception is java.lang.NoClassDefFoundError: org/apache/poi/POIXMLTypeLoader
    type Exception report
    
    message Handler processing failed; nested exception is java.lang.NoClassDefFoundError: org/apache/poi/POIXMLTypeLoader
    
    description The server encountered an internal error that prevented it from fulfilling this request.
    
    exception
    
    org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: org/apache/poi/POIXMLTypeLoader
    	org.springframework.web.servlet.DispatcherServlet.triggerAfterCompletionWithError(DispatcherServlet.java:1303)
    	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:977)
    	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
    	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
    	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
    	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    	com.baidu.bpit.riskmetrics.support.XssFilter.doFilter(XssFilter.java:54)
    	com.baidu.bpit.riskmetrics.config.LoginCheckFilter.doFilter(LoginCheckFilter.java:85)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
    	org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
    	org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
    	org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    	org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    	org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:76)
    	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
    	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    root cause
    
    java.lang.NoClassDefFoundError: org/apache/poi/POIXMLTypeLoader
    	org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorkbook$Factory.newInstance(Unknown Source)
    	org.apache.poi.xssf.usermodel.XSSFWorkbook.onWorkbookCreate(XSSFWorkbook.java:307)
    	org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:167)
    	com.baidu.bpit.riskmetrics.util.ExcelUtil.generate(ExcelUtil.java:71)
    	com.baidu.bpit.riskmetrics.credit.application.service.CreditApplicationService.export(CreditApplicationService.java:233)
    	com.baidu.bpit.riskmetrics.credit.application.service.CreditApplicationService$$FastClassBySpringCGLIB$$3dff01bb.invoke(<generated>)
    	org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    	org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:649)
    	com.baidu.bpit.riskmetrics.credit.application.service.CreditApplicationService$$EnhancerBySpringCGLIB$$4af82fa1.export(<generated>)
    	com.baidu.bpit.riskmetrics.credit.application.web.CreditApplicationController.export(CreditApplicationController.java:172)
    	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	java.lang.reflect.Method.invoke(Method.java:497)
    	org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
    	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
    	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
    	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776)
    	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)
    	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
    	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
    	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
    	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
    	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
    	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    	com.baidu.bpit.riskmetrics.support.XssFilter.doFilter(XssFilter.java:54)
    	com.baidu.bpit.riskmetrics.config.LoginCheckFilter.doFilter(LoginCheckFilter.java:85)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
    	org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
    	org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
    	org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    	org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    	org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:76)
    	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
    	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    root cause
    
    java.lang.ClassNotFoundException: org.apache.poi.POIXMLTypeLoader
    	org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305)
    	org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
    	org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorkbook$Factory.newInstance(Unknown Source)
    	org.apache.poi.xssf.usermodel.XSSFWorkbook.onWorkbookCreate(XSSFWorkbook.java:307)
    	org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:167)
    	com.baidu.bpit.riskmetrics.util.ExcelUtil.generate(ExcelUtil.java:71)
    	com.baidu.bpit.riskmetrics.credit.application.service.CreditApplicationService.export(CreditApplicationService.java:233)
    	com.baidu.bpit.riskmetrics.credit.application.service.CreditApplicationService$$FastClassBySpringCGLIB$$3dff01bb.invoke(<generated>)
    	org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    	org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:649)
    	com.baidu.bpit.riskmetrics.credit.application.service.CreditApplicationService$$EnhancerBySpringCGLIB$$4af82fa1.export(<generated>)
    	com.baidu.bpit.riskmetrics.credit.application.web.CreditApplicationController.export(CreditApplicationController.java:172)
    	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	java.lang.reflect.Method.invoke(Method.java:497)
    	org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
    	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
    	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
    	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776)
    	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)
    	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
    	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
    	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
    	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
    	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
    	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    	com.baidu.bpit.riskmetrics.support.XssFilter.doFilter(XssFilter.java:54)
    	com.baidu.bpit.riskmetrics.config.LoginCheckFilter.doFilter(LoginCheckFilter.java:85)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
    	org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
    	org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
    	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    	org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
    	org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
    	org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
    	org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:76)
    	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
    	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    note The full stack trace of the root cause is available in the Apache Tomcat/8.0.21 logs.
    
    Apache Tomcat/8.0.21
    

      

  • 相关阅读:
    Java NIO系列教程(九) ServerSocketChannel
    Java NIO系列教程(十) Java NIO DatagramChannel
    Java NIO系列教程(七) FileChannel
    Java NIO系列教程(八) SocketChannel
    Java NIO系列教程(六) Selector
    Java NIO系列教程(四) Scatter/Gather
    简述数据库设计的范式及应用
    简述在MySQL数据库中MyISAM和InnoDB的区别
    sql语句_2
    sql语句_统计总成绩最高的前2名
  • 原文地址:https://www.cnblogs.com/jianfeijiang/p/14186410.html
Copyright © 2011-2022 走看看