[jboss-user] [Beginners Corner] - how to package ear and lib, classloader issue
javatwo
do-not-reply at jboss.com
Mon Feb 25 11:06:28 EST 2008
I have an ear application with entity,business and web modules.
<application ...>
foo.par
bar.ejb3
<web-uri>baz.war</web-uri>
<context-root>/</context-root>
The .par, .ejb3 and war files use classes in common.jar. I put the common.jar under /server/default/lib.
In the common.jar,
String className = System.getProperty("FooClassName");
Class.forName(className).newInstance();
trying to instantiate the 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 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?
Thanks for any help.
Dave
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4131916#4131916
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4131916
More information about the jboss-user
mailing list