wood burning stoves 2.0
The moose likes Servlets and the fly likes ServletException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "ServletException" Watch "ServletException" New topic


preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
I am trying to run a servlet program (http://localhost:8080/CallSetup)through tomcat.It is showing the following error:


javax.servlet.ServletException: Servlet execution threw an exception

root cause

java.lang.NoClassDefFoundError: javax/persistence/EntityManagerFactory

please assist me to solve this

Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2904

seems like an ejb-api jar file missing, Look for this jar and paste it into /lib directory ! (i.e in classpath )

[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Schandha Ravi
Ranch Hand

Joined: Oct 20, 2007
Posts: 167
This is surely not a problem of your servlet. It is related to your persistance logic. Make sure you have necessary jar files, configuration files and any other necessary information in your ear file.

Thanks & Regards, SK
SCJP 5.0, DB2 - 800, DB2 - 803, SCDJWS (On the way)
subject: ServletException
It's not a secret anymore!