• Post Reply Bookmark Topic Watch Topic
  • New Topic

Error : java.lang.ClassFormatError: Incompatible magic value 13375 in class file

 
Nitin Belaram
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i am calling servlet from my jsp page i am getting error.


javax.servlet.ServletException: Servlet execution threw an exception


root cause

java.lang.ClassFormatError: Incompatible magic value 13375 in class file mycontroller/ValidatorException
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(Unknown Source)
java.security.SecureClassLoader.defineClass(Unknown Source)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1852)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:876)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1208)
java.lang.ClassLoader.loadClassInternal(Unknown Source)
mycontroller.RegisterServlet.doPost(RegisterServlet.java:53)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

Please suggest what is the cause of error .
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Either your Java environment or your classpath is a mess. You have multiple different versioned JRE/JDK instances around in your machine, or you are probably including JDK's libraries in your webapp. Clean it all up and make sure that you use the one and right version the right way.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!