0 Replies Latest reply on Sep 25, 2006 3:45 PM by chee torr

    null pointer exception during web services deployment

    chee torr Newbie

      hi,

      here is the excerpt from the server.log file when deploying a simple pojo based webservice packaged in the war

      2006-09-26 00:27:01,828 DEBUG [org.jboss.deployment.MainDeployer] Undeploying file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
      2006-09-26 00:27:03,312 DEBUG [org.jboss.ws.server.WebServiceDeployerJSE] stop: file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
      2006-09-26 00:27:04,421 DEBUG [org.jboss.system.ServiceController] stopping service: jboss.web.deployment:id=1363851585,war=celsius.war
      2006-09-26 00:27:05,906 DEBUG [org.jboss.ws.server.WebServiceDeployerJSE] destroy: file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
      2006-09-26 00:27:05,984 DEBUG [org.jboss.system.ServiceController] destroying service: jboss.web.deployment:id=1363851585,war=celsius.war
      2006-09-26 00:27:06,250 DEBUG [org.jboss.system.ServiceController] destroying dependent services for: jboss.web.deployment:id=1363851585,war=celsius.war dependent services are: []
      2006-09-26 00:27:06,562 DEBUG [org.jboss.web.WebModule] Destroying jboss.web.deployment:id=1363851585,war=celsius.war
      2006-09-26 00:27:06,687 DEBUG [org.jboss.web.WebModule] Destroyed jboss.web.deployment:id=1363851585,war=celsius.war
      2006-09-26 00:27:07,640 DEBUG [org.jboss.system.ServiceController] removing service: jboss.web.deployment:id=1363851585,war=celsius.war
      2006-09-26 00:27:08,312 DEBUG [org.jboss.system.ServiceController] removing already unregistered jboss.web.deployment:id=1363851585,war=celsius.war from server
      2006-09-26 00:27:09,015 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] Unregistering cl=org.jboss.mx.loading.UnifiedClassLoader3@1b5eba4{ url=file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp35697celsius-exp.war/ ,addedOrder=39}
      2006-09-26 00:27:09,296 DEBUG [org.jboss.mx.loading.UnifiedLoaderRepository3] UnifiedLoaderRepository removed(true) org.jboss.mx.loading.UnifiedClassLoader3@1b5eba4{ url=file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp35697celsius-exp.war/ ,addedOrder=39}
      2006-09-26 00:27:09,875 DEBUG [org.jboss.deployment.DeploymentInfo] Cleaned Deployment: file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp35697celsius-exp.war/
      2006-09-26 00:27:09,953 DEBUG [org.jboss.deployment.MainDeployer] Undeployed file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
      2006-09-26 00:27:10,140 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
      2006-09-26 00:27:10,140 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment (init step) of package at: file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
      2006-09-26 00:27:10,156 DEBUG [org.jboss.deployment.MainDeployer] Copying file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war -> C:\jboss-4.0.4.GA\server\default\tmp\deploy\tmp35698celsius.war
      2006-09-26 00:27:10,484 DEBUG [org.jboss.deployment.MainDeployer] using deployer MBeanProxyExt[jboss.web:service=WebServer]
      2006-09-26 00:27:10,484 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] Begin init
      2006-09-26 00:27:11,328 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] Unpacking war to: C:\jboss-4.0.4.GA\server\default\tmp\deploy\tmp35698celsius-exp.war
      2006-09-26 00:27:12,156 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] Replaced war with unpacked contents
      2006-09-26 00:27:12,156 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] Was unable to delete war file
      2006-09-26 00:27:12,234 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] webContext: null
      2006-09-26 00:27:12,234 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] warURL: file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp35698celsius-exp.war/
      2006-09-26 00:27:15,843 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] End init
      2006-09-26 00:27:15,875 DEBUG [org.jboss.deployment.DeploymentInfo] createLoaderRepository from config: LoaderRepositoryConfig(repositoryName: JMImplementation:name=Default,service=LoaderRepository, repositoryClassName: null, configParserClassName: null, repositoryConfig: null)
      2006-09-26 00:27:15,937 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.UnifiedLoaderRepository3@c4aad3, cl=org.jboss.mx.loading.UnifiedClassLoader3@1d590d{ url=file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp35698celsius-exp.war/ ,addedOrder=0}
      2006-09-26 00:27:15,937 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.UnifiedLoaderRepository3@c4aad3, cl=org.jboss.mx.loading.UnifiedClassLoader3@1d590d{ url=file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp35698celsius-exp.war/ ,addedOrder=0}
      2006-09-26 00:27:15,937 DEBUG [org.jboss.mx.loading.UnifiedLoaderRepository3] Adding org.jboss.mx.loading.UnifiedClassLoader3@1d590d{ url=file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp35698celsius-exp.war/ ,addedOrder=0}
      2006-09-26 00:27:16,000 DEBUG [org.jboss.deployment.MainDeployer] found 0 subpackages of file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
      2006-09-26 00:27:16,078 DEBUG [org.jboss.deployment.MainDeployer] Watching new file: file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
      2006-09-26 00:27:16,109 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
      2006-09-26 00:27:16,109 DEBUG [org.jboss.ws.server.WebServiceDeployerJSE] create: file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
      2006-09-26 00:27:16,109 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] create, celsius.war
      2006-09-26 00:27:16,906 DEBUG [org.jboss.system.ServiceController] Creating service jboss.web.deployment:id=1363851585,war=celsius.war
      2006-09-26 00:27:16,921 DEBUG [org.jboss.system.ServiceController] adding depends in ServiceController.register: []
      2006-09-26 00:27:17,046 DEBUG [org.jboss.web.WebModule] Creating jboss.web.deployment:id=1363851585,war=celsius.war
      2006-09-26 00:27:17,046 DEBUG [org.jboss.web.WebModule] Created jboss.web.deployment:id=1363851585,war=celsius.war
      2006-09-26 00:27:17,046 DEBUG [org.jboss.system.ServiceController] Creating dependent components for: jboss.web.deployment:id=1363851585,war=celsius.war dependents are: []
      2006-09-26 00:27:17,250 DEBUG [org.jboss.ws.metadata.JSR109ServerMetaDataBuilder] START buildMetaData: [url=file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp35698celsius-exp.war/WEB-INF/webservices.xml]
      2006-09-26 00:27:19,437 DEBUG [org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory] parse: file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp35698celsius-exp.war/WEB-INF/wsdl/CelsiusService.wsdl
      2006-09-26 00:27:21,359 DEBUG [org.jboss.ws.metadata.wsdl.WSDLInterface] new WSDLInterface
      2006-09-26 00:27:21,359 DEBUG [org.jboss.ws.metadata.wsdl.WSDLInterface] setName: Celsius
      2006-09-26 00:27:21,359 DEBUG [org.jboss.ws.metadata.wsdl.WSDLInterface] setQName: {http://converters/}Celsius
      2006-09-26 00:27:21,359 DEBUG [org.jboss.ws.metadata.wsdl.WSDLBinding] new WSDLBinding
      2006-09-26 00:27:21,359 DEBUG [org.jboss.ws.metadata.wsdl.WSDLBinding] setQName: {http://converters/}CelsiusBinding
      2006-09-26 00:27:21,375 DEBUG [org.jboss.ws.metadata.wsdl.WSDLBinding] setName: CelsiusBinding
      2006-09-26 00:27:21,375 DEBUG [org.jboss.ws.metadata.wsdl.WSDLBinding] setInterfaceName: CelsiusBinding
      2006-09-26 00:27:22,171 ERROR [org.jboss.deployment.MainDeployer] Could not create deployment: file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
      java.lang.NullPointerException
       at org.jboss.ws.metadata.JSR109ServerMetaDataBuilder.buildMetaData(JSR109ServerMetaDataBuilder.java:131)
       at org.jboss.ws.server.WebServiceDeployerJSE.createWebServicesMetaData(WebServiceDeployerJSE.java:189)
       at org.jboss.ws.server.WebServiceDeployer.create(WebServiceDeployer.java:103)
       at org.jboss.ws.server.WebServiceDeployerJSE.create(WebServiceDeployerJSE.java:66)
       at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
       at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy31.create(Unknown Source)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
       at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy8.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      2006-09-26 00:27:23,593 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@514ab941{ url=file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war, deployedLastModified=1159209702000 }
      org.jboss.deployment.DeploymentException: Could not create deployment: file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war; - nested throwable: (java.lang.NullPointerException)
       at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:975)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
       at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy8.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      Caused by: java.lang.NullPointerException
       at org.jboss.ws.metadata.JSR109ServerMetaDataBuilder.buildMetaData(JSR109ServerMetaDataBuilder.java:131)
       at org.jboss.ws.server.WebServiceDeployerJSE.createWebServicesMetaData(WebServiceDeployerJSE.java:189)
       at org.jboss.ws.server.WebServiceDeployer.create(WebServiceDeployer.java:103)
       at org.jboss.ws.server.WebServiceDeployerJSE.create(WebServiceDeployerJSE.java:66)
       at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
       at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy31.create(Unknown Source)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
       ... 20 more
      
      
      



      wsdl file

      <?xml version="1.0" encoding="UTF-8"?>
      
      <definitions name="CelsiusService" targetNamespace="http://converters/" xmlns:tns="http://converters/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
       <types/>
       <message name="Celsius_toCelsius">
       <part name="float_1" type="xsd:float"/></message>
       <message name="Celsius_toCelsiusResponse">
       <part name="result" type="xsd:float"/></message>
       <portType name="Celsius">
       <operation name="toCelsius" parameterOrder="float_1">
       <input message="tns:Celsius_toCelsius"/>
       <output message="tns:Celsius_toCelsiusResponse"/></operation></portType>
       <binding name="CelsiusBinding" type="tns:Celsius">
       <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
       <operation name="toCelsius">
       <soap:operation soapAction=""/>
       <input>
       <soap:body use="literal" namespace="http://converters/"/></input>
       <output>
       <soap:body use="literal" namespace="http://converters/"/></output></operation></binding>
       <service name="CelsiusService">
       <port name="CelsiusPort" binding="tns:CelsiusBinding">
       <soap:address location="http://localhost:8080/celsius/Celsius"/></port></service></definitions>
      


      webservices.xml file

      <webservices xmlns="http://java.sun.com/xml/ns/j2ee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd" version="1.1">
       <webservice-description >
       <webservice-description-name>CelsiusService</webservice-description-name>
       <wsdl-file>WEB-INF/wsdl/CelsiusService.wsdl</wsdl-file>
       <jaxrpc-mapping-file>WEB-INF/mapping.xml</jaxrpc-mapping-file>
       <port-component >
       <port-component-name>Celsius</port-component-name>
       <wsdl-port >
       <namespaceURI>http://converters/</namespaceURI>
       <localpart>Celsius</localpart>
       </wsdl-port>
       <service-endpoint-interface>converters.Celsius</service-endpoint-interface>
       <service-impl-bean >
       <servlet-link>CelsiusServlet</servlet-link>
       </service-impl-bean>
       </port-component>
       </webservice-description>
       </webservices>
      


      mapping file
      <?xml version="1.0" encoding="UTF-8"?>
      <java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
      <package-mapping>
      <package-type>converters</package-type>
      <namespaceURI>http://converters/types</namespaceURI>
      </package-mapping>
      <package-mapping>
      <package-type>converters</package-type>
      <namespaceURI>http://converters/</namespaceURI>
      </package-mapping>
      <service-interface-mapping>
      <service-interface>converters.CelsiusService</service-interface>
      <wsdl-service-name xmlns:serviceNS="http://converters/">serviceNS:CelsiusService</wsdl-service-name>
      <port-mapping>
      <port-name>CelsiusPort</port-name>
      <java-port-name>CelsiusPort</java-port-name>
      </port-mapping>
      </service-interface-mapping>
      <service-endpoint-interface-mapping>
      <service-endpoint-interface>converters.Celsius</service-endpoint-interface>
      <wsdl-port-type xmlns:portTypeNS="http://converters/">portTypeNS:Celsius</wsdl-port-type>
      <wsdl-binding xmlns:bindingNS="http://converters/">bindingNS:CelsiusBinding</wsdl-binding>
      <service-endpoint-method-mapping>
      <java-method-name>toCelsius</java-method-name>
      <wsdl-operation>toCelsius</wsdl-operation>
      <method-param-parts-mapping>
      <param-position>0</param-position>
      <param-type>float</param-type>
      <wsdl-message-mapping>
      <wsdl-message xmlns:wsdlMsgNS="http://converters/">wsdlMsgNS:Celsius_toCelsius</wsdl-message>
      <wsdl-message-part-name>float_1</wsdl-message-part-name>
      <parameter-mode>IN</parameter-mode>
      </wsdl-message-mapping>
      </method-param-parts-mapping>
      <wsdl-return-value-mapping>
      <method-return-value>float</method-return-value>
      <wsdl-message xmlns:wsdlMsgNS="http://converters/">wsdlMsgNS:Celsius_toCelsiusResponse</wsdl-message>
      <wsdl-message-part-name>result</wsdl-message-part-name>
      </wsdl-return-value-mapping>
      </service-endpoint-method-mapping>
      </service-endpoint-interface-mapping>
      </java-wsdl-mapping>
      
      


      web.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
       version="2.4">
       <servlet>
       <servlet-name>CelsiusServlet</servlet-name>
       <servlet-class>converters.CelsiusServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
       </servlet>
      
       <servlet-mapping>
       <servlet-name>CelsiusServlet</servlet-name>
       <url-pattern>/Celsius</url-pattern>
       </servlet-mapping>
      
      </web-app>
      
      

      Could'nt figured out why this null pointer is coming...
      please advice