On 8/5/05, Jonathan J. Vargas R. <[EMAIL PROTECTED]> wrote:
> To play the last chance, I tried placing activation.jar in
> <tomcat>/common/lib, and leaving xmlsec.jar first on shared/lib and
> later in webapps dir, as expected, they also didn't work.

It should work with both on <webapp>/WEB-INF/lib

> According to the code in happyaxis.jsp, when invoking its method
> needClass(String className) it is throwing NoClassDefFoundError
> exception. If it were unable to find the class, it will lauch a
> ClassNotFoundException (method classExists(String className) in
> happyaxis.jsp), right? It finds the class but it has a wrong class
> definition or doesn't exist (according with doc found about java api).

NoClassDefFoundError means "a class that was there on compile time
isn't there at runtime". For example, if you have a class A that
imports class B, and class B has a static initializer, and there's an
exception in said initializer, class B won't be loaded at all
(ExceptionInInitializerError). Then, if you try to use A you'll get a
NoClassDefFoundError because B isn't there and should be.

I tried with a clean axis install on tomcat 5.0.28. These are the jars
on the WEB-INF/lib directory of the webapp:

activation.jar
<my own app>.jar
axis-ant.jar
axis.jar
commons-discovery-0.2.jar
commons-logging-1.0.4.jar
jaxrpc.jar
log4j-1.2.9.jar
saaj.jar
wsdl4j-1.5.1.jar
xmlsec-1.2.1.jar

Happyaxis says it's ok except for attachments since I didn't provide
mail.jar. Check your shared and common lib dirs for stale jars. 99% of
the time it's better to not have anything on those dirs. The only jar
I use outside the app's WEB-INF/lib dir is usually the jdbc driver so
that I can use the tomcat built-in connection pools. Everything else
goes in the webapp dir. A stale/mismatched version in common or shared
lib dirs can break your app.

-- 
Javier Gonzalez Nicolini

Reply via email to