Hi,
 
I am trying to invoke an external web service using servicemix - camel.
When I start the bundle, it gives me the following error. Interestingly,
it gives me the error only when I specify the cxf:cxfEndpoint in the
camelcontext.xml. If I remove this entry from the camelcontext.xml and
specify it in Java, it works perfectly fine. What is the problem 
with the usage in camelcontext?  
 
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'routerEndpoint': Initialization of bean failed; nested
exception is java.lang.UnsupportedOperationException
 at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
 at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory$1.run(AbstractAutowireCapableBeanFactory.java:409)
 at java.security.AccessController.doPrivileged(Native Method)
 at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.createBean(AbstractAutowireCapableBeanFactory.java:380)
 ... 
 
 Caused by: java.lang.UnsupportedOperationException
  at
java.util.concurrent.CopyOnWriteArrayList$COWIterator.remove(CopyOnWrite
ArrayList.java:937)
  at
org.apache.cxf.configuration.spring.ConfigurerImpl.addApplicationContext
(ConfigurerImpl.java:232)
  at
org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor.updateBusRef
erencesInContext(BusWiringBeanFactoryPostProcessor.java:118)
  at
org.apache.camel.component.cxf.spring.CxfEndpointBeanDefinitionParser$Cx
fSpringEndpointBean.setApplicationContext(CxfEndpointBeanDefinitionParse
r.java:115)
  at
org.springframework.context.support.ApplicationContextAwareProcessor.pos
tProcessBeforeInitialization(ApplicationContextAwareProcessor.java:70)
  at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapable
BeanFactory.java:350)
  at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.initializeBean(AbstractAutowireCapableBeanFactory.java:1331)
  at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
 ... 16 more
 
 
 My camel context is
 
 <beans xmlns="http://www.springframework.org/schema/beans";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xmlns:ctx="http://www.springframework.org/schema/context";
        xmlns:osgi="http://activemq.apache.org/camel/schema/osgi";
        xmlns:cxf="http://activemq.apache.org/camel/schema/cxfEndpoint";
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
        http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
        http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
        http://activemq.apache.org/camel/schema/cxfEndpoint
http://activemq.apache.org/camel/schema/cxf/camel-cxf-1.6.0.xsd
        http://activemq.apache.org/camel/schema/osgi
http://activemq.apache.org/camel/schema/osgi/camel-osgi.xsd
        ">
 
   <osgi:camelContext
xmlns="http://activemq.apache.org/camel/schema/spring";>
     <!-- install the Java DSL route builder -->
     <package>itd.router</package>
   </osgi:camelContext>
 
  <cxf:cxfEndpoint id="routerEndpoint"
address="http://xxx/mathservicenocr";
        serviceClass="org.tempuri.MathService"  />
 
 </beans>

I am using fuse esb 4.1.0.2
 
Thanks,
Reju

Reply via email to