Is there a way to use Camel-cxf  2.1.0 in Servicemix 4.1.0 ?

I have downloaded SMX 4.1.0-SNAPSHOT, but I can't install Camel-cxf. I have
noted also that SMX uses CXF2.2.4 while Camel uses CXF 2.2.5. Any knowledge
on this side ? Should I better ask in the SMX mailing list ?


Claus Ibsen-2 wrote:
> 
> On Thu, Dec 3, 2009 at 9:09 AM, TheWinch
> <[email protected]> wrote:
>>
>> Hi,
>>
>> Thanks for this answer. Is there a place where I can get a packaged
>> snapshot
>> version of camel 2.1.0 ? Or should I build it from the SVN ?
>>
> 
> Yes the download page at Camel have links to .zip of SNAPSHOT and how
> to setup maven to use SNAPSHOT
> http://camel.apache.org/download.html
> 
> 
> 
>>
>> willem.jiang wrote:
>>>
>>> Hi,
>>>
>>> This issue is related the get default bus issue[1], and it should be
>>> fixed in the coming out Camel 2.1.0.
>>> [1]https://issues.apache.org/activemq/browse/CAMEL-2216
>>>
>>> Willem
>>>
>>> TheWinch wrote:
>>>> Hi,
>>>>
>>>> I'm trying to deploy dynamically endpoints using camel-cxf. I have an
>>>> example that works perfectly well in camel 2.0.0 standalone, and that
>>>> does
>>>> not work in camel 2.0.0 deployed on SMX4 (code provided below).
>>>> I have read on forums that this might come from class-path issues.
>>>> However I
>>>> can't see where it comes from. Could someone help ?
>>>>
>>>> To deploy the endpoint I do:
>>>>
>>>> // in Test:
>>>> public void doTest() { builder.deployEndpoint(); }
>>>> // in DynamicBuilder:
>>>> public void deployEndpoint() {
>>>>         CamelContext context = getContext();
>>>>
>>>>         final String endpointUri = "cxf:" +
>>>> "http://localhost:9000/service";
>>>> + "?serviceClass=" + SERVICE_CLASS;
>>>>         def = from( endpointUri );
>>>>         def.process( new CallbackProcessor() );
>>>>         context.addRouteDefinitions( Arrays.asList( def ) );
>>>>         context.startRoute( def );
>>>> }
>>>>
>>>> This works OK in camel standalone, and in SMX4 this generates the
>>>> following
>>>> error:
>>>>
>>>> org.apache.camel.RuntimeCamelException: java.lang.RuntimeException:
>>>> Could
>>>> not find destination factory for transport
>>>> http://schemas.xmlsoap.org/soap/h
>>>> ttp
>>>>         at
>>>> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1011)
>>>>         at
>>>> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:121)
>>>>         at
>>>> org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:469)
>>>>         at
>>>> org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
>>>>         at
>>>> org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
>>>>         at
>>>> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
>>>>         at
>>>> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
>>>>         at
>>>> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
>>>>         at
>>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.finishRefresh(AbstractDelegatedExecutionApplicationCo
>>>> ntext.java:380)
>>>>         at
>>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.ja
>>>> va:346)
>>>>         at
>>>> org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
>>>>         at
>>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplication
>>>> Context.java:308)
>>>>         at
>>>> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(Dependen
>>>> cyWaiterApplicationContextExecutor.java:138)
>>>>         at java.lang.Thread.run(Thread.java:619)
>>>> Caused by: java.lang.RuntimeException: Could not find destination
>>>> factory
>>>> for transport http://schemas.xmlsoap.org/soap/http
>>>>         at
>>>> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:76)
>>>>         at
>>>> org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:90)
>>>>         at
>>>> org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:69)
>>>>         at
>>>> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:118)
>>>>         at
>>>> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:167)
>>>>         at
>>>> org.apache.camel.component.cxf.CxfConsumer.<init>(CxfConsumer.java:108)
>>>>         at
>>>> org.apache.camel.component.cxf.CxfEndpoint.createConsumer(CxfEndpoint.java:97)
>>>>         at
>>>> org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:57)
>>>>         at
>>>> org.apache.camel.impl.DefaultRoute.getServicesForRoute(DefaultRoute.java:81)
>>>>         at
>>>> org.apache.camel.impl.RouteService.doStart(RouteService.java:77)
>>>>         at
>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:52)
>>>>         at
>>>> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:825)
>>>>         at
>>>> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:99)
>>>>         at
>>>> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:119)
>>>>         ... 12 more
>>>>
>>>> My camel context:
>>>>
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <beans xmlns="http://www.springframework.org/schema/beans";
>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>>>        xmlns:cxf="http://camel.apache.org/schema/cxf";
>>>>        xsi:schemaLocation="
>>>>        http://www.springframework.org/schema/beans
>>>> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>>>>        http://camel.apache.org/schema/cxf
>>>> http://camel.apache.org/schema/cxf/camel-cxf.xsd
>>>>        http://camel.apache.org/schema/spring
>>>> http://camel.apache.org/schema/spring/camel-spring.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-extension-http-jetty.xml"
>>>> />
>>>>
>>>>     <bean id="builder" class="test.DynamicRouteBuilder"/>
>>>>    <camelContext id="test_context"
>>>> xmlns="http://camel.apache.org/schema/spring";>
>>>>        <routeBuilder  ref="builder"/>
>>>>    </camelContext>
>>>>
>>>>    <bean id="test" class="test.Test" init-method="doTest"
>>>> destroy-method="tearDown">
>>>>      <property name="builder" ref="builder"/>
>>>>    </bean>
>>>> </beans>
>>>>
>>>> And my import directives:
>>>>                         javax.jws,
>>>>                         javax.wsdl,
>>>>                         javax.xml.bind,
>>>>                         javax.xml.bind.annotation,
>>>>                         javax.xml.namespace,
>>>>                         javax.xml.soap,
>>>>                         javax.xml.ws,
>>>>                         META-INF.cxf,
>>>>                         META-INF.cxf.osgi,
>>>>
>>>>                      org.apache.cxf,
>>>>                      org.apache.cxf.binding,
>>>>                      org.apache.cxf.binding.soap,
>>>>                      org.apache.cxf.binding.soap.interceptor,
>>>>                      org.apache.cxf.binding.soap.model,
>>>>                      org.apache.cxf.binding.xml,
>>>>                      org.apache.cxf.bindings.xformat,
>>>>                      org.apache.cxf.common.classloader,
>>>>                      org.apache.cxf.common.i18n,
>>>>                      org.apache.cxf.common.logging,
>>>>                      org.apache.cxf.common.util,
>>>>                      org.apache.cxf.configuration,
>>>>                      org.apache.cxf.configuration.security,
>>>>                      org.apache.cxf.configuration.spring,
>>>>                      org.apache.cxf.databinding,
>>>>                              org.apache.cxf.endpoint,
>>>>                              org.apache.cxf.feature,
>>>>                              org.apache.cxf.frontend,
>>>>                              org.apache.cxf.headers,
>>>>                              org.apache.cxf.helpers,
>>>>                              org.apache.cxf.interceptor,
>>>>                              org.apache.cxf.io,
>>>>                              org.apache.cxf.jaxrs,
>>>>                              org.apache.cxf.jaxrs.client,
>>>>                              org.apache.cxf.jaxrs.model,
>>>>                              org.apache.cxf.jaxrs.utils,
>>>>                              org.apache.cxf.jaxws,
>>>>                              org.apache.cxf.jaxws.context,
>>>>                              org.apache.cxf.message,
>>>>                              org.apache.cxf.phase,
>>>>                              org.apache.cxf.service,
>>>>                              org.apache.cxf.service.factory,
>>>>                              org.apache.cxf.service.invoker,
>>>>                              org.apache.cxf.service.model,
>>>>                              org.apache.cxf.staxutils,
>>>>                              org.apache.cxf.ws.addressing,
>>>>                              org.apache.cxf.wsdl,
>>>>                              org.apache.cxf.wsdl11,
>>>>                              org.apache.cxf.transport,
>>>>                              org.apache.cxf.transport.http,
>>>>                              org.apache.cxf.transport.http_jetty,
>>>>                              org.apache.cxf.transport.http.policy,
>>>>
>>>>                         org.apache.cxf.bus,
>>>>                         org.apache.cxf.bus.spring,
>>>>                         org.apache.cxf.bus.resource,
>>>>                         org.apache.cxf.resource,
>>>>                         org.springframework.beans.factory.config,
>>>>                         org.apache.servicemix.common.osgi,
>>>>                         *
>>>>
>>>>
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Classpath-problem-with-camel-cxf-and-OSGi-tp26612544p26621724.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Classpath-problem-with-camel-cxf-and-OSGi-tp26612544p26633543.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to