jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre CARION <pierrecar...@yahoo.com>
Subject Re: NoSuchMethodError in JUnitVersionHelper constructor
Date Sat, 24 Aug 2002 18:45:06 GMT
Hi Fred,

I am not sure that I can really fix your problem , I just want
to give you the result of my investigations on your problem ...

Are you using Junit 3.7 ? 

This question because if you look in JunitVersionHelper.java, 
you see that there is a class initializer
with calls getName() on junit.framework.TestCase , but this
method exists only with JUnit 3.7 ... The code is supposed to catch
the NoSuchMethodException to gracefully manage previous release 
of JUnit ... 
As there is an aspect defined for each calls to method calls (see
LogAspect.java) to log the entry and exit to each call , this
aspect *may* be confused by the exception (not sure about that !).

Another check : 
do you have commons-logging-1.0.jar in your classloader ? 
This is the *new in 1.4* logging mechanism used .

You can try to add log4j.jar in the classloader and try to activate 
the logs by configuring log4.properties or log4j.xml : you may
then hopefullt get interesting information in the logs !

The *weird* stack trace, is related to the use of AspectJ and
you'll find a description of this trace at the end of this document:



--- Fred Loney <loney@spiritedsw.com> wrote:
> Running cactus 1.4 produces the message:
> : Exception in constructor: testCreate (java.lang.NoSuchMethodError
>  at
> va;org/apache/cactus/util/log/LogAspect.java(1k):73)
>  at
> org.apache.cactus.AbstractTestCase.<init>(AbstractTestCase.java:124)
>  at
> )
>  at
> org.apache.cactus.ServletTestCase.<init>(ServletTestCase.java:119)
> ...
> The method testCreate exists in the test class. The test case runs
> under cactus 1.2. Failure occurs after upgrade to cactus 1.4. All
> configs
> and deployment libs painstakingly verified. This is perhaps yet
> another
> manifestation of the Curse of the Clever Classloader: every new
> release
> of a tool that uses clever introspection tricks invariably breaks a
> non-trivial enterprise deployment in some extremely subtle manner
> because of classloader conflicts. This necessitated a 3-day bug hunt
> for myself and others when upgrading to cactus 1.2. I have a
> perfectly
> normal deployment, with perhaps one hitch: aspectjrt.jar is used in
> the
> webapp classloader rather than the web classloader. cactus.jar and
> the
> non-aspect dependent jars are in the web classloader.
> A starting point is to understand exactly where this message
> originated:
> a log message, a wrapped exception, a junit assertion, a
> NoSuchMethodError trace? What does the parenthesized line signify
> (it's
> not a standard stack trace line)? What does (1k) in
> LogAspect.java(1k)
> signify? Why is the fatal error tagged as a warning? How can I
> configure
> cactus so that it prints a normal stack trace?
> Any clues to help isolate the cause are appreciated.
> --
> To unsubscribe, e-mail:  
> <mailto:cactus-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:cactus-user-help@jakarta.apache.org>

Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes

To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>

View raw message