I have an ear application with entity,business and web modules.
<application ...>
<module>
<ejb>foo.par</ejb>
</module>
<module>
<ejb>bar.ejb3</ejb>
</module>
<module>
<web>
<web-uri>baz.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.