This content has been marked as final.
Show 4 replies
-
1. Re: ClassNotFoundException: EAR file containing multiple WAR
jaikiran Mar 18, 2009 6:02 AM (in response to aroeder)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.
-
2. Re: ClassNotFoundException: EAR file containing multiple WAR
aroeder Mar 18, 2009 6:12 AM (in response to aroeder)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.
Thanx again! -
3. Re: ClassNotFoundException: EAR file containing multiple WAR
jaikiran Mar 18, 2009 6:45 AM (in response to aroeder)"aroeder" wrote:
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. -
4. Re: ClassNotFoundException: EAR file containing multiple WAR
aroeder Mar 18, 2009 8:13 AM (in response to aroeder)Thanx again! That works too, so we can use it as workaround till we changed the packaging of our applications.