Tomcat 8.0.15 / jasper / tiles 3.0.5的NoClassDefFoundError

时间:2014-12-02 13:00:34

标签: java spring tomcat tiles

我收到以下异常并且不确定问题是否在tomcat 8.0.15中,或者是否存在其他库的不兼容性:

Caused by: java.io.IOException: ServletException including path '/WEB-INF/views/layout/baseLayout.jsp'.
    at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:61) ~[tiles-request-servlet-1.0.6.jar:1.0.6]
    at org.apache.tiles.request.servlet.ServletRequest.doInclude(ServletRequest.java:245) ~[tiles-request-servlet-1.0.6.jar:1.0.6]
    at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:54) ~[tiles-request-api-1.0.6.jar:1.0.6]
    at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) ~[tiles-request-api-1.0.6.jar:1.0.6]
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) ~[tiles-core-3.0.5.jar:3.0.5]
    at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) ~[tiles-core-3.0.5.jar:3.0.5]
    ... 37 common frames omitted
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.jasper.el.ELContextImpl
    at org.apache.jasper.compiler.Validator$ValidateVisitor.getJspAttribute(Validator.java:1414) ~[jasper.jar:8.0.15]
    at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1231) ~[jasper.jar:8.0.15]
    at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:879) ~[jasper.jar:8.0.15]
    at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1536) ~[jasper.jar:8.0.15]
    at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) ~[jasper.jar:8.0.15]
    at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428) ~[jasper.jar:8.0.15]
    at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434) ~[jasper.jar:8.0.15]
    at org.apache.jasper.compiler.Node$Root.accept(Node.java:464) ~[jasper.jar:8.0.15]
    at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) ~[jasper.jar:8.0.15]
    at org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1846) ~[jasper.jar:8.0.15]
    at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:217) ~[jasper.jar:8.0.15]
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:356) ~[jasper.jar:8.0.15]
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:336) ~[jasper.jar:8.0.15]
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:323) ~[jasper.jar:8.0.15]
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564) ~[jasper.jar:8.0.15]
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357) ~[jasper.jar:8.0.15]
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396) ~[jasper.jar:8.0.15]
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340) ~[jasper.jar:8.0.15]

有什么想法吗?

  • JDK 8u25
  • Tomcat 8.0.15
  • Spring 4.1.2
  • Tiles 3.0.5

4 个答案:

答案 0 :(得分:1)

问题解决了。另一个组件包括spring boot jar,它是一个依赖包括tomcat 7.0.54库。

答案 1 :(得分:0)

确保tomcat / lib中存在jasper.jar。 如果缺少,请添加它,如果没有,请尝试Tomcat>从Eclipse中清除...

答案 2 :(得分:0)

答案 3 :(得分:0)

将servlet-api.jar,jsp-api.jar,el-api.jar添加到eclipse中的JRE系统库

Windows - 首选项 - 已安装的JRE -

选择现有的jre和cleck编辑以添加罐子。