Error message
Project background:
A Web project references a Java project that adds references to the project, but opens page access and reports a 500 error. Hint: servlet initialization error.
Environment: Eclipse Luna
jdk:1.7
tomcat:8.0
HTTP Status 500-servlet execution threw an exception
type Exception Report
message Servlet execution threw an exception
Description The server encountered an internal error, prevented it from fulfilling this request.
exception
Javax.servlet.ServletException:Servlet execution threw an Exceptionorg.apache.tomcat.websocket.server.WsFilter.doFilter (wsfilter.java:52)
Root cause
java.lang.noclassdeffounderror:org/codehaus/jackson/map/ ObjectMappercom.founder.xap.maserver.actionstruct.ActionStructParser.fromJson (ACTIONSTRUCTPARSER.JAVA:20) Com.founder.xap.maserver.servlet.MAServlet.processRequest (maservlet.java:63) Com.founder.xap.maserver.servlet.MAServlet.doGet (maservlet.java:42) Javax.servlet.http.HttpServlet.service ( httpservlet.java:622) Javax.servlet.http.HttpServlet.service (httpservlet.java:729) Org.apache.tomcat.websocket.server.WsFilter.doFilter (wsfilter.java:52)
Root cause
Java.lang.ClassNotFoundException: Org.codehaus.jackson.map.ObjectMapperorg.apache.catalina.loader.WebappClassLoaderBase.loadClass ( webappclassloaderbase.java:1305) Org.apache.catalina.loader.WebappClassLoaderBase.loadClass ( webappclassloaderbase.java:1157) Com.founder.xap.maserver.actionstruct.ActionStructParser.fromJson ( ACTIONSTRUCTPARSER.JAVA:20) com.founder.xap.maserver.servlet.MAServlet.processRequest (maservlet.java:63) Com.founder.xap.maserver.servlet.MAServlet.doGet (maservlet.java:42) Javax.servlet.http.HttpServlet.service ( httpservlet.java:622) Javax.servlet.http.HttpServlet.service (httpservlet.java:729) Org.apache.tomcat.websocket.server.WsFilter.doFilter (wsfilter.java:52)
Note The full stack trace of the root cause are available in the Apache tomcat/8.0.21 logs.
Solution:
1, project Properties, Java build Path---projects, add the required Java project
2. Project Properties--"Java Build Path--" Order and export tick Java project
3, Project Properties--"Deployment assemby add dependent Java project
Web project References Java project, connection error error HTTP Status 500-servlet execution threw an exception