[jboss-user] [Installation, Configuration & DEPLOYMENT] - ClassLoading Problem

stemccann do-not-reply at jboss.com
Tue Aug 4 09:37:48 EDT 2009

I have been looking at a problem which has me completely stumped. I know there is a lot of information out there regarding ClassLoading and I have read most of it. Anyway here is my problem :

I am using jboss 4.2.1, I had an EAR containing an EJB file and a WAR file.

When I deployed this it all worked fine, but, as the EAR was getting a bit big I decided to deploy the EJB and WAR files separately. I applied the relevant changes to allow the WAR to access the EJB remotely as this is now a separate application, this worked for any JSP that didn't have a reference to a shared JAR.

I then removed the JAR from the WAR as it seemed that having two versions (though identical) created a problem. I assumed that this was to do with there being two ClassLoaders. Again this seemed to solve some of the problems which brings me to the crux of the problem.

I have a JAR that is shared between the EJB and the WAR, when I access the via the EJB there is no problem as the JAR is packaged with the EJB.
When I access via the WAR I get strange behaviour, some of the classes are accesed ok (possibly the ones that the EJB has already accessed) but others are not accessable and give a Servlet.service() for servlet jsp threw exception
java.lang.ClassNotFoundException: error then the page is accessed (when other pages have already accessed the package sucessfully ?????).

I am sort of convinced that the problem is something to do with the two classloaders but I can't seem to resolve the problem.

Any help would be really appriciated as  I am losing the will to live. Surely it isn't this difficult or maybe I am an idiot.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247860#4247860

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247860

More information about the jboss-user mailing list