how to package common lib and ear file

2008-02-25 Thread Dave
I have an ear application with entity,business and web modules.
  application ...
  module
  ejbfoo.par/ejb
/module
  module
  ejbbar.ejb3/ejb
/module
  module
web
web-uribaz.war/web-uri
context-root//context-root
/web
/module
  /application

  The .par, .ejb3 and war files use classes in common.jar.  I put the 
common.jar under JBOSS/server/default/lib.
   
  In the common.jar,  
   
  String className = System.getProperty(FooClassName);
Class.forName(className).newInstance();
   
  trying to instantiate the class package.Foo that is defined in web module 
inside the ear file,  throws a exception:
   
   java.lang.ClassNotFoundException: No ClassLoaders found for: package.Foo
   
  the class package.Foo is application specific and  can not be put into 
common.jar that is a common library. However the common lib needs to 
instantiate the application specific class.
   
  How to solve this issue?   is classloader the answer? 
  
Thanks for any help.
Dave


   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

Re: how to package common lib and ear file

2008-02-25 Thread David Delbecq
Classes shared between webapps go in shared/ folder. server/ folder is 
for server specific (invisible to webapps) classes.


PS: that information is for tomcat, since you seem to use jboss, you 
better ask jboss mailing list, as jboss might use different folders


Dave a écrit :

I have an ear application with entity,business and web modules.
  application ...
  module
  ejbfoo.par/ejb
/module
  module
  ejbbar.ejb3/ejb
/module
  module
web
web-uribaz.war/web-uri
context-root//context-root
/web
/module
  /application

  The .par, .ejb3 and war files use classes in common.jar.  I put the common.jar 
under JBOSS/server/default/lib.
   
  In the common.jar,  
   
  String className = System.getProperty(FooClassName);

Class.forName(className).newInstance();
   
  trying to instantiate the class package.Foo that is defined in web module inside the ear file,  throws a exception:
   
   java.lang.ClassNotFoundException: No ClassLoaders found for: package.Foo
   
  the class package.Foo is application specific and  can not be put into common.jar that is a common library. However the common lib needs to instantiate the application specific class.
   
  How to solve this issue?   is classloader the answer? 
  
Thanks for any help.

Dave


   
-

Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]