0 Replies Latest reply on Aug 27, 2014 7:04 AM by petivagyoken

    Classloader for jars inside JBoss 5.1.0GA lib/endorsed

    petivagyoken

      I have any application under Jboss 5.1.0GA that uses JDK 1.6.

      Apparently deploying web services in this case is not that easy I had to copy some libs from /client folder to the lib/endrosed folder to resolve some NoClassDefFoundErrors.

      I've copied most ofthe JBOSS Core WS libs as suggested here:

      https://community.jboss.org/message/619833?_sscc=t

      And the NoClassDefFoundErrors were resolveds however now I'm getting a Nullpointer exception when trying to run the web service at:

      java.lang.NullPointerException at org.jboss.ws.core.utils.JBossWSEntityResolver$1.run(JBossWSEntityResolver.java:80) at org.jboss.ws.core.utils.JBossWSEntityResolver$1.run(JBossWSEntityResolver.java:78) at java.security.AccessController.doPrivileged(Native Method) at org.jboss.ws.core.utils.JBossWSEntityResolver.loadEntitiesMappingFromClasspath(JBossWSEntityResolver.java:76) at org.jboss.ws.core.utils.JBossWSEntityResolver.<init>(JBossWSEntityResolver.java:59) at org.jboss.ws.core.utils.JBossWSEntityResolver.<init>(JBossWSEntityResolver.java:51) at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:105) at org.jboss.ws.metadata.umdm.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:293) at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaData(JAXWSClientMetaDataBuilder.java:84) at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.<init>(ServiceDelegateImpl.java:138) at org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:63) at javax.xml.ws.Service.<init>(Service.java:56) ...

      The line that throws the nullpointer is:

      InputStream is = this.getClass().getClassLoader().getResourceAsStream(entitiesResource);

      It almost seems like that:

      this.getClass().getClassLoader()

      returns null. And this is obviously a core JBOSS web service class.

      Also this is the class that throws the exception in detail:

      http://www.docjar.org/html/api/org/jboss/ws/core/utils/JBossWSEntityResolver.java.html

      Is there any way I can resolve this?

      Thank you very much!