Tomcat Struts ClassCastException - looks like a Tomcat bug

S

Stewart

Using Struts 1.2.7 with the latest Tomcat 5.5.9 I get the following in
localhost.<date>.log when I first try to access my web application:

17-Aug-2005 11:02:02 org.apache.catalina.core.StandardHostValve custom
SEVERE: Exception Processing
ErrorPage[exceptionType=java.lang.Exception, location=/error.jsp]
org.apache.jasper.JasperException: Failed to load or instantiate
TagExtraInfo class: org.apache.struts.taglib.html.MessagesTei

And in stdout_<date>.log I get:

ERROR:eek:rg.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
Servlet.service() for servlet jsp threw exception
java.lang.ClassCastException: org.apache.struts.taglib.html.MessagesTei

Through trial and error I have found that this does not happen with
Tomcat 5.0.28, with all other factors (struts, my application, etc)
kept the same.

Thought you all might like to know.

Stewart
 
J

jan V

You already started this thread a few days ago. Why do you post it again?
Please don't do that, it kinda undermines the thread-based nature of
newsgroups.
 
J

jan V

You already started this thread a few days ago. Why do you post it again?
Please don't do that, it kinda undermines the thread-based nature of
newsgroups.

Please ignore this post. Cheers. My mistake (apparently)
 
S

Stewart

OK. After help from some colleagues (who refered me to:
http://www.systemmobile.com/wp/?p=152) and the struts users mailing
list, and some experimenting of my own...

I had a copy of jsp-api.jar in my app (/WEB-INF/lib/jsp-api.jar)
and BOTH Tomcat 5.0.28 and 5.5.9 have a copy
($CATALINA_HOME/common/lib/jsp-api.jar)

This is a problem for Tomcat 5.5.9 but not for 5.0.28.
By removing my copy of jsp-api.jar (no loss because Tomcat has it
anyway) my app runs just fine with Tomcat 5.5.9.

Problem solved, but it does leave the mystery of why it's a problem for
5.5.9 and not for 5.0.28...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top