J2EE Packaging - Error Loading WebAppClassLoader
I have seen variations of this theme in the forum, but I am not quite sure if the solutions apply to my situation.
I have a Java Web Start app deployed and sort of running on JBoss A/S.
I have treated the Web Start app as a web app and the following is my ear file layout: (I will eventually have MDBs)
META-INF\application.xml
META-INF\MANIFEST.MF
mysql-connector-java-3.1.12-bin.jar
qsender.jar (just a standalone test app)
totalvu-servlet.jar - database access servlet
totalvu.war (the web start app's jar is in here)
The war file layout:
META-INF\MANIFEST.MF
WEB-INF\lib\jardiff.jar
WEB-INF\lib\jnlp-servlet.jar
WEB-INF\lib\jnlp.jar
WEB-INF\jboss-web.xml (inconsequential at this point)
WEB-INF\web.xml
totalvu.jar (the web start app's main, etc)
totalvu.jnlp
index.html
shared.jar
common.jar (servlets wants some of these classes)
utilities.jar
moreshared.jars (you get the idea)
The problem is that inside totalv-servlet.jar there is a servlet that my web start app uses to access a database. This servlet needs to know about some shared classes, so I wanted to keep the servlet jar in the ear file as shown above. Seems like all the docs say that servlets have to go in the WEB-INF\classes folder as loose classes. This seems to be ok if the servlet is to support your canonical web app, but that isn't what I have.
I have the proper entries in application.xml and web.xml. I actually had this working long enough to fully test the servlet for 3 days and then I started getting "Error Loading WebAppClassLoader" errors during deployment. The class loader for the web app cannot find the servlet that I have defined in the web.xml file even though the app server found it and deployed it along with every other module I had defined in the application.xml file. The app server marked the serlet as unavailable. huh? I am going to guess that the fact that it was working for a while was an anomoly and probably caused by the app server or web start caching something that I didn't realize.
There must be someone else who has solved this problem before. Where should this database access servlet go, which is used by classes in totalvu.jar?
Is this totalvu-servlet.jar considered an "Optional Package"? I hope not.
Thanks in advance, and by the way, I am the only developer on a rather large (humungous) J2EE application so I am basically working in a vaccum here. :)
Thanks in advance for any help.

