users@jax-rpc.java.net

Re: wsdeploy gives NullPointerException

From: Doug Kohlert <doug.kohlert_at_sun.com>
Date: Tue, 15 Jul 2003 10:39:33 -0700

Mark,
Can you try to run the service endpoint interface through wscompile to see
if you get the same NPE?

Thanks

Mark D. Hansen wrote:
> Using JWSDP 1.2, wsdeploy is giving me the following NPE. Detailed information is below. Any help will be greatly appreciated.
>
> [wsdeploy] error: generator error: java.lan.NullPointerException
>
> Although, I get this error, wsdeploy continues on and generates a .war file. However, when the web.xml contained in the .war file looks incomplete. It does not contain any <servlet> ... </servlet> OR <servlet-mapping> ... </servlet-mapping>. Shouldn't the generated web.xml always contain a servlet/servlet-mapping definition ???
>
> Here is the output from ant:
>
> [wsdeploy] command line: wsdeploy -classpath C:\jwsdp-1.2\jaxp\lib\endorsed\xercesImpl.jar;C:\jwsdp-1.2\jaxp\lib\jaxp-api.jar;C:\jwsdp-1.2\jaxp\lib\endorsed\dom.jar;C:\jwsdp-1.2\jaxp\lib\endorsed\sax.jar;C:\jwsdp-1.2\jaxp\lib\endorsed\xalan.jar;C:\jwsdp-1.2\jaxp\lib\endorsed\xsltc.jar;C:\jakarta-servletapi-4\lib\servlet.jar;C:\jwsdp-1.2\saaj\lib\saaj-api.jar;C:\jwsdp-1.2\saaj\lib\saaj-impl.jar;C:\jwsdp-1.2\jwsdp-shared\lib\activation.jar;C:\jwsdp-1.2\jwsdp-shared\lib\mail.jar;C:\jwsdp-1.2\jwsdp-shared\lib\commons-logging.jar;C:\jwsdp-1.2\jwsdp-shared\lib\namespace.jar;C:\jwsdp-1.2\jwsdp-shared\lib\providerutil.jar;C:\jwsdp-1.2\jwsdp-shared\lib\jax-qname.jar;C:\jwsdp-1.2\jwsdp-shared\lib\xsdlib.jar;C:\jwsdp-1.2\jwsdp-shared\lib\relaxngDatatype.jar;C:\jakarta-log4j-1.2.7\dist\lib\log4j-1.2.7.jar;C:\jwsdp-1.2\apache-ant\lib\ant.jar;C:\jwsdp-1.2\apache-ant\lib\optional.jar;C:\jakarta-tomcat-4.1.24\server\lib\catalina.jar;C:\jakarta-tomcat-4.1.24\server\lib\catalina-ant.jar;Q:\
book\build\classes;C:\jwsdp-1.2\jaxrpc\lib\jaxrpc-api.jar;C:\jwsdp-1.2\jaxrpc\lib\jaxrpc-impl.jar -keep -tmpdir Q:\book\build\classes\com\javector\chap5\sec1\server\tmp -o Q:\book\build\classes\com\javector\chap5\sec1\server\jaxrpc-OrderProcessor.war -verbose Q:\book\build\classes\com\javector\chap5\sec1\server\jaxrpc-OrderProcessor-raw.war
> [wsdeploy] info: created temporary directory: Q:\book\build\classes\com\javector\chap5\sec1\server\tmp\jaxrpc-deploy-b174f3
> [wsdeploy] error: generator error: java.lang.NullPointerException
> [wsdeploy] info: created output war file: Q:\book\build\classes\com\javector\chap5\sec1\server\jaxrpc-OrderProcessor.war
>
> Here is the web.xml that gets generated:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
> <web-app><display-name>5.1 OrderProcessor using JAX-RPC</display-name><listener><listener-class>com.sun.xml.rpc.server.http.JAXRPCContextListener</listener-class></listener></web-app>
>
> Here is my original jaxrpc-ri-before.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <webServices
> xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/dd"
> version="1.0"
> targetNamespaceBase="http://javector.com/5.1/wsdl"
> typeNamespaceBase="http://javector.com/5.1/types"
> urlPatternBase="/ws">
>
> <endpoint
> name="OrderProcessor"
> displayName="5.1 OrderProcessor using JAX-RPC"
> description="SOAP messaging using JAX-RPC"
> wsdl="/WEB-INF/OrderProcessor.wsdl"
> interface="com.javector.chap5.sec1.server.jaxrpc.OrderProcessingPortType"
> implementation="com.javector.chap5.sec1.server.OrderProcessor"
> model="/WEB-INF/model-wsdl-rpcenc.xml.gz"/>
>
> <endpointMapping
> endpointName="OrderProcessor"
> urlPattern="/orderproc"/>
>
> </webServices>


-- 
Doug Kohlert
Java Software Division
Sun Microsystems, Inc.
phone: 503 345-9806