Two Laptop Bag
The moose likes JBoss and the fly likes War depending on War -classpath issues Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » JBoss
Reply 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: 973
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
Ranch Hand

Joined: Mar 31, 2009
Posts: 222
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 (and free)
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 973
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
Ranch Hand

Joined: Mar 31, 2009
Posts: 222
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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: War depending on War -classpath issues
 
Similar Threads
Urgent: cannot find property file in war when packaged in ear
Maven - Compile dependency on Jar(s) inside EAR
strange things happen - Non matching type for @Inject of setter:
Maven question: test-ear or test-war
Is a standalone war file treated as part of a "master" web-app?