• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Heshawa De Silva
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think you dont have lib in your jar .
 
Heshawa De Silva
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 329
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May be, ejb3-persistence.jar?
 
Heshawa De Silva
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic