Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

War depending on War -classpath issues

 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 251
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 251
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic