What version of JBoss are you using?

I have successfully gotten custom validators to work without a hitch on
JBoss 3.0.x (all versions beta through latest).  All validator classes and
jars are contained in the war like this:

/WEB-INF/*.tld
/WEB-INF/web.xml
/WEB-INF/struts-config.xml
/WEB-INF/validation.xml
/WEB-INF/validator-rules.xml
/WEB-INF/custom-validator-rules.xml
/WEB-INF/lib/commons-beanutils.jar
/WEB-INF/lib/commons-collections-2.0.jar
/WEB-INF/lib/commons-digester.jar
/WEB-INF/lib/commons-logging.jar
/WEB-INF/lib/commons-validator.jar
/WEB-INF/lib/jakarta-oro.jar
/WEB-INF/lib/struts.jar
/WEB-INF/classes/**/*.properties
/WEB-INF/classes/**/*.class

chris

----- Original Message -----
From: "Brian Topping" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, March 03, 2003 5:31 PM
Subject: Anyone using JBoss with custom validator rules?


Hi all,

I have Validator operational with two-password validation along the lines of
what is in the developer guide.  I've found that the custom validator
function can be found when the setup is running under standalone Tomcat
4.0.x, but not when that tomcat is running under JBoss, I get the attached
NoClassDefFoundError exception.  I've traced the cause of the exception down
to Line 367 of Validator.java v1.11:

     Method m = c.getMethod(va.getMethod(), paramClass);

The class that getMethod is operating on was loaded via
getClassLoader().loadClass() a dozen or so lines earlier. I presume the
problem then is not related to the class itself, but the method signature
classes.

I've checked a hundred times that the classpath is clean of everything but
the code in the nightly build.  There are no additional or incorrect
validator jars anywhere else on the classpath during compile or deployment,
which is what I am implying from the exception I am getting below.  I've
also
checked that the correct validator jar is in the JBoss deployment, inside
the
WAR file along with the rest of the correctly operating Struts jars.

It looks like an incompatibility at best from where I am right now...  Any
ideas appreciated.

Brian


java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.
java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:
2
80)
        at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
        at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
s
or.java:479)
        at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
        at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
...
Caused by: java.lang.NoClassDefFoundError:
org/apache/commons/validator/ValidatorAction
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:1627)
        at java.lang.Class.privateGetPublicMethods(Class.java:1655)
        at java.lang.Class.getMethod0(Class.java:1744)
        at java.lang.Class.getMethod(Class.java:963)
        at
org.apache.commons.validator.Validator.validateFieldForRule(Validator.java:3
9
3)
        at
org.apache.commons.validator.Validator.validateField(Validator.java:512)
        at
org.apache.commons.validator.Validator.validate(Validator.java:551)
        at
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:152)
        at
com.bill2.incamail.web.controller.DomainSetupAction.choosePlan(DomainSetupAc
t
ion.java:186)
        ... 42 more



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to