[jboss-user] [Beginners Corner] - ClassLoader.getSystemResource() failing in a jar inside a wa

neil1967 do-not-reply at jboss.com
Thu Apr 10 17:10:27 EDT 2008


Hello,

JBoss newbie here.  I have been handed a java web app to deploy on jboss 5.0.0.Beta4 with jdk 1.6.

In a class file inside a jar inside a war, the code calls ClassLoader.getSystemResource() to access a wsdl file.  The wsdl file is copied into the jar file in the directory meta-inf/wsdl.  Because of that, the call inside the class to the getSystemResource() method is passed the string passed "meta-inf/wsdl/filename.wsdl" but this fails to find the wsdl file.  The war file containing the jar file is dropped into the server/default/deploy directory on jboss, and inside the war, the jar is in the WEB-INF/lib directory.  

Here's what I tried:

1) changing where the wsdl gets copied to, setting it in the WEB-INF/lib directory where the jar is so that I just did ClassLoader.getSystemResource("filename.wsdl").  This doesn't work.

2) In the web.xml file that goes along with the web app, setting  to the <JBOSS_HOME>/server/default/deploy directory, where the war file is.  This doesn't work.

Any help would be great.  

Thanks!!

Neil

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

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



More information about the jboss-user mailing list