Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-946

wstools leads to NullPointerException in URLClassPath.java:316

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • jbossws-1.0.1
    • jbossws-1.0.0
    • tools-jaxrpc
    • None

      I used wstool.bat as described in the user guide of JBoss WS:

      wstools -cp E:\tests\java_class -config E:\tests\java_src\jbossws\config.xml

      This leads to:

      Exception in thread "main" org.jboss.xb.binding.JBossXBRuntimeException: Failed
      to create a new SAX parser
      at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:100)
      at org.jboss.ws.tools.config.ToolsSchemaConfigReader.readConfig(ToolsSchemaConfigReader.java:131)
      at org.jboss.ws.tools.WSTools.readToolsConfiguration(WSTools.java:139)
      at org.jboss.ws.tools.WSTools.generate(WSTools.java:79)
      at org.jboss.ws.tools.WSTools.main(WSTools.java:61)
      Caused by: org.jboss.xb.binding.JBossXBException: Failed to create a new SAX parser
      at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.<init>(SaxJBossXBParser.java:69)
      at org.jboss.xb.binding.UnmarshallerImpl.<init>(UnmarshallerImpl.java:57)
      at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:96)
      ... 4 more
      Caused by: java.lang.NullPointerException
      at sun.misc.URLClassPath$3.run(URLClassPath.java:316)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.misc.URLClassPath.getLoader(URLClassPath.java:313)
      at sun.misc.URLClassPath.getLoader(URLClassPath.java:290)
      at sun.misc.URLClassPath.findResource(URLClassPath.java:141)
      at java.net.URLClassLoader$2.run(URLClassLoader.java:362)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findResource(URLClassLoader.java:359)
      at java.lang.ClassLoader.getResource(ClassLoader.java:977)
      at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1159)
      at org.apache.xerces.parsers.SecuritySupport$6.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.apache.xerces.parsers.SecuritySupport.getResourceAsStream(Unknown Source)
      at org.apache.xerces.parsers.ObjectFactory.findJarServiceProvider(Unknown Source)
      at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
      at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
      at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
      at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
      at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.<init>(Unknown Source)
      at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown Source)
      at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source)
      at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.<init>(SaxJBossXBParser.java:65)
      ... 6 more

      If I remove the -cp parameter and call "set WSTOOLS_CLASSPATH=E:\tests\java_class", it seems to work. At least I get a webservices.xml, jaxrpc-mapping.xml and a WSDL.

              jgreene@redhat.com Jason Greene
              stretchnail_jira Stefan Recknagel (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: