2 Replies Latest reply on May 8, 2007 10:30 AM by Michel Robert

    Generate JBossWS Artifacts: Error occurs

    Michel Robert Newbie

      Hello,

      When I attempt to generate JBossWS Artifacts, a NullPointerException
      occurs upon a call to handleWSDLToJavaGeneration(...).

      I've looked on line for clues to this behavior, and found several references to this problem. The only 'suggested fix' is to make sure that wstools-config.xml is in the path.

      Although it does look like the problem is a "file not found" type-of-error, I do not understand why JBossWS would have any trouble finding a temporary file it created (wstools-config49256.xml). So perhaps the problem is elsewhere?

      Any ideas? It looks like this problem has been encountered before, and the solution is probably something really simple!


      Below is the log that is displayed in the console window:

      Running JBossWS wstools for [HelloWorld]
      directory: E:\java\jboss-4.0.5.GA\bin
      command: cmd.exe /C wstools.bat -config C:\DOCUME~1\MRS\LOCALS~1\Temp\wstools-config49256.xml -dest E:\java\Eclipse4Jbossws\workspace\mm3\src
      =============================================="
      .
      WSTools Environment
      .
      JBOSS_HOME: E:\java\jboss-4.0.5.GA\bin\\..
      .
      JAVA: E:\java\jdk6\bin\java
      .
      JAVA_OPTS:
      .
      ==============================================="
      .
      Exception in thread "main" java.lang.NullPointerException
      at java.io.File.(File.java:222)
      at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:282)
      at org.jboss.ws.tools.WSTools.process(WSTools.java:137)
      at org.jboss.ws.tools.WSTools.generate(WSTools.java:69)
      at org.jboss.ws.tools.WSTools.generate(WSTools.java:119)
      at org.jboss.ws.tools.WSTools.main(WSTools.java:58)


      This is wstools-config49256.xml (formatted for legibility):
      ===============================================
      <?xml version="1.0" encoding="UTF-8"?>
      <jbos:configuration xmlns:jbos="http://www.jboss.org/jbossws-tools">
      <jbos:wsdl-java file="C:\DOCUME~1\MRS\LOCALS~1\Temp\tempdir49257.tmp\HelloWorld.wsdl" unwrap="true">
      <jbos:mapping file="jaxrpc-mapping.xml"/>
      </jbos:wsdl-java>
      </jbos:configuration>

        • 1. Re: Generate JBossWS Artifacts: Error occurs
          Ole Matzura Novice

          Hi,

          which jbossws version are you using?

          /Ole
          eviware.com

          • 2. Re: Generate JBossWS Artifacts: Error occurs
            Michel Robert Newbie

            Below I have listed all the 'configuration/installation' items that I could think of. Please let me know if I've forgotten something. Thanks!

            When Attempting to Generate JBossWS Artifacts, the arguments used are:
            + Use cached WSDL = YES
            + Mapping file = jaxrpc-mapping.xml
            + Unwrap = YES
            + Namespace Mapping = urn:jbosstest

            My Configuration is as follows:
            JBoss 4.0.5.GA
            JBossWS 1.2.1.GA
            JBossIDE 2.0.0.Beta2 (includes Eclipse)
            Java EE SDK 5-02

            To install JBossWS, I unpacked jbossws-1.2.1.GA.zip into E:\JBOSSWS\ and then followed the direction in Install.tx:

            1.) Copy ant.properties.examples to ant.properties
            2.) Modify the target container location in ant.properties, which gives me:

            # Optional JBoss Home
            jboss40.home=e:/java/jboss-4.0.5.GA
            # The JBoss server instance
            jboss.server.instance=default

            3.) Execute: ant deploy-jboss40

            Below is the console output generated by ant:

            Microsoft Windows 2000 [Version 5.00.2195]
            (C) Copyright 1985-2000 Microsoft Corp.

            E:\java\JBOSSWS>ant
            Buildfile: build.xml

            BUILD SUCCESSFUL
            Total time: 0 seconds
            E:\java\JBOSSWS>ant deploy-jboss40
            Buildfile: build.xml

            prepare:

            deploy-jboss40:
            [copy] Copying 10 files to E:\java\jboss-4.0.5.GA\client
            [copy] Copying 3 files to E:\java\jboss-4.0.5.GA\server\default\lib
            [delete] Deleting directory E:\java\jboss-4.0.5.GA\server\default\deploy\jbos
            sws.sar
            [mkdir] Created dir: E:\java\jboss-4.0.5.GA\server\default\deploy\jbossws.sa
            r
            [unjar] Expanding: E:\java\JBOSSWS\install\integration-jboss40\jbossws40.sar
            into E:\java\jboss-4.0.5.GA\server\default\deploy\jbossws.sar
            [copy] Copying 1 file to E:\java\jboss-4.0.5.GA\client
            [copy] Copying 1 file to E:\java\jboss-4.0.5.GA\lib
            [delete] Deleting directory E:\java\jboss-4.0.5.GA\server\default\deploy\judd
            i-service.sar
            [mkdir] Created dir: E:\java\jboss-4.0.5.GA\server\default\deploy\juddi-serv
            ice.sar
            [unzip] Expanding: E:\java\JBOSSWS\install\thirdparty\juddi-service.sar into
            E:\java\jboss-4.0.5.GA\server\default\deploy\juddi-service.sar

            BUILD SUCCESSFUL
            Total time: 3 seconds
            E:\java\JBOSSWS>

            Michel