3 Replies Latest reply on Mar 7, 2007 5:18 PM by monowai

    NullPointerException with JBossWS1.0.4GA and JBoss 4.0.5

    Meghana Joglekar Novice

      I have installed JBossAS 4.0.5GA and JBossWS's latest release I found on the site 1.0.4.GA. I followed the installation instructions given in install.txt under JBossWS.

      In order to install JBossWS the following steps are necessary:

      1.) Copy lib/jbossws-client.jar to $JBOSS_HOME/client/
      2.) Unzip lib/jbossws.sar to $JBOSS_HOME/server/default/deploy/
      3.) Replacing jboss-xml-binding.jar

      You need to manually replace the jboss-xml-binding.jar in the $JBOSS_HOME/client and $JBOSS_HOME/lib directories.
      The compatible release can be found here: http://repository.jboss.com/jboss/jbossxb/1.0.0.CR7

      On running wstools for my wsdl files I get following exception -
      Exception in thread "main" java.lang.NullPointerException
      at java.io.File.(File.java:194)
      at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(Too
      at org.jboss.ws.tools.WSTools.process(WSTools.java:138)
      at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
      at org.jboss.ws.tools.WSTools.main(WSTools.java:61)

      My wstools.xml looks like this -

      <?xml version="1.0"?>
      <configuration xmlns="http://www.jboss.org/jbossws-tools">
       <package-namespace package="org.jbpm.bpel.tutorial.hello"
       namespace="http://jbpm.org/examples/hello" />
       <package-namespace package="org.jbpm.bpel.tutorial.hello"
       namespace="http://www.eclipse.org/alf/schema/EventBase/1" />
       <wsdl-java file="file://D:/jbpm-bpel-1.1.Beta3/examples/hello/target/resources/web/wsdl/hello-service.wsdl">
       <mapping file="jaxrpc-mapping.xml" />

      The reason for having full path there is to make sure that the problem wasn't related to relative path which was 'wsdl/hello-service.wsdl'

      My hello.wsdl looks like this -
      <?xml version="1.0" encoding="UTF-8"?>
      <definitions targetNamespace="http://jbpm.org/examples/hello"
       <import namespace="http://www.eclipse.org/alf/schema/EventBase/1" location="resources/xml/ALFEventManagerSOAP.wsdl" />
       <!-- characterizes the relationship between the greeter and its caller -->
       <plt:partnerLinkType name="Greeter-Caller">
       <plt:role name="Greeter">
       <plt:portType name="evt:ALFServiceFlowWithReply" />
       <!-- the Caller does not provide services to the Greeter,
       this is why we omit the "Caller" role -->

      and my ALFEventManagerSOAP.wsdl is located under that relative path 'resources/xml'.

      Please let me know what is wrong here. Is my configuration file right?
      From the error and the source code it fails on this line
      if (wsdlURL == null)
       File wsdlFile = new File(w2jc.wsdlLocation);
       if (wsdlFile.exists())
       wsdlURL = wsdlFile.toURL();

      Line where it says new File so I guess something is wrong with my configuration and it cannot file wsdl files correctly?

      Thank you,