My gut feeling is that it's due to:

>       <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">

...........

>       </bean>


CXFBusImpl wasn't meant to be public and used in contexts like that.  With 
2.4.x and later, within Spring, you really need the SpringBus subclass, but 
even that really isn't public.  You should be using the <cxf:bus> namespace 
support to define the bus.   That will likely fix the issue.   


Dan 




On Tuesday, November 01, 2011 8:40:25 PM ryluis wrote:
> hi guys,
> 
> i have just change to cxf 2.4.3, and created a simple rest web service,
> integrated with spring.
> 
> but stuck with this exception :
> 
> java.lang.NullPointerException
>       at
> org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(CXFNonSpringServle
> t.java:60)
> 
> 
> i confused with this error, since i never create any class that use/extend
> CXFNonSpringServlet.
> 
> last time i was using cxf 2.2.8, and never meet this error.
> 
> please kindly advise.
> 
> ===================
> 
> here is my :
> 
> *web.xml*
> 
> <web-app id="SDPFlexiRESTService_ID">
>       <display-name>SDPFlexiRESTService</display-name>
> 
>       <context-param>
>               <param-name>contextConfigLocation</param-name>
>               <param-value>classpath:applicationContext.xml</param-value>
>       </context-param>
> 
>       <listener>
> 
> <listener-class>org.springframework.web.context.ContextLoaderListener</liste
> ner-class> </listener>
> 
>       <servlet>
>               <servlet-name>CXFServlet</servlet-name>
>               
> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-
class>
> <load-on-startup>1</load-on-startup>
>       </servlet>
> 
>       <servlet-mapping>
>               <servlet-name>CXFServlet</servlet-name>
>               <url-pattern>/*</url-pattern>
>       </servlet-mapping>
> </web-app>
> 
> 
> *cxf.xml*
> 
> <beans xmlns="http://www.springframework.org/schema/beans";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>       xmlns:jaxrs="http://cxf.apache.org/jaxrs";
> xmlns:jaxws="http://cxf.apache.org/jaxws";
>       xsi:schemaLocation="http://www.springframework.org/schema/beans
>                               
> http://www.springframework.org/schema/beans/spring-
beans.xsd
>                               http://cxf.apache.org/jaxrs
>                               http://cxf.apache.org/schemas/jaxrs.xsd
>                               http://cxf.apache.org/jaxws
>                               http://cxf.apache.org/schemas/jaxws.xsd";>
> 
>       <import resource="classpath:META-INF/cxf/cxf.xml" />
> 
> 
>       <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>       <import resource="classpath:applicationContext.xml" />
> 
> 
> 
>       <jaxrs:server id="smsService" address="/">
>               <jaxrs:serviceBeans>
>                       <ref bean="smsServiceBean" />
>               </jaxrs:serviceBeans>
> 
>               <jaxrs:providers>
>                       <ref bean="jaxbProviderSoap" />
>               </jaxrs:providers>
> 
>               <jaxrs:extensionMappings>
>                       <entry key="json" value="application/json" />
>                       <entry key="xml" value="application/xml" />
>               </jaxrs:extensionMappings>
>       </jaxrs:server>
> </beans>
> 
> *applicationContext.xml*
> 
> <beans>
> 
>       <bean id="logInbound"
> class="org.apache.cxf.interceptor.LoggingInInterceptor" />
>       <bean id="logOutbound"
> class="org.apache.cxf.interceptor.LoggingOutInterceptor" />
> 
>       <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>
> 
> 
>       <bean id="sessionManagerClientBean"
> class="com.lintasteknologi.client.session.SessionManagerClient" />
> 
>       <bean id="smsClientBean" 
> class="com.lintasteknologi.client.sms.SMSClient"
> />
> 
> 
>       <bean id="sessionManagerServiceBean"
> class="com.lintasteknologi.service.impl.SessionManagerService">
>               <property name="sessionManagerClient" 
> ref="sessionManagerClientBean" 
/>
>       </bean>
> 
>       <bean id="smsServiceBean"
> class="com.lintasteknologi.service.impl.SMSService">
>               <property name="smsClient" ref="smsClientBean" />
>               <property name="sessionManagerClient" 
> ref="sessionManagerClientBean" 
/>
>       </bean>
> 
> 
>       <bean id="jaxbProviderSoap"
> class="org.apache.cxf.jaxrs.provider.JAXBElementProvider" />
> </beans>
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Null-Pointer-on-CXFNonSpringServlet-tp49570
> 35p4957035.html Sent from the cxf-user mailing list archive at Nabble.com.
-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to