Well, it should work fine with the bean reference like that.   We have test 
cases that do that.

You may be hitting some issues with classloaders and jar locking and other not 
fun things with tomcat where a redeploy may have been picking up stale or old 
stuff.    Take a look at:
https://issues.apache.org/jira/browse/CXF-1816
where I tried to document some of the stuff I was dealing with while trying to 
debug other strange issues.   Much of it is bugs in the JDK that the tomcat 
folks are trying to find workarounds for.  :-(


Dan




On Fri January 15 2010 9:05:16 am Vinicius Carvalho wrote:
> Hello There! I have my JAXWS endpoint configured as follows:
> 
> <beans xmlns="http://www.springframework.org/schema/beans";
>       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>       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/jaxws http://cxf.apache.org/schemas/jaxws.xsd";>
> 
>       <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 id="api"
> implementor="com.acme.api.services.impl.myAPI"
> address="/services/API">
> 
>       </jaxws:endpoint>
> 
> 
> </beans>
> 
> Works like a charm.
> 
> So I needed some DI on my class and moved to:
> 
>          <bean id="myAPIBean" class="com.acme.api.services.impl.myAPI"/>
>       <jaxws:endpoint id="api" implementor="#myAPIBean" 
address="/services/API">
> 
>       </jaxws:endpoint>
> 
> 
> Now when acccessing my service I get this error:
> 
> java.lang.NullPointerException
>       
org.apache.cxf.transport.servlet.ServletController.updateDests(ServletCont
> roller.java:92)
>  org.apache.cxf.transport.servlet.ServletController.invoke(ServletControlle
> r.java:132)
>  org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServ
> let.java:142)
>  org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(Abstrac
> tHTTPServlet.java:179)
>  org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPSer
> vlet.java:108) javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>       
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPS
> ervlet.java:159)
> 
> 
> Nothing on logs. Nothing at all.
> 
> Now, I tried to move back. Error persists. I redeployed, re-started,
> tryed everything even removing temp, work, and the Catalina folder
> inside conf. This is what I believe they call Fucked Beyond All
> Repair.
> 
> So in a desperate attempt I removed the tomcat and installed a fresh
> one. Well, it works (not using bean reference).
> 
> I wonder: Why bean injection is not working
> 
> And why it crashes tomcat so damn badly that I need a new install of the
>  server?
> 
> This is one of the most strangest glitches I've seen in my life :)
> 
> Could someone please help me out with this?
> 

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to