Tomcat 8使用JDK 1.8,app部署导致NPE

时间:2014-11-24 21:42:41

标签: java tomcat8

当我使用JDK 1.8在Tomcat 8中部署我的应用程序时,我得到了这个NPE。相同的应用程序在Tomcat 7中使用JDK 1.8可以正常工作。我们的应用程序没有发送任何el-api jar。还有其他人遇到过这个问题吗?

java.lang.NullPointerException
javax.el.CompositeELResolver.add(CompositeELResolver.java:49)
org.apache.jasper.el.ELContextImpl.<clinit>(ELContextImpl.java:87)
org.apache.jasper.compiler.Validator$ValidateVisitor.getJspAttribute(Validator.java:1414)
org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1231)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:879)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1536)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434)
org.apache.jasper.compiler.Node$Root.accept(Node.java:464)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1846)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:217)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
com.actuate.iv.presentation.aggregation.IVBaseFragment.service(IVBaseFragment.java:261)
com.actuate.iv.servlet.IVHttpDispatcher.handleRequest(IVHttpDispatcher.java:144)
com.actuate.iv.servlet.IVServlet.doGet(IVServlet.java:261)
javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

1 个答案:

答案 0 :(得分:0)

我们在这些配置中遇到了这个问题:

Using CATALINA_BASE:   /opt/tomcat
Using CATALINA_HOME:   /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME:        /usr/java/jdk1.8.0_45
Using CLASSPATH:       /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
Server version: Apache Tomcat
Server built:   May 19 2015 14:58:38 UTC
Server number:  8.0.23.0
OS Name:        Linux
OS Version:     2.6.32-431.11.2.el6.x86_64
Architecture:   amd64
JVM Version:    1.8.0_45-b14
JVM Vendor:     Oracle Corporation

我们通过将tomcat从8.0.23.0升级到8.0.26.0版本来解决这个问题。