You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Willem Jiang (JIRA)" <ji...@apache.org> on 2009/11/11 04:13:52 UTC

[jira] Commented: (SMX4-423) Camel CXF Consumer does not work when deployed in JBI

    [ https://issues.apache.org/activemq/browse/SMX4-423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55290#action_55290 ] 

Willem Jiang commented on SMX4-423:
-----------------------------------

Hi Sergey,

If you check out the [OsgiCamelJbiComponent.java|https://svn.apache.org/repos/asf/servicemix/components/engines/servicemix-camel/trunk/src/main/java/org/apache/servicemix/camel/osgi/OsgiCamelJbiComponent.java], you will find current OsgiCamelJbiComponent hacks the classloader to let xbean load the schema file of camel-spring and camel-osgi.

This issue should be easy to fix by adding the camel-cxf into the classloader check list.
As I don't have the commit right of SMX, I will submit a patch for it.





> Camel CXF Consumer does not work when deployed in JBI
> -----------------------------------------------------
>
>                 Key: SMX4-423
>                 URL: https://issues.apache.org/activemq/browse/SMX4-423
>             Project: ServiceMix 4
>          Issue Type: Bug
>    Affects Versions: 4.1.0
>            Reporter: Sergey Beryozkin
>             Fix For: 4.0-m1, 4.1.0
>
>
> When SA containing the following camel context :
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:camel="http://camel.apache.org/schema/spring"
> xmlns:cxf="http://camel.apache.org/schema/cxf"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf-2.0.xsd
> http://camel.apache.org/schema/spring
> http://camel.apache.org/schema/spring/camel-spring.xsd">
> <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:9001/PersonService"
> serviceClass="org.apache.servicemix.samples.wsdl_first.PersonService">
> <cxf:properties>
> <entry key="dataFormat" value="MESSAGE"/>
> <entry key="wsdlURL" value="person.wsdl"/>
> <entry key="serviceName" value="{http://servicemix.apache.org/samples/wsdl-first}PersonService"/>
> <entry key="portName" value="{http://servicemix.apache.org/samples/wsdl-first}soap4"/>
> </cxf:properties>
> </cxf:cxfEndpoint>
> <camel:camelContext>
> <camel:route>
> <camel:from uri="jbi:endpoint:http://servicemix.apache.org/samples/wsdl-first/receiver/endpoint" />
> <setHeader headerName="Content-Type">
> <constant>application/xml</constant>
> </setHeader>
> <camel:to uri="http://localhost:9000/PersonService/"/>
> <!--
> <camel:to uri="cxf:http://localhost:9000/PersonService/?dataFormat=MESSAGE&amp;wsdlURL=person.wsdl&amp;serviceName={http://servicemix.apache.org/samples/wsdl-first}PersonService&amp;portName={http://servicemix.apache.org/samples/wsdl-first}soap3" />
> -->
> <camel:to uri="log:soapresponse"/>
> </camel:route>
> <camel:route>
> <camel:from uri="cxf:bean:serviceEndpoint"/>
> <camel:to uri="log:soapresponse2"/>
> </camel:route>
> </camel:camelContext>
> </beans>
> is deployed, the following exception is thrown :
> Caused by: javax.jbi.management.DeploymentException: <component-task-result xmln
> s="http://java.sun.com/xml/ns/jbi/management-message">
> <component-name>servicemix-camel</component-name>
> <component-task-result-details>
> <task-result-details>
> <task-id>deploy</task-id>
> <task-result>FAILED</task-result>
> <message-type>ERROR</message-type>
> <task-status-msg><msg-loc-info><loc-token/><loc-message>
> Could not deploy xbean service unit</loc-message></msg-loc-info></task-status-ms
> g>
> <exception-info>
> <nesting-level>1</nesting-level>
> <msg-loc-info>
> <loc-token />
> <loc-message>Unrecognized xbean namespac
> e mapping: http://camel.apache.org/schema/cxf</loc-message>
> <stack-trace><![CDATA[org.springframewor
> k.beans.factory.BeanDefinitionStoreException: Unrecognized xbean namespace mappi
> ng: http://camel.apache.org/schema/cxf
> at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFr
> omExtensionElement(XBeanNamespaceHandler.java:277)
> at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBean
> NamespaceHandler.java:155)
> at org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanN
> amespaceHandler.java:49)
> You can reproduce it by updating the camel SU attached to https://issues.apache.org/activemq/browse/SMX4-422

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.