geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Perham (JIRA)" <>
Subject [jira] Commented: (GERONIMO-2693) Application classloader contains a massive number of duplicate classpath entries
Date Thu, 04 Jan 2007 16:30:27 GMT


Mike Perham commented on GERONIMO-2693:

You can easily print out your own classpath with this elegant hack.  :-)

	Enumeration e = Thread.currentThread().getContextClassLoader().getResources("META-INF");
	List entries = Collections.list(e);

> Application classloader contains a massive number of duplicate classpath entries
> --------------------------------------------------------------------------------
>                 Key: GERONIMO-2693
>                 URL:
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: kernel
>    Affects Versions: 1.1.1
>         Environment: WAS CE
>            Reporter: Mike Perham
>         Attachments: cpath.txt
> I have an EAR with an MDB jar and two WARs.  The EAR contains a large number of jars
within a lib directory.  The wars and ejb-jar all contain MANIFEST.MF Class-Path entries which
reference those jars within lib/.
> When I print out my WAR classpath, I get output attached.  The duplications don't really
matter all that much except for the duplications due to non-canonicalized paths:
> jar:file:/D:/perforce/depot/external/wasce/!/META-INF
> jar:file:/D:/perforce/depot/external/wasce/!/META-INF
> If I do a getResources("foo") and that gov-api jar has a foo resource, the system will
think there are two foo resources when in fact there is only one, due to different URLs for
the same resource.  As a result, for instance, this causes Apache Hivemind to blow up with
an error due to it thinking a component jar is doubly defined in the classpath.
> I'm unclear why Geronimo is adding all the lib jars to my classpath without my asking.
 It seems like the various J2EE modules should be able to control their own classpath wrt
jars in the ear.
> This is a blocker preventing us from using our application on WAS CE.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message