This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts & JPA - How to deploy web application after implementing? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts & JPA - How to deploy web application after implementing?" Watch "Struts & JPA - How to deploy web application after implementing?" New topic
Author

Struts & JPA - How to deploy web application after implementing?

Heshawa De Silva
Greenhorn

Joined: Jun 28, 2011
Posts: 5
I did a web application using Struts and JPA. Now i want to deploy it in a live server. I deployed it in glassfish during implementing. I tried to deploy it in Appachi tom cat using Tomcat Manager. I choose .WAR file and deployed it.

But when I go to the URL and enter username and password it givs exceptions
javax.servlet.ServletException: Servlet execution threw an exception


java.lang.NoClassDefFoundError: javax/persistence/EntityNotFoundException
ActionClass.LoginAction.execute(LoginAction.java:45)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


java.lang.ClassNotFoundException: javax.persistence.EntityNotFoundException
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
ActionClass.LoginAction.execute(LoginAction.java:45)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


and My CSS and pics are not also appearing on my web page.
How do I deploy my web app properly?
khekhone yvan
Ranch Hand

Joined: May 08, 2011
Posts: 79
i think you dont have lib in your jar .
Heshawa De Silva
Greenhorn

Joined: Jun 28, 2011
Posts: 5
Has it missing in .WAR file or in server?

Because .WAR file is auto-generated file when compiling.
Do you have any idea what is the missing JAR?
Shankar Tanikella
Ranch Hand

Joined: Jan 30, 2011
Posts: 329

May be, ejb3-persistence.jar?

Have Fun with Java
little,little.. little by little makes a lot..
Heshawa De Silva
Greenhorn

Joined: Jun 28, 2011
Posts: 5
Tried.
But Still stuck in same place.
All jars are already there, but not in appachi libraries.
But I placed them in it. Stil not working
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts & JPA - How to deploy web application after implementing?
 
Similar Threads
Error while using lookup
problem with hibernate application
Exception
Struts1 - tiles -cascading tiles:insert
Strange behavior of Tomcat! "classFile.delete() failed"