wood burning stoves
The moose likes JBoss/WildFly and the fly likes class loading issue in Jboss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "class loading issue in Jboss" Watch "class loading issue in Jboss" New topic

class loading issue in Jboss

Abhijeet Vaidya

Joined: Apr 16, 2007
Posts: 20
I am using an ear deployment on Jboss portal 2.4 (App server is 4.0.5) and my application refers to 2 third party jars. These third party jars refers to System classloader by using ClassLoader.getSystemClassLoader(). So it is necessary to load these 2 third party jars using System class loader to make it work properly. When I deploy the ear to jboss , by default these jar files are loaded using "WebAppLoader" of Jboss and program execution halts at one point where third party jars compare it's class loader with system class loader, since comparison result is false. Is there any way by which these jars are put in either server configuration directory (e.g. <jboss-home>/server/default) or any of its sub directories and can be loaded using System class loader.

Thanks in advance.
[ July 25, 2007: Message edited by: Abhijeet Vaidya ]
Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441

See if this helps

[My Blog] [JavaRanch Journal]
Abhijeet Vaidya

Joined: Apr 16, 2007
Posts: 20

My problem is solved now. I can load the third party jars residing in WEB-INF/lib, using system classloader by dynamically modifying the class path. Credit goes to this.. I hope that System classloader behavior (extending URl ClassLoader) will be the same across platforms.

I agree. Here's the link: http://aspose.com/file-tools
subject: class loading issue in Jboss
jQuery in Action, 3rd edition