You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Dennis Cartier <de...@gmail.com> on 2006/08/30 16:30:32 UTC

Geronimo 1.1 Classloader Documentation

Is there any documentation available on the G 1.1 classloader behaviour?

I am stuck trying to resolve what I suspect are classloader issues
while trying to separate applications into CAR files. If I could
understand the G 1.1 classloader implementation and the options that
affect its behaviour, I could hopefully figure a way out of my current
situation.

Can anyone point me to where the G 1.1 classloader is documented?

Dennis

Re: Geronimo 1.1 Classloader Documentation

Posted by Dennis Cartier <de...@gmail.com>.
On 8/30/06, Aaron Mulder <am...@alumni.princeton.edu> wrote:
> What kind of module arrangement do you have?  What kind of problems
> are you running into?

I have a WAR file that has a dependency on a CAR file that contains
the my ACEGI classes. Both the WAR and CAR list Spring 1.2.8 as a
dependency as they both contain classes that use Spring. When I deploy
I get:

Error:
org.springframework.beans.TypeMismatchException: Failed to convert
property value of type [org.springframework.web.util.CookieGenerator]
to required type [org.springframework.web.util.CookieGenerator] for
property 'cookieGenerator'

This seems very odd as both the WAR and CAR are using the same version
of Spring (1.2.8) so I would expect that even if they are seeing the 2
instances of the Spring classes, they are the same version, so it
should work?

While trying to find a combination of options that might resolve this,
I tried adding a filter for the org.springframework classes to the CAR
file just in case a different version of Spring was being inherited
from Geronimo. This resulted in a java.lang.LinkageError being thrown
instead. I had a look at the Geronimo libs but was unable to find any
other version of Spring that might be getting used instead of the
version being requested through the dependency.

Dennis

Re: Geronimo 1.1 Classloader Documentation

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
There's a bit here:

http://chariotsolutions.com/geronimo/geronimo-1.1/elements-classloaders.html

Basically, every module except an EAR gets a single class loader.  Any
JAR dependencies are added to that class loader.  Any module
dependencies have their class loaders added as parents to that class
loader (so we change the normal Java routine of only one parent per
class loader).

EARs may have multiple class loaders -- one main one for all the EJB
and RAR modules, and then in addition one for each web application in
the EAR, which is a child of the main one.

There are also options on each module to prevent certain classes from
being loaded from the parents, or force certain classes to be loaded
from the parents, as well as to reverse the normal parent-first class
loading behavior and search the current class loader before parents.

What kind of module arrangement do you have?  What kind of problems
are you running into?

Thanks,
    Aaron

On 8/30/06, Dennis Cartier <de...@gmail.com> wrote:
> Is there any documentation available on the G 1.1 classloader behaviour?
>
> I am stuck trying to resolve what I suspect are classloader issues
> while trying to separate applications into CAR files. If I could
> understand the G 1.1 classloader implementation and the options that
> affect its behaviour, I could hopefully figure a way out of my current
> situation.
>
> Can anyone point me to where the G 1.1 classloader is documented?
>
> Dennis
>