Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

class loading issue in Jboss

 
Abhijeet Vaidya
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Abhijeet
[ July 25, 2007: Message edited by: Abhijeet Vaidya ]
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See if this helps
 
Abhijeet Vaidya
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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.

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic