Web project References Java project, connection error error HTTP Status 500-servlet execution threw an exception

Source: Internet
Author: User
Tags stack trace apache tomcat

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.