I would say it is a bug in the deployer that the servlet is loaded at all.
Why should a servlet in a jar without a deployment descriptor be deployed?

----- Original Message ----- 
From: "Robert Watkins" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, June 24, 2001 6:39 PM
Subject: [JBoss-user] Problem with classloader, servlets, and EARs.


> I'm hoping someone can shed some light on a problem I'm having. I have a EAR
> structured like somewhat this: (names changed to protect the innocent)
> 
> myApp.ear
>   |--- myLib.jar
>   |     |-- myServlet.class
>   |
>   |--- myWeb.war
>         |-- WEB-INF/web.xml
>         |-- WEB-INF/classes/myClass.class
> 
> 
> When myServlet.class loads, it tries to instantiate (by reflection) an
> instance of myClass. However, it gets a ClassNotFound exception.
> 
> My tentative guess at what's going on is that myServlet is being found by
> the classloader for the EAR. This doesn't have access to the contents of the
> WAR file, so it doesn't see the web classes. This implies that I need to get
> hold of the classloader for the web-application.
> 
> Does anyone have any idea on how to do this? I'm stuck.
> 
> (Yes, the code works fine if I move myClass.class out to myLib.jar, or if I
> move myServlet.class into the WAR. However, for various reasons, I don't
> want to do that)
> 
> Robert
> 
> -- 
> Robert Watkins
> Software Engineer
> 
> QSI Payments
> E-Payments Infrastructure - Secure Payments Solutions.
> ______________________________________________
> 
> Email:       [EMAIL PROTECTED]
> Tel:           +61 7 3210 2522
> DID:           +61 7 3224 9728
> Fax:           +61 7 3210 2566
> URL:           www.qsipayments.com
> Address:          Level 21
>                   300 Adelaide Street
>                   Brisbane
>                   Qld 4000
> 
> **    This message or any part of it is intended solely for the named     **
> **    addressee and contains privileged and confidential information.     **
> **  If you receive this message in error please notify QSI Payments by    **
> **   replying to the sender and removing the message from your computer.  **
> 
>  
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to