Hi,
This NPE is caused by CXF bus changed a lot since 2.4.x.
So you shouldn't explicitly initialize org.apache.cxf.bus.CXFBusImpl yourself
now.
So the
<bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
<property name="inInterceptors">
<list>
<ref bean="logInbound"/>
</list>
</property>
<property name="outInterceptors">
<list>
<ref bean="logOutbound"/>
</list>
</property>
<property name="outFaultInterceptors">
<list>
<ref bean="logOutbound"/>
</list>
</property>
</bean>
should be changed to something like
<cxf:bus>
<cxf:inInterceptors>
<ref bean="logInbound"/>
</cxf:inInterceptors>
<cxf:outInterceptors>
<ref bean="logOutbound"/>
</cxf:outInterceptors>
<cxf:outFaultInterceptors>
<ref bean="logOutbound"/>
</cxf:outFaultInterceptors>
</cxf:bus>
Also you needn't have
<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" />
now.
Freeman
-------------
Freeman Fang
FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042
On 2012-7-24, at 上午7:42, nareshkpotti wrote:
> Thanks for the reply and our services are working fine in 4.3 version of
> service mix. We planned to move to service mix 4.4.2 version and I faced
> different problems and able to solve those. But now i am facing strange
> problem. Our services are in war file and when i installed war its status is
> active but i am getting exceptions in log files. Errors are nothing but
> failed to create beans from context file. Services works fine in 4.3 version
> but are failing in 4.4.2. I tried to debug with cxf source code and i
> noticed that It looks like the WSDLServiceFactory can 't get the WSDLManager
> from the bus when i try to create a service model for the client. This is
> part of my spring context file
>
> <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" />
>
> <jaxws:endpoint xmlns:tns="http://www.xyz.com/CustomerWS"
> id="customerwsV1"
> implementorClass="com.xyz.webservices.CustomerWSImp"
>
> wsdlLocation="wsdl/customerwsV1.wsdl"
> endpointName="tns:CustomerWSV1Port"
> serviceName="tns:CustomerWSV1Service"
> address="/CustomerWSV1Port">
> <jaxws:features><bean
> class="org.apache.cxf.feature.LoggingFeature"
> /></jaxws:features>
> <jaxws:properties> <entry key="schema-validation-enabled" value="true"
> />
> </jaxws:properties>
> </jaxws:endpoint>
>
> <bean id="logInbound" class="com.ctl.cxf.util.CWSLoggingInInterceptor"/>
> <bean id="logOutbound"
> class="com.ctl.cxf.util.CWSLoggingOutInterceptor"/>
>
> <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
> <property name="inInterceptors">
> <list>
> <ref bean="logInbound"/>
> </list>
> </property>
> <property name="outInterceptors">
> <list>
> <ref bean="logOutbound"/>
> </list>
> </property>
> <property name="outFaultInterceptors">
> <list>
> <ref bean="logOutbound"/>
> </list>
> </property>
> </bean>
>
> I did not install cxf-osgi feature in service mix 4.4.2 as i could not find.
> Is that the reason behind that??? What this feature used for and if that is
> the reason how can i add it?????
>
> *org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'customerwsV1': Invocation of init method failed; nested
> exception is javax.xml.ws.WebServiceException:
> java.lang.NullPointerException*
>
> Caused by:
>
> java.lang.NullPointerException
> at
> org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:92)
> at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:369)
> at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:505)
> at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:241)
> at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)
> at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
> at
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:157)
> at
> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:203)
> at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:433)
> at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:322)
> 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)
>
>
>
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/Upgrading-from-Service-Mix-4-3-to-Service-Mix-4-4-tp5713920p5713947.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.