Classloader Diffculties with JBoss

Classloader Diffculties with JBoss

When you deploy two Web applications as Web archives (WARs) into JBoss’ deploy folder, you expect them to run independently of each other. But this does not happen.

WebApp1.war  + WEB-INF     + lib        + abc_v1.0.jar     + classes        +  + WEB-INF     + lib        + abc_v1.1.jar     + classes        +

If you deploy the two Web applications in the above structure, one of them will break. This is because JBoss/Tomcat5 classloading mechanism’s class loader is used by all applications?even when they are in different WAR files.

The solution is to change the deployjbossweb-tomcat50.sarMETA-INFjboss-service.xml file. If you change the UseJBossWebLoader attribute to false, a different classloader will be used for different WAR files.

See also  Digital Signage Solutions for Agile Software Development Teams

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist