java+jdk1.8运行项目出错java.lang.ClassNotFoundException: jxl.biff.DisplayFormat? 400 报错
编译没问题但是运行时候出错
很明显,缺少jxl jar包,下载jxl.jar然后引用即可。
######java.lang.NoClassDefFoundError: jxl/biff/DisplayFormat######缺少jar包编译的时候会报错,显然不是######缺包,放进去就好了
######补充说明:不是缺包导致的,缺包的话编译就会报错,
Servlet.service() for servlet [jsp] in context with path [/MQ-CMS] threw exception [javax.servlet.ServletException: java.lang.NoClassDefFoundError: jxl/biff/DisplayFormat] with root cause
java.lang.ClassNotFoundException: jxl.biff.DisplayFormat
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1718)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569)
at com.sinosoft.lis.agentquery.NewWageQueryKeepUI.submitData(NewWageQueryKeepUI.java:55)
at org.apache.jsp.ui.agentquery.NewWageQueryKeepSave_jsp._jspService(NewWageQueryKeepSave_jsp.java:223)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
JAR包版本不对
######这个好像是jar包有冲突,两个jar包中具有同名的类导致jvm在运行的时候不知道加载哪一个jar中的class,在IDEA中可以ctrl+N打开弹窗输入DisplayFormat来查一下是不是有冲突的class,希望对你能有帮助
######冲突.
######Class.forName("className")这种方式引入的类在编译时是没有错误提示的
另外编译的时候只检查你的代码里引用的类是否存在,不会检查你依赖的jar里的类的依赖类是否存在,如你引用的a.jar里的类A,但是类A引用了b.jar里的类B,这种情况在编译的时候是不报错的,运行时才会报错。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。