cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sonam Nepali <Sonam.Nep...@imail.org>
Subject RE: Spring context not loading when upgrading from 2.2.9 to 2.4.1 version.
Date Thu, 23 Jun 2011 18:24:36 GMT
David,

Sorry that was a typo.  I do have the following and the version between 2.2.9 and 2.4.1 is
not working the same. 

	<bean id="helloWorld" class="x.y.HelloWorld"/>	
	<jaxws:endpoint id="helloWorldEp" implementor="#helloWorld" address="/hello"/>
	

Thanks

-Sonam


-----Original Message-----
From: David Karlsen [mailto:davidkarlsen@gmail.com] 
Sent: Thursday, June 23, 2011 10:48 AM
To: users@cxf.apache.org
Subject: Re: Spring context not loading when upgrading from 2.2.9 to 2.4.1 version.

maybe implementor should rather read implementor="#helloWorld" to reference
the spring instanciated bean?

2011/6/23 Sonam Nepali <Sonam.Nepali@imail.org>

> Hello,
>
> I upgraded Apache CXF maven dependency from 2.2.9 to 2.4.1 version.  I am
> exposing a HelloWorld webservice and was able to get the spring context
> loaded with 2.2.9 version but after upgrading to 2.4.1 version I can't get
> the spring context to load.  My configuration for exposing the webservice is
> as following:
>
>      <import resource="classpath:META-INF/cxf/cxf.xml" />
>      <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>      <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>
>      <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl" />
>
>      <bean id="helloWorld" class="x.y.HelloWorld"/>
>      <jaxws:endpoint id="helloWorldEp" implementor="x.y.HelloWorld"
> address="/hello"/>
>
>
> But I am getting the following error with Apache CXF 2.4.1 version:
>
>
> 2011-06-23 10:35:42,399 [[STANDBY] ExecuteThread: '4' for queue:
> 'weblogic.kernel.Default (self-tuning)'] ERROR
> org.springframework.web.context.ContextLoader - Context initialization
> failed
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'helloWorldEp': Invocation of init method failed; nested
> exception is javax.xml.ws.WebServiceException:
> java.lang.NullPointerException
>                at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
>                at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
>                at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
>                at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
>                at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
>                at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
>                at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
>                at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
>                at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
>                at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
>                at
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
>                at
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
>                at
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
>                at
> weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:465)
>                at
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
>                at weblogic.security.service.SecurityManager.runAs(Unknown
> Source)
>                at
> weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:175)
>                at
> weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1784)
>                at
> weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2999)
>                at
> weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1371)
>                at
> weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:468)
>                at
> weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
>                at
> weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
>                at
> weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
>                at
> weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
>                at
> weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
>                at
> weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
>                at
> weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
>                at
> weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
>                at
> weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
>                at
> weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
>                at
> weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
>                at
> weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
>                at
> weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:16)
>                at
> weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:162)
>                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:140)
>                at
> weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:106)
>                at
> weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
>                at
> weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:820)
>                at
> weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1227)
>                at
> weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:436)
>                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: javax.xml.ws.WebServiceException: java.lang.NullPointerException
>                at
> org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:350)
>                at
> org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
>                at
> org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>                at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>                at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>                at java.lang.reflect.Method.invoke(Method.java:597)
>                at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544)
>                at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)
>                at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
>                ... 49 more
> Caused by: java.lang.NullPointerException
>                at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:338)
>                at
> org.apache.cxf.jaxws.JaxWsServerFactoryBean.createBindingInfo(JaxWsServerFactoryBean.java:176)
>                at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:252)
>                at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:147)
>                at
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:157)
>                at
> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:202)
>                at
> org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:433)
>                at
> org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:322)
>                ... 58 more
>
>
>
> Thanks
>
>
> -Sonam
>



-- 
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

Mime
View raw message