• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 186
  • Last Modified:

java.lang.NoClassDefFoundError

I am refactoring my project on Tomcat and Eclipse. I think all of the code should work.

on web project, there is a 1.jsp file calling
InObject.getId();

on java project, there is a java file InObject.java, getId() is one of method in this java file. this java file is inside package m..dataserver;

when I run 1.jsp page, I got error:

javax.servlet.ServletException: m/dataserver/ImObject
     org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
     org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
     org.apache.jsp.sottImporter_002dvalidate_jsp._jspService(org.apache.jsp.sottImporter_002dvalidate_jsp:738)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

java.lang.NoClassDefFoundError: m/ImObject
 
what is wrong, I am sure there is ImObject.java

 
 
     
0
keepworking
Asked:
keepworking
1 Solution
 
objectsCommented:
where is the class file?  It should be in WEB-INF/classes/m/ImObject.class
or in a jar in WEB-INF/lib
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now