0

I keep getting this error and i dont know what to do, I'm a student, please be cool with me guys!

HTTP Status 500 - Servlet execution threw an exception type Exception report

message Servlet execution threw an exception

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) root cause

java.lang.NoClassDefFoundError: javax/persistence/Persistence br.com.sky.iTvMC.util.JPAUtil.(JPAUtil.java:9) br.com.sky.iTvMC.controler.CanalClienteControle.processRequest(CanalClienteControle.java:37) br.com.sky.iTvMC.controler.CanalClienteControle.doPost(CanalClienteControle.java:79) javax.servlet.http.HttpServlet.service(HttpServlet.java:648) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) root cause

java.lang.ClassNotFoundException: javax.persistence.Persistence org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332) org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1166) br.com.sky.iTvMC.util.JPAUtil.(JPAUtil.java:9) br.com.sky.iTvMC.controler.CanalClienteControle.processRequest(CanalClienteControle.java:37) br.com.sky.iTvMC.controler.CanalClienteControle.doPost(CanalClienteControle.java:79) javax.servlet.http.HttpServlet.service(HttpServlet.java:648) 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 is available in the Apache Tomcat/8.0.36 logs.

K Anaiv
  • 1
  • 2
  • Well, the message says `java.lang.ClassNotFoundException: javax.persistence.Persistence` so the according jars are probably not on the classpath. – Thomas Dec 11 '18 at 18:07
  • If you have created a war file to deploy your web app have look at [this](https://stackoverflow.com/questions/1001714/how-to-create-war-files) question to get your classes and libs into the classpath – chinoy Dec 11 '18 at 18:26
  • How do i put this jar on the classpath? i don't know how to do it. – K Anaiv Dec 12 '18 at 10:37

0 Answers0