Try using the following call instead (I use a similar call to make
sure I'm pulling in the right jndi.properties file):

        URL url = getClass().getResource(fileName); 

        HTH.

---
Michael R. Maraya

> ----------
> From:         Leonard Kierstead[SMTP:[EMAIL PROTECTED]]
> Reply To:     [EMAIL PROTECTED]
> Sent:         Tuesday, July 10, 2001 5:21 PM
> To:   '[EMAIL PROTECTED]'
> Subject:      [JBoss-user] ClassLoader not finding resource
> 
>  
> When my application is running as a service under JBoss the ClassLoader
> can't
> find a resource (an XML file) that is in one of my application jar files.
> The following
> code returns null.
>  
>     java.net.URL url = ClassLoader.getSystemResource(fileName);
>  
> It works fine outside of JBoss.  The resource is in a jar file that is in
> both the 
> lib/ext directory and in my .ear file.
>  
> Thanks for any help,
>  
> Leo
> 

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

Reply via email to