• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP Page giving runtime error

 
Aravind Prasad
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers,

I have developed an application in JSP and MySQL. I was using Windows XP for the production environment and later for implementation, I have upload the war file in Windows 2003 Server. When run the application using the url http://localhost:8080/clientprofile, it is giving an error - Cannot compile Class file

The error is provided below.

<blockquote>code:
<pre name="code" class="core">
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

javax.servlet.ServletException: Bad version number in .class file
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
org.apache.jsp.indexValidate_jsp._jspService(indexValidate_jsp.java:102)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

java.lang.UnsupportedClassVersionError: Bad version number in .class file
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:620)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1812)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
com.softnotions.road.LoginHandler.<init>(LoginHandler.java:67)
org.apache.jsp.indexValidate_jsp._jspService(indexValidate_jsp.java:56)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
</pre>
</blockquote>

Please help me to sort this problem out.

Thanks in advance

Regards
Aravind Prasad
 
Purushoth Thambu
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the JVM version in your XP and in 2003? My guess is 2003 has lower version of JVM
 
Aravind Prasad
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mr. Purushothaman,

Both the JRE Version in Windows XP and Windows 2003 are same. I'm still getting the same error.



Please help me!!

Aravind Prasad
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This error message means that the classes were compiled with a version higher than the version under which your application is being run.
You'll need to check again to see what version your application is being run.
(Just because you're seeing version 6 at the command line, doesn't mean that's the version that your container is using.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic