Each WAR has its own isolated classloader (by default). So classes in WAR1 are not visible in WAR2. If you want the classes to be visible to all WARs in that EAR then create an jar containing those classes and place that jar in the EAR/lib folder.
Thanx a lot! We thought so already. But we hoped to find a more simple solution than changing our whole application for that.
But anyway now we know which way we have to go.
But we hoped to find a more simple solution than changing our whole application for that.
Option#2 (which is really a workaround if fixing the application packaging is not feasible): The jboss-service.xml file under %JBOSS_HOME%/server/< serverName>/deploy/jboss-web.deployer/META-INF contains this:
<!-- A flag indicating if the JBoss Loader should be used. This loader uses a unified class loader as the class loader rather than the tomcat specific class loader. The default is false to ensure that wars have isolated class loading for duplicate jars and jsp files. --> <attribute name="UseJBossWebLoader">false</attribute>
You can change it to true.
Thanx again! That works too, so we can use it as workaround till we changed the packaging of our applications.