[jboss-user] [Beginners Corner] - Re: A new understanding of ClassLoaders...

2007-02-27 Thread dkrleza
OK, this is very good topic which explains a lot to those who are using using MVC patterns and multiple WEB modules per enterprise application. You need to place MVC library into WEB-INF/lib of every module. If you don't do so and use your MVC library as utility jar inside enterprise application

[jboss-user] [Beginners Corner] - Re: A new understanding of ClassLoaders...

2007-02-23 Thread mbabauer
I have tried to lick problem every which way from Sunday, but I keep running into the same classloader problems trying to find either classes or the Spring contexts. Riddle me this, Batman: What is the recommended route for deploying a single, self-contained EAR housing a shared DAO layer and

[jboss-user] [Beginners Corner] - Re: A new understanding of ClassLoaders...

2007-02-22 Thread PeterJ
Sorry, but without knowing more details about the relationships among your classes in the various jar files, I really cannot answer your last question. There is something you might try to learn a little more about what is going on: start the JVM passing it the -verbose:class option. This causes

[jboss-user] [Beginners Corner] - Re: A new understanding of ClassLoaders...

2007-02-22 Thread mbabauer
Your right! Guess I should read better. Earlier I had it complaining about the componentContext.xml when I had it sitting in the EAR. I think I know whats happening, at least with the applicationContext.xml... Even though the ContextLoaderListener is started from the web.xml, it seems that t

[jboss-user] [Beginners Corner] - Re: A new understanding of ClassLoaders...

2007-02-22 Thread PeterJ
Now I am confused. Your text seems to imply that applicationContext.xml is OK but componentContext.xml cannot be found. But the error message states that applicationContext.xml is not found, and since you indicate this file is located in the WAR file, I would not expect Spring to find this fil

[jboss-user] [Beginners Corner] - Re: A new understanding of ClassLoaders...

2007-02-22 Thread mbabauer
This is were my confussion lies. In my example I have 4 units: - HG-DataAccess.jar, which has the DOAs (model) and a spring context called componentContext.xml defining the "parent" context for Spring, and a beenRefFactory.xml that setups up the DataSources and all the hibernate stuff, in the

[jboss-user] [Beginners Corner] - Re: A new understanding of ClassLoaders...

2007-02-22 Thread PeterJ
Not quite. Things in the WAR can see everything, but nothing can see into the WAR. Other than that, everybody can see everybody else. Everything in the lib, deploy, ear, sar are in the same class repository (thus they all have visibility to each other) by default, though you can configure an ea

[jboss-user] [Beginners Corner] - Re: A new understanding of ClassLoaders...

2007-02-22 Thread mbabauer
So, let me see if I can sum up what you are saying. Stuff in the JBoss lib and the server lib "should" be visible globally (JBoss lib across all servers, server lib across just that server), and things in the EAR should be visible to everything in the EAR *Except* the WAR(s). This leads into a

[jboss-user] [Beginners Corner] - Re: A new understanding of ClassLoaders...

2007-02-22 Thread PeterJ
You have to be very careful on who is is invoking whom. Spring tends to want to instantiate classes, and if those classes are defined in your war file, then unless you place the Spring jars in your war file, it will not be able to see them. What I have been able to do is place all of the classes