Olaf Bergner wrote:
-----Original Message----- From: Fernando Padilla [mailto:[EMAIL PROTECTED] Sent: Monday, December 29, 2003 8:45 PM
This LinkageError is really annoying, becuase we can't use the Unit testing to the fullest. Does anybody have any idea what is going wrong?
No, unfortunately not. I have been struggling with this problem for quite a few days and found absolutely nothing.
I went and added the maven.pom.dependeies from merlin/kernel/servlet, but nothing changed.
After reading the JDK api-docs for java.lang.LinkageError:
Subclasses of LinkageError indicate that a class has some dependency on another class; however, the latter class has incompatibly changed after the compilation of the former class.
I decided on completely rebuilding absolutely everything. I erased my merlin sources, made a fresh CVS checkout, rebuilt and reinstalled. After that, I updated my merlin-related dependencies, cleaned my project's target directory and rebuilt. Same error. Very strange.
That's what getting me - this does not make sense.
I am just guessing here, but could it be that on a second merlin startup -
if given a custom classloader via InitialContext - a subset of merlin's
internal classes is loaded via a classloader different from the classloader
used during the first startup? Also, the situation is different from merlin
standalone in that the JVM "survives" the shutdown and restart of the
kernel. So some of merlin's classes might remain loaded, whereas others
might be actively and explicitely reloaded by merlin during restart,
ultimately leading to this LinkageError. But then again I know very little
about classloading issues and could be completely off track. If it's a
classloading issue at all.
Its a classloader issue - the thing I would like to confirm if this is specific to the maven/unit-test scenario or not. Also, what is similar about your cases (Olaf case + Fernando case) that is different from the Merlin unit test scenario. Getting that nailed down is the first step to figuring this one out.
Stephen.
--
Stephen J. McConnell mailto:[EMAIL PROTECTED]
|------------------------------------------------| | Magic by Merlin | | Production by Avalon | | | | http://avalon.apache.org/merlin | | http://dpml.net/ | |------------------------------------------------|
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
