aspose file tools*
The moose likes JBoss/WildFly and the fly likes War depending on War -classpath issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "War depending on War -classpath issues" Watch "War depending on War -classpath issues" New topic
Author

War depending on War -classpath issues

A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
Hi,

I have a ear where in war A depends on war B for few classes.....and i use Eclipse ide for setting up the ear..
when i deploy it ..the war B loads properly but ,,War A gives error,,and the exception is classnot found...its not able to find the classes referenced from war b.

Any idea to resolve this..

Regards
Kees Jan Koster
JavaMonitor Support
Rancher

Joined: Mar 31, 2009
Posts: 251
    
    5
Dear Kumar,

WAR files must be self contained and cannot depend on each other. So your design is flawed. Just because it works in Eclipse does not make it up to spec. Change the structure of your code to put the common classes in a JAR in WEB-INF/lib for each WAR.

Kees Jan


Java-monitor, JVM monitoring made easy <- right here on Java Ranch
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
But it runs in Websphere app server 6.1. what i want to know is how to make it ...run on jboss 4.2.x
Kees Jan Koster
JavaMonitor Support
Rancher

Joined: Mar 31, 2009
Posts: 251
    
    5
In that case WebSphere is not adhering to the JEE spec. So your design was flawed and WebSphere failed to point that out to you.

Put the shared classes in a JAR in WEB-INF/lib in each WAR. File a bug report for WebSphere.

Kees Jan
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: War depending on War -classpath issues