wood burning stoves*
The moose likes Tomcat and the fly likes Help with Tomcat 5.5.26 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Help with Tomcat 5.5.26" Watch "Help with Tomcat 5.5.26" New topic

Help with Tomcat 5.5.26

Tonya Johnson

Joined: Feb 04, 2008
Posts: 16
My comapany recently upgraded to Tomcat 5.5.26 from Tomcat 4.0.4. I have been put in charge of getting our applications up and running in the new version. I am trying to run tests on the server in Tomcat to see if it is accepting .jsp and servlets. The .jsp files are working find but when I try to test a servlet I am getting an error. Can someone please help me with this? I change the web.xml file to enable the servlet and servlet-mapping elements. I also changed the context.xml file and set reloadable to true. I am going to copy in the error that I am receiving.

Thanks in advance.

HTTP Status 500 -


type Exception report


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


javax.servlet.ServletException: Cannot allocate servlet instance for path /servlet/HelloServlet

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)

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


Apache Tomcat/5.5.26
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

It looks like you've compiled with a newer version of Java than the one under which Tomcat is running.
  • Upgrade the version of Java that Tomcat is using
  • Recompile with the same version that Tomcat is using
  • or.. Look into javac's -source and -target switches to create classes that are compatible with older JVMs.

  • 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: Help with Tomcat 5.5.26
    Similar Threads
    Loading a servlet using jdk1.4 in Tomcat
    Hi Servlet invoke error
    java.lang.ClassFormatError: Incompatible magic value 13375 in class file mycontroller/ValidatorExc
    Error 500 when compiling servlet
    I'm not sure the problem is the servlet