I may have the same problem, and suspect something may be broken - hopefully my code, as that I can fix!
I am running tomcat 5.5.7 on JDK1.5 plus a second instance of tomcat 5.0.19 on JDK1.4.2 (on another port) on the same Redhat 9 box. The Struts 1.2.4 edition of struts-examples.war works fine on my Tomcat5.0/JDK1.4, however it gets trashed when I drop it into my fairly operational Tomcat 5.5/JDK1.5 server (it runs other JDK1.5 compiled wars fine).
My fault message at the browser when I try to access the url for struts-example (clicked straight off the "manager" console, so it's there and deployed ok):
HTTP Status 404 - Servlet action is not available type Status report message Servlet action is not available description The requested resource (Servlet action is not available) is not available. Apache Tomcat/5.5.7
Nothing is written to catalina.out which is logging other apps' errors just fine.
I am running into this fault because I am looking for a solution to a problem with my struts Validator code, which I can't get running in Tomcat 5.5 / JDK 1.5 ... I get the following fault when using the simplest of validations ("required" ... minLength, maxlength respond the same):
ERRORvalidateFieldForRule, reflection: org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionMessages, javax.servlet.http.HttpServletRequest) java.lang.NoSuchMethodException: org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionMessages, javax.servlet.http.HttpServletRequest) at java.lang.Class.getMethod(Class.java:1581) at org.apache.commons.validator.Validator.validateFieldForRule(Validator.java:401)
However I have traced the jar containing that class and method .. it's there alright, and in the classpath ok. I'm worried that it might be the reflection which is failing, and possibly because of a JDK1.4 compiled commons-validator trying to reflect into a JDK1.5 compiled class - and hence I'm wasting my time trying to debug my own code.
Anyone got any good news for me? Mainly can anyone verify that you can indeed run (straight out of the box) struts-example.war and specifically struts-validator on tomcat 5.5 in JDK1.5 with JDK1.5 compiled JSPs and .java user files?
On another note, but possibly with the same underlying problem, I was able to run StrutsTestCase using the Mock version but the Cactus version choked, and I recall thinking that the error message smacked of a JDK1.4 class failing to co-operate with a 1.5 class for some reason. Sorry I don't have the message in window, but I can repeat the test if anyone's really interested. I recall seeing some component deep in the sub-structure like httpunit or something being only JDK1.4 compliant, but that's purely impression, not fact.
A free chokkie bar to anyone who can help. Oh, you have to come to Brisbane, Q, AU to collect! Rob M
Joined: Apr 12, 2005
Well, I'll be giving James, my tech lead a chokkie bar. He found a problem with my classpath - I had one set prior to booting Tomcat. Not good. Unset the classpath before ./bin/startup.sh and both the struts-expample and my own code work fine unedited. So to answer my own question - yes Struts 1.2.4 works so far as the basic tests go in Tomcat 5.5.7 / JDK1.5.0 ... all the samples in the struts-example.war clicked through ok.
I don't have the classpath set and everything works until I try and set up a data source in the struts-config.xml. I've tried setting up a connection to the database in a little test program and the appropriate jar file is in tomcat/shared/lib (also tried it in tomcat/common/lib just in case). Again I get nothing in the log files. Tomcat 5.5.7 jdk1.5.0
Joined: Feb 01, 2005
Don't know what it is about this thread and people answering their own posts but anyway:
Although I had the jdbc jar in the classpath I didn't have commons-dbcp so the contain was throwng a class not found exception. Note you also need commons-pool and commons-collections (but thats in the struts-blank.war). You can download the missing jars from the apache website.