aspose file tools*
The moose likes JSP and the fly likes JSP Page giving runtime error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP Page giving runtime error" Watch "JSP Page giving runtime error" New topic
Author

JSP Page giving runtime error

Aravind Prasad
Ranch Hand

Joined: Dec 28, 2005
Posts: 265
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

Joined: May 24, 2003
Posts: 425
What's the JVM version in your XP and in 2003? My guess is 2003 has lower version of JVM
Aravind Prasad
Ranch Hand

Joined: Dec 28, 2005
Posts: 265
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

Joined: Dec 11, 2004
Posts: 13410

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.)


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP Page giving runtime error