2 Replies Latest reply on Apr 14, 2008 10:30 AM by Neil Kessler

    ClassLoader.getSystemResource() failing in a jar inside a wa

    Neil Kessler Newbie

      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