You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Tom Davies <to...@atlassian.com> on 2007/11/06 01:58:44 UTC

Bus has no BindingFactoryManager extension in AbstractBindingFactory.registerWithBindingManager

I'm using apache-cxf-2.0.3-incubator-20071102.144221-7 (although I see  
the same problem with 2.0.2) and Spring 2.5-rc1

I have a simple servlet configuration exactly as described here: http://cwiki.apache.org/CXF20DOC/servlet-transport.html
  and the cxf component of my spring config looks like this:

    <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="rpcReviewService"
     implementor="com.atlassian.crucible.spi.rpc.RpcReviewServiceImpl"
             address="/review"
    />

RpcReviewServiceImpl.java Is:

@Component
@WebService 
(endpointInterface="com.atlassian.crucible.spi.rpc.RpcReviewService")
@SOAPBinding(style=Style.RPC, use= Use.LITERAL)
public class RpcReviewServiceImpl implements RpcReviewService {
     private ReviewService reviewService;

     public ReviewData createReview(ReviewData review) {
         return reviewService.createReview(review);
     }

     public List<ReviewData> getAllReviews() {
         return reviewService.getAllReviews();
     }

     public void setReviewService(ReviewService reviewService) {
         this.reviewService = reviewService;
     }
}

When I start my app (running in Jetty) I have an NPE here:

[java] java.lang.NullPointerException
      [java]     at  
org 
.apache 
.cxf 
.binding 
.AbstractBindingFactory 
.registerWithBindingManager(AbstractBindingFactory.java:60)
      [java]     at  
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [java]     at  
sun 
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 
39)
      [java]     at  
sun 
.reflect 
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 
25)
      [java]     at java.lang.reflect.Method.invoke(Method.java:585)
      [java]     at  
org 
.springframework 
.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor 
$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java: 
209)
      [java]     at  
org 
.springframework 
.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor 
$ 
LifecycleMetadata 
.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:180)
      [java]     at  
org 
.springframework 
.beans 
.factory 
.annotation 
.InitDestroyAnnotationBeanPostProcessor 
.postProcessBeforeInitialization 
(InitDestroyAnnotationBeanPostProcessor.java:98)
      [java]     at  
org 
.springframework 
.beans 
.factory 
.support 
.AbstractAutowireCapableBeanFactory 
.applyBeanPostProcessorsBeforeInitialization 
(AbstractAutowireCapableBeanFactory.java:322)
      [java]     at  
org 
.springframework 
.beans 
.factory 
.support 
.AbstractAutowireCapableBeanFactory 
.initializeBean(AbstractAutowireCapableBeanFactory.java:1299)
      [java]     at  
org 
.springframework 
.beans 
.factory 
.support 
.AbstractAutowireCapableBeanFactory 
.createBean(AbstractAutowireCapableBeanFactory.java:532)
      [java]     at  
org.springframework.beans.factory.support.AbstractBeanFactory 
$1.getObject(AbstractBeanFactory.java:238)
      [java]     at  
org 
.springframework 
.beans 
.factory 
.support 
.DefaultSingletonBeanRegistry 
.getSingleton(DefaultSingletonBeanRegistry.java:167)
      [java]     at  
org 
.springframework 
.beans 
.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java: 
235)
      [java]     at  
org 
.springframework 
.beans 
.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java: 
167)
      [java]     at  
org 
.springframework 
.context 
.support 
.AbstractApplicationContext.getBean(AbstractApplicationContext.java:867)
      [java]     at  
org 
.apache.cxf.configuration.spring.SpringBeanMap.get(SpringBeanMap.java: 
193)
      [java]     at org.apache.cxf.configuration.spring.SpringBeanMap 
$Entry.getValue(SpringBeanMap.java:258)
      [java]     at  
org 
.springframework 
.beans 
.TypeConverterDelegate.convertToTypedMap(TypeConverterDelegate.java:469)
...

meaning that in:
public abstract class AbstractBindingFactory...
...
  @PostConstruct
     void registerWithBindingManager() {
         BindingFactoryManager manager =  
bus.getExtension(BindingFactoryManager.class);
         for (String ns : activationNamespaces) {
             manager.registerBindingFactory(ns, this);
         }
     }

bus.getExtension(BindingFactoryManager.class) is returning null.

Any advice would be welcome.

Thanks,
   Tom

--
ATLASSIAN - http://www.atlassian.com
Our products help over 8,500 customers in more than 95 countries to  
collaborate






RE: Bus has no BindingFactoryManager extension in AbstractBindingFactory.registerWithBindingManager

Posted by "Jiang, Ning (Willem)" <Ni...@iona.com>.
Hi Tom,

I found Dan Klup's merging email to CXF2.0.x in cxf-commits mail list.
The patch of CXF-1060 should be also in CXF2.0.x branch now.

Please feel free to try the CXF 2.0.3 which is still been voting.

Willem.


-----Original Message-----
From: Tom Davies [mailto:tom@atlassian.com]
Sent: Wed 11/7/2007 7:46
To: cxf-user@incubator.apache.org
Subject: Re: Bus has no BindingFactoryManager extension in AbstractBindingFactory.registerWithBindingManager
 

On 07/11/2007, at 1:18 AM, Willem Jiang wrote:

> Hi Tom,
>
> Can you try your application with the Spring 2.0.6?
> We did not develop and test CXF with Spring 2.5-rc1.

Thanks Willem.

In fact I was using 2.1-m4, not 2.5-rc1, my mistake.

I have other dependencies on Spring 2.5, so I would like to try to use  
it.

When I use 2.5-rc1 I encounter CXF-1060. (or at least, a problem with  
the same symptoms). Should I expect CXF-1060 to be fixed in apache- 
cxf-2.0.3-incubator-20071102.144221-7? It is marked as fixed in 2.0.3 (https://issues.apache.org/jira/browse/CXF-1060 
) but the commit is on trunk (http://svn.apache.org/viewvc?view=rev&revision=581341 
) not the 2.0.x-fixes branch.

Thanks,
   Tom


Re: Bus has no BindingFactoryManager extension in AbstractBindingFactory.registerWithBindingManager

Posted by Tom Davies <to...@atlassian.com>.
On 07/11/2007, at 1:18 AM, Willem Jiang wrote:

> Hi Tom,
>
> Can you try your application with the Spring 2.0.6?
> We did not develop and test CXF with Spring 2.5-rc1.

Thanks Willem.

In fact I was using 2.1-m4, not 2.5-rc1, my mistake.

I have other dependencies on Spring 2.5, so I would like to try to use  
it.

When I use 2.5-rc1 I encounter CXF-1060. (or at least, a problem with  
the same symptoms). Should I expect CXF-1060 to be fixed in apache- 
cxf-2.0.3-incubator-20071102.144221-7? It is marked as fixed in 2.0.3 (https://issues.apache.org/jira/browse/CXF-1060 
) but the commit is on trunk (http://svn.apache.org/viewvc?view=rev&revision=581341 
) not the 2.0.x-fixes branch.

Thanks,
   Tom

Re: Bus has no BindingFactoryManager extension in AbstractBindingFactory.registerWithBindingManager

Posted by Willem Jiang <ni...@iona.com>.
Hi Tom,

Can you try your application with the Spring 2.0.6?
We did not develop and test CXF with Spring 2.5-rc1.

Willem.

Tom Davies wrote:
> I'm using apache-cxf-2.0.3-incubator-20071102.144221-7 (although I see 
> the same problem with 2.0.2) and Spring 2.5-rc1
>
> I have a simple servlet configuration exactly as described here: 
> http://cwiki.apache.org/CXF20DOC/servlet-transport.html
>  and the cxf component of my spring config looks like this:
>
>    <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="rpcReviewService"
>     implementor="com.atlassian.crucible.spi.rpc.RpcReviewServiceImpl"
>             address="/review"
>    />
>
> RpcReviewServiceImpl.java Is:
>
> @Component
> @WebService(endpointInterface="com.atlassian.crucible.spi.rpc.RpcReviewService") 
>
> @SOAPBinding(style=Style.RPC, use= Use.LITERAL)
> public class RpcReviewServiceImpl implements RpcReviewService {
>     private ReviewService reviewService;
>
>     public ReviewData createReview(ReviewData review) {
>         return reviewService.createReview(review);
>     }
>
>     public List<ReviewData> getAllReviews() {
>         return reviewService.getAllReviews();
>     }
>
>     public void setReviewService(ReviewService reviewService) {
>         this.reviewService = reviewService;
>     }
> }
>
> When I start my app (running in Jetty) I have an NPE here:
>
> [java] java.lang.NullPointerException
>      [java]     at 
> org.apache.cxf.binding.AbstractBindingFactory.registerWithBindingManager(AbstractBindingFactory.java:60) 
>
>      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
>      [java]     at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>
>      [java]     at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
>
>      [java]     at java.lang.reflect.Method.invoke(Method.java:585)
>      [java]     at 
> org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:209) 
>
>      [java]     at 
> org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:180) 
>
>      [java]     at 
> org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:98) 
>
>      [java]     at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:322) 
>
>      [java]     at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1299) 
>
>      [java]     at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:532) 
>
>      [java]     at 
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:238) 
>
>      [java]     at 
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:167) 
>
>      [java]     at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:235) 
>
>      [java]     at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:167) 
>
>      [java]     at 
> org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:867) 
>
>      [java]     at 
> org.apache.cxf.configuration.spring.SpringBeanMap.get(SpringBeanMap.java:193) 
>
>      [java]     at 
> org.apache.cxf.configuration.spring.SpringBeanMap$Entry.getValue(SpringBeanMap.java:258) 
>
>      [java]     at 
> org.springframework.beans.TypeConverterDelegate.convertToTypedMap(TypeConverterDelegate.java:469) 
>
> ...
>
> meaning that in:
> public abstract class AbstractBindingFactory...
> ...
>  @PostConstruct
>     void registerWithBindingManager() {
>         BindingFactoryManager manager = 
> bus.getExtension(BindingFactoryManager.class);
>         for (String ns : activationNamespaces) {
>             manager.registerBindingFactory(ns, this);
>         }
>     }
>
> bus.getExtension(BindingFactoryManager.class) is returning null.
>
> Any advice would be welcome.
>
> Thanks,
>   Tom
>
> -- 
> ATLASSIAN - http://www.atlassian.com
> Our products help over 8,500 customers in more than 95 countries to 
> collaborate
>
>
>
>
>