Announcement Announcement Module
Collapse
No announcement yet.
NPE Exception when trying to deploy JAX-WS Webservice in Weblogic 10.3 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • NPE Exception when trying to deploy JAX-WS Webservice in Weblogic 10.3

    Hello All,

    I am trying to deploy a webservice using spring and jaxws. The example is working fine on Tomcat but the same is failing on weblogic-10.3

    I have the following in my web.xml and application-context.xml
    I have the following jars files in my lib directory

    Please find the stack trace below the code.

    Please let me know the solution as i have been struggling with this problem for the last one week and not able to find the answer.

    Thanks in advance,
    Subbu.

    Code:
    	<context-param>
    		<param-name>contextConfigLocation</param-name>
    		<param-value>/WEB-INF/application-context.xml</param-value>
    	</context-param>
    
    	<listener>
    		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    	</listener>
    
    	<listener>
    		<listener-class>
    			com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>
    	</listener>
    
    	<servlet>
    		<servlet-name>jaxws-servlet</servlet-name>
    		<servlet-class>com.sun.xml.ws.transport.http.servlet.WSSpringServlet</servlet-class>
    		<load-on-startup>1</load-on-startup>
    	</servlet>
    	
    	<servlet-mapping>
    		<servlet-name>jaxws-servlet</servlet-name>
    		<url-pattern>/HelloWorldService</url-pattern>
    	</servlet-mapping>
    Code:
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
    	xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
    	xmlns:ws="http://jax-ws.dev.java.net/spring/core" xmlns:wss="http://jax-ws.dev.java.net/spring/servlet"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans   
           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
    	   http://www.springframework.org/schema/aop 
    	   http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
    	   http://www.springframework.org/schema/lang
    	   http://www.springframework.org/schema/lang/spring-lang-2.5.xsd
    	   http://www.springframework.org/schema/tx
    	   http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
    	   http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context-2.5.xsd
           http://jax-ws.dev.java.net/spring/core
           http://jax-ws.dev.java.net/spring/core.xsd
           http://jax-ws.dev.java.net/spring/servlet
           http://jax-ws.dev.java.net/spring/servlet.xsd">
    
    	<bean id="helloService"
    		class="com.HelloWorldServiceImpl">
    	</bean>
    
    	<!-- JAXWS Declarations  -->
    	<wss:binding url="/HelloWorldService">
    		<wss:service>
    			<ws:service bean="#helloService">
    			</ws:service>
    		</wss:service>
    	</wss:binding>
    </beans>


    Code:
    Caused By: java.lang.NullPointerException
            at weblogic.wsee.jaxws.framework.jaxrpc.server.ServerEnvironmentFactory.buildWssPolicyContextForProviderBasedEndpoint(ServerEnvironmentFactory.java:94)
            at weblogic.wsee.jaxws.framework.jaxrpc.server.ServerEnvironmentFactory.initPolicyContext(ServerEnvironmentFactory.java:66)
            at weblogic.wsee.jaxws.framework.jaxrpc.EnvironmentFactory.getService(EnvironmentFactory.java:1192)
            at weblogic.wsee.jaxws.framework.jaxrpc.EnvironmentFactory.buildDeploymentContext(EnvironmentFactory.java:1265)
            at weblogic.wsee.jaxws.framework.jaxrpc.EnvironmentFactory.getDeploymentContext(EnvironmentFactory.java:1250)
            Truncated. see log file for complete stacktrace
    > 
    <Mar 8, 2011 5:28:41 AM EST> <Error> <Console> <BEA-240003> <Console encountered the following error weblogic.application.ModuleException: 
            at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1399)
            at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)
            at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
            at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
            at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
            at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
            at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
            at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
            at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
            at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
            at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
            at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
            at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
            at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
            at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:54)
            at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
            at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
            at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
            at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
            at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
            at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
            at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
            at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
            at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
            at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)
            at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)
            at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
            at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
            at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.NullPointerException: 
            at weblogic.wsee.jaxws.framework.jaxrpc.server.ServerEnvironmentFactory.buildWssPolicyContextForProviderBasedEndpoint(ServerEnvironmentFactory.java:94)
            at weblogic.wsee.jaxws.framework.jaxrpc.server.ServerEnvironmentFactory.initPolicyContext(ServerEnvironmentFactory.java:66)
            at weblogic.wsee.jaxws.framework.jaxrpc.EnvironmentFactory.getService(EnvironmentFactory.java:1192)
            at weblogic.wsee.jaxws.framework.jaxrpc.EnvironmentFactory.buildDeploymentContext(EnvironmentFactory.java:1265)
            at weblogic.wsee.jaxws.framework.jaxrpc.EnvironmentFactory.getDeploymentContext(EnvironmentFactory.java:1250)
            at weblogic.wsee.jaxws.framework.jaxrpc.TubelineDeploymentListener.createServer(TubelineDeploymentListener.java:74)
            at weblogic.wsee.jaxws.WLSTubelineAssemblerFactory$TubelineAssemblerImpl.createServer(WLSTubelineAssemblerFactory.java:93)
            at com.sun.xml.ws.server.WSEndpointImpl.<init>(WSEndpointImpl.java:160)
            at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:246)
            at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:230)
            at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:485)
            at org.jvnet.jax_ws_commons.spring.SpringService.getObject(SpringService.java:333)
            at org.jvnet.jax_ws_commons.spring.SpringService.getObject(SpringService.java:45)
            at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:119)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:114)
            at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:97)
            at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:223)
            at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1172)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:940)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:437)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:383)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:353)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
Working...
X