aspose file tools*
The moose likes Servlets and the fly likes I'm not sure the problem is the servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "I Watch "I New topic
Author

I'm not sure the problem is the servlet

Tonya Johnson
Greenhorn

Joined: Feb 04, 2008
Posts: 16
We have just installed Tomcat 5.5.26 and I am running test to make sure that everything is setup correctly. I get this message when I run a simple servlet that just places Hello on the screen. Can someone help me with this?

Thanks.
Tonya


HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

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

exception

javax.servlet.ServletException: Cannot allocate servlet instance for path /servlet/HelloServlet
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:389)
org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:134)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

java.lang.UnsupportedClassVersionError: Bad version number in .class file
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:1853)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:875)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1330)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:370)
org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:134)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.26 logs.


--------------------------------------------------------------------------------

Apache
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

It looks like you compiled your source with a javac version that is higher than the Java version under which you're running Tomcat.

Either upgrade your JVM or recompile your source with the -version xxx switch .


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
wood burning stoves
 
subject: I'm not sure the problem is the servlet