You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by aioria3077 <ai...@gmail.com> on 2014/07/10 23:35:51 UTC

how to deploy a project with a CAMEL-XSTREAM in fuse fabric container

they would greatly appreciate your help

my exercise is to convert a CSV separated by "|" to a XML, in which I'm
using camel-bindy and camel-xstream,

everything works fine if running with "mvn camel:run"

I show my camel-context

...
...
...
<bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent">
    	<property name="brokerURL" value="tcp://localhost:61618"/>
    	<property name="userName" value="admin"/>
    	<property name="password" value="admin"/>
	</bean>

  <camelContext xmlns="http://camel.apache.org/schema/spring">
    
    <dataFormats>
    	<bindy id="bindy" type="Csv" classType="com.cion.csvBindy.CSVtoXML"/>
    	<xstream id="xstream">
			<aliases>
				<alias name="movimiento" class="com.cion.csvBindy.CSVtoXML" />
			</aliases>    	
    	</xstream>
    </dataFormats>
    
    <route>
      <from uri="file:work/input"/>
		<split parallelProcessing="true" streaming="true">
            <tokenize token="\n" group="1"/>
            <log message="${body}"/>
            <to uri="activemq:colaSplit"/>
        </split>
    </route>
    
    <route>
    	<from uri="activemq:colaSplit"/>
    	<log message="salida de la cola: ${body}"/>
    	<unmarshal ref="bindy"/>
    	<log message="despues de unmarshal: ${body}"/>
    	<marshal ref="xstream"/>
    	<log message="despues de marshal con Xstream: ${body}"/>
    	<to uri="activemq:colaXML"/>
    </route>

</camelContext>

*REPEAT is working properly.* 

the problem comes when I have to deployar in a FUSE FABRIC CONTAINER

for this I created a profile with the following characteristics:

parents: mq-client, feature-camel

features: camel, camel-spring, camel-core, camel-bindy, camel-xstream,
activemq-camel

repositories: mvn:org.apache.activemq......../features
                   mvn:org.apache.camel.karaf......../features

and the project as a bundle

THE PROFILE IS PROVISIONED CORRECTLY, the "work / input" directory is
created within the container

when I insert the file, this is spent correctly, the problem comes in the
second route right on the part of:

<marshal ref="xstream"/>

reviewing the log of the container, the error is as follows:

2014-07-10 13:23:56,497 | WARN  | sumer[colaSplit] | EndpointMessageListener         
| rg.apache.camel.util.CamelLogger  224 | 113 - org.apache.camel.camel-core
- 2.12.0.redhat-610379 | Execution of JMS message listener failed. Caused
by: [java.lang.NoClassDefFoundError - org/xmlpull/v1/XmlPullParserException]
java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserException
	at com.thoughtworks.xstream.XStream.<init>(XStream.java:350)
	at
org.apache.camel.dataformat.xstream.AbstractXStreamWrapper.createXStream(AbstractXStreamWrapper.java:79)
	at
org.apache.camel.dataformat.xstream.AbstractXStreamWrapper.getXStream(AbstractXStreamWrapper.java:66)
	at
org.apache.camel.dataformat.xstream.AbstractXStreamWrapper.marshal(AbstractXStreamWrapper.java:204)
	at
org.apache.camel.processor.MarshalProcessor.process(MarshalProcessor.java:81)
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
	at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
	at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
	at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)
	at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103)
	at
org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:562)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
	at
org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:500)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
	at
org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:468)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
	at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
	at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1101)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1093)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:990)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_25]
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_25]
	at java.lang.Thread.run(Thread.java:724)[:1.7.0_25]
Caused by: java.lang.ClassNotFoundException:
org.xmlpull.v1.XmlPullParserException not found by
org.apache.servicemix.bundles.xstream [131]
	at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
	at
org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
	at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.7.0_25]
	... 25 more




highlighting the following parts


Execution of JMS message listener failed. Caused by:
[java.lang.NoClassDefFoundError - org/xmlpull/v1/XmlPullParserException]


Caused by: java.lang.ClassNotFoundException:
org.xmlpull.v1.XmlPullParserException not found by
org.apache.servicemix.bundles.xstream [131]

I searched and download the packages

pull-parser-2.1.10
xmlpull-1.1.3.1
org.apache.felix.bundlerepository-1.6.6
org.apache.servicemix.bundles.xstream-1.3_3



I have gotten as bundles to profile without any result 

could someone help me????   PLEASE



--
View this message in context: http://camel.465427.n5.nabble.com/how-to-deploy-a-project-with-a-CAMEL-XSTREAM-in-fuse-fabric-container-tp5753655.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: how to deploy a project with a CAMEL-XSTREAM in fuse fabric container

Posted by aioria3077 <ai...@gmail.com>.
I use spring-context'll get it but it is better to use blueprint 

I'll check the bundle mentioned by Charles Moulliard and be back to post the
results, thanks



--
View this message in context: http://camel.465427.n5.nabble.com/how-to-deploy-a-project-with-a-CAMEL-XSTREAM-in-fuse-fabric-container-tp5753655p5753729.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: how to deploy a project with a CAMEL-XSTREAM in fuse fabric container

Posted by Charles Moulliard <ch...@gmail.com>.
Apparently some of the bundles defined in the feature of camel-xstream have
not been installed when the profile has been pushed. I suggest that you add
them manually
till we figure out why we have this problem

<feature name='camel-xstream' version='2.12.0.redhat-610379'
resolver='(obr)' start-level='50'>
    <bundle
dependency='true'>mvn:org.codehaus.jettison/jettison/1.3.5</bundle>
    <feature version='2.12.0.redhat-610379'>camel-core</feature>
    <bundle
dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xpp3/1.1.4c_6</bundle>

    <bundle dependency='true'>mvn:joda-time/joda-time/1.6.2</bundle>
    <bundle
dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jdom/1.1_4</bundle>

    <bundle
dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j/1.6.1_5</bundle>

    <bundle
dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.kxml2/2.3.0_2</bundle>

    <bundle
dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream/1.4.7_1</bundle>

<bundle>mvn:org.apache.camel/camel-xstream/2.12.0.redhat-610379</bundle>
  </feature>


On Fri, Jul 11, 2014 at 5:49 PM, aioria3077 <ai...@gmail.com> wrote:

> Thanks so much.
>
> effectively that was the bundle that I need to, this is a world of camel
> and
> fuse or say
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/how-to-deploy-a-project-with-a-CAMEL-XSTREAM-in-fuse-fabric-container-tp5753655p5753734.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Re: how to deploy a project with a CAMEL-XSTREAM in fuse fabric container

Posted by aioria3077 <ai...@gmail.com>.
Thanks so much.

effectively that was the bundle that I need to, this is a world of camel and
fuse or say



--
View this message in context: http://camel.465427.n5.nabble.com/how-to-deploy-a-project-with-a-CAMEL-XSTREAM-in-fuse-fabric-container-tp5753655p5753734.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: how to deploy a project with a CAMEL-XSTREAM in fuse fabric container

Posted by Charles Moulliard <ch...@gmail.com>.
You will solve your issue if you add this bundle to your profile
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xpp3/1.1.4c_7

BTW, I will check if this bundle is part of the camel xstream feature
definition. If this is not the case, we will add it to avoid this issue


On Fri, Jul 11, 2014 at 11:38 AM, Charles Moulliard <ch...@gmail.com>
wrote:

> Your problem is related to the fact that this bundle -
> org.apache.servicemix.bundles.xstream [131] ) is not able to find/load this
> class --> org.xmlpull.v1.XmlPullParserException
>
>
> On Fri, Jul 11, 2014 at 8:40 AM, Claus Ibsen <cl...@gmail.com>
> wrote:
>
>> The xml file is that spring or blueprint?
>>
>> Favor blueprint as that generally works better with OSGi.
>>
>> On Thu, Jul 10, 2014 at 10:35 PM, aioria3077 <ai...@gmail.com>
>> wrote:
>> > they would greatly appreciate your help
>> >
>> > my exercise is to convert a CSV separated by "|" to a XML, in which I'm
>> > using camel-bindy and camel-xstream,
>> >
>> > everything works fine if running with "mvn camel:run"
>> >
>> > I show my camel-context
>> >
>> > ...
>> > ...
>> > ...
>> > <bean id="activemq"
>> > class="org.apache.activemq.camel.component.ActiveMQComponent">
>> >         <property name="brokerURL" value="tcp://localhost:61618"/>
>> >         <property name="userName" value="admin"/>
>> >         <property name="password" value="admin"/>
>> >         </bean>
>> >
>> >   <camelContext xmlns="http://camel.apache.org/schema/spring">
>> >
>> >     <dataFormats>
>> >         <bindy id="bindy" type="Csv"
>> classType="com.cion.csvBindy.CSVtoXML"/>
>> >         <xstream id="xstream">
>> >                         <aliases>
>> >                                 <alias name="movimiento"
>> class="com.cion.csvBindy.CSVtoXML" />
>> >                         </aliases>
>> >         </xstream>
>> >     </dataFormats>
>> >
>> >     <route>
>> >       <from uri="file:work/input"/>
>> >                 <split parallelProcessing="true" streaming="true">
>> >             <tokenize token="\n" group="1"/>
>> >             <log message="${body}"/>
>> >             <to uri="activemq:colaSplit"/>
>> >         </split>
>> >     </route>
>> >
>> >     <route>
>> >         <from uri="activemq:colaSplit"/>
>> >         <log message="salida de la cola: ${body}"/>
>> >         <unmarshal ref="bindy"/>
>> >         <log message="despues de unmarshal: ${body}"/>
>> >         <marshal ref="xstream"/>
>> >         <log message="despues de marshal con Xstream: ${body}"/>
>> >         <to uri="activemq:colaXML"/>
>> >     </route>
>> >
>> > </camelContext>
>> >
>> > *REPEAT is working properly.*
>> >
>> > the problem comes when I have to deployar in a FUSE FABRIC CONTAINER
>> >
>> > for this I created a profile with the following characteristics:
>> >
>> > parents: mq-client, feature-camel
>> >
>> > features: camel, camel-spring, camel-core, camel-bindy, camel-xstream,
>> > activemq-camel
>> >
>> > repositories: mvn:org.apache.activemq......../features
>> >                    mvn:org.apache.camel.karaf......../features
>> >
>> > and the project as a bundle
>> >
>> > THE PROFILE IS PROVISIONED CORRECTLY, the "work / input" directory is
>> > created within the container
>> >
>> > when I insert the file, this is spent correctly, the problem comes in
>> the
>> > second route right on the part of:
>> >
>> > <marshal ref="xstream"/>
>> >
>> > reviewing the log of the container, the error is as follows:
>> >
>> > 2014-07-10 13:23:56,497 | WARN  | sumer[colaSplit] |
>> EndpointMessageListener
>> > | rg.apache.camel.util.CamelLogger  224 | 113 -
>> org.apache.camel.camel-core
>> > - 2.12.0.redhat-610379 | Execution of JMS message listener failed.
>> Caused
>> > by: [java.lang.NoClassDefFoundError -
>> org/xmlpull/v1/XmlPullParserException]
>> > java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserException
>> >         at com.thoughtworks.xstream.XStream.<init>(XStream.java:350)
>> >         at
>> >
>> org.apache.camel.dataformat.xstream.AbstractXStreamWrapper.createXStream(AbstractXStreamWrapper.java:79)
>> >         at
>> >
>> org.apache.camel.dataformat.xstream.AbstractXStreamWrapper.getXStream(AbstractXStreamWrapper.java:66)
>> >         at
>> >
>> org.apache.camel.dataformat.xstream.AbstractXStreamWrapper.marshal(AbstractXStreamWrapper.java:204)
>> >         at
>> >
>> org.apache.camel.processor.MarshalProcessor.process(MarshalProcessor.java:81)
>> >         at
>> >
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
>> >         at
>> >
>> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
>> >         at
>> >
>> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>> >         at
>> org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
>> >         at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
>> >         at
>> >
>> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>> >         at
>> >
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)
>> >         at
>> >
>> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)
>> >         at
>> >
>> org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103)
>> >         at
>> >
>> org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:562)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
>> >         at
>> >
>> org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:500)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
>> >         at
>> >
>> org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:468)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
>> >         at
>> >
>> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
>> >         at
>> >
>> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
>> >         at
>> >
>> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1101)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
>> >         at
>> >
>> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1093)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
>> >         at
>> >
>> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:990)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
>> >         at
>> >
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_25]
>> >         at
>> >
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_25]
>> >         at java.lang.Thread.run(Thread.java:724)[:1.7.0_25]
>> > Caused by: java.lang.ClassNotFoundException:
>> > org.xmlpull.v1.XmlPullParserException not found by
>> > org.apache.servicemix.bundles.xstream [131]
>> >         at
>> >
>> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
>> >         at
>> >
>> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
>> >         at
>> >
>> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
>> >         at
>> java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.7.0_25]
>> >         ... 25 more
>> >
>> >
>> >
>> >
>> > highlighting the following parts
>> >
>> >
>> > Execution of JMS message listener failed. Caused by:
>> > [java.lang.NoClassDefFoundError - org/xmlpull/v1/XmlPullParserException]
>> >
>> >
>> > Caused by: java.lang.ClassNotFoundException:
>> > org.xmlpull.v1.XmlPullParserException not found by
>> > org.apache.servicemix.bundles.xstream [131]
>> >
>> > I searched and download the packages
>> >
>> > pull-parser-2.1.10
>> > xmlpull-1.1.3.1
>> > org.apache.felix.bundlerepository-1.6.6
>> > org.apache.servicemix.bundles.xstream-1.3_3
>> >
>> >
>> >
>> > I have gotten as bundles to profile without any result
>> >
>> > could someone help me????   PLEASE
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://camel.465427.n5.nabble.com/how-to-deploy-a-project-with-a-CAMEL-XSTREAM-in-fuse-fabric-container-tp5753655.html
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> Email: cibsen@redhat.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>> hawtio: http://hawt.io/
>> fabric8: http://fabric8.io/
>>
>
>
>
> --
> Charles Moulliard
> Apache Committer / Architect @RedHat
> Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io
>
>


-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Re: how to deploy a project with a CAMEL-XSTREAM in fuse fabric container

Posted by Charles Moulliard <ch...@gmail.com>.
Your problem is related to the fact that this bundle -
org.apache.servicemix.bundles.xstream [131] ) is not able to find/load this
class --> org.xmlpull.v1.XmlPullParserException


On Fri, Jul 11, 2014 at 8:40 AM, Claus Ibsen <cl...@gmail.com> wrote:

> The xml file is that spring or blueprint?
>
> Favor blueprint as that generally works better with OSGi.
>
> On Thu, Jul 10, 2014 at 10:35 PM, aioria3077 <ai...@gmail.com> wrote:
> > they would greatly appreciate your help
> >
> > my exercise is to convert a CSV separated by "|" to a XML, in which I'm
> > using camel-bindy and camel-xstream,
> >
> > everything works fine if running with "mvn camel:run"
> >
> > I show my camel-context
> >
> > ...
> > ...
> > ...
> > <bean id="activemq"
> > class="org.apache.activemq.camel.component.ActiveMQComponent">
> >         <property name="brokerURL" value="tcp://localhost:61618"/>
> >         <property name="userName" value="admin"/>
> >         <property name="password" value="admin"/>
> >         </bean>
> >
> >   <camelContext xmlns="http://camel.apache.org/schema/spring">
> >
> >     <dataFormats>
> >         <bindy id="bindy" type="Csv"
> classType="com.cion.csvBindy.CSVtoXML"/>
> >         <xstream id="xstream">
> >                         <aliases>
> >                                 <alias name="movimiento"
> class="com.cion.csvBindy.CSVtoXML" />
> >                         </aliases>
> >         </xstream>
> >     </dataFormats>
> >
> >     <route>
> >       <from uri="file:work/input"/>
> >                 <split parallelProcessing="true" streaming="true">
> >             <tokenize token="\n" group="1"/>
> >             <log message="${body}"/>
> >             <to uri="activemq:colaSplit"/>
> >         </split>
> >     </route>
> >
> >     <route>
> >         <from uri="activemq:colaSplit"/>
> >         <log message="salida de la cola: ${body}"/>
> >         <unmarshal ref="bindy"/>
> >         <log message="despues de unmarshal: ${body}"/>
> >         <marshal ref="xstream"/>
> >         <log message="despues de marshal con Xstream: ${body}"/>
> >         <to uri="activemq:colaXML"/>
> >     </route>
> >
> > </camelContext>
> >
> > *REPEAT is working properly.*
> >
> > the problem comes when I have to deployar in a FUSE FABRIC CONTAINER
> >
> > for this I created a profile with the following characteristics:
> >
> > parents: mq-client, feature-camel
> >
> > features: camel, camel-spring, camel-core, camel-bindy, camel-xstream,
> > activemq-camel
> >
> > repositories: mvn:org.apache.activemq......../features
> >                    mvn:org.apache.camel.karaf......../features
> >
> > and the project as a bundle
> >
> > THE PROFILE IS PROVISIONED CORRECTLY, the "work / input" directory is
> > created within the container
> >
> > when I insert the file, this is spent correctly, the problem comes in the
> > second route right on the part of:
> >
> > <marshal ref="xstream"/>
> >
> > reviewing the log of the container, the error is as follows:
> >
> > 2014-07-10 13:23:56,497 | WARN  | sumer[colaSplit] |
> EndpointMessageListener
> > | rg.apache.camel.util.CamelLogger  224 | 113 -
> org.apache.camel.camel-core
> > - 2.12.0.redhat-610379 | Execution of JMS message listener failed. Caused
> > by: [java.lang.NoClassDefFoundError -
> org/xmlpull/v1/XmlPullParserException]
> > java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserException
> >         at com.thoughtworks.xstream.XStream.<init>(XStream.java:350)
> >         at
> >
> org.apache.camel.dataformat.xstream.AbstractXStreamWrapper.createXStream(AbstractXStreamWrapper.java:79)
> >         at
> >
> org.apache.camel.dataformat.xstream.AbstractXStreamWrapper.getXStream(AbstractXStreamWrapper.java:66)
> >         at
> >
> org.apache.camel.dataformat.xstream.AbstractXStreamWrapper.marshal(AbstractXStreamWrapper.java:204)
> >         at
> >
> org.apache.camel.processor.MarshalProcessor.process(MarshalProcessor.java:81)
> >         at
> >
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
> >         at
> >
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
> >         at
> >
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
> >         at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
> >         at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
> >         at
> >
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
> >         at
> >
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)
> >         at
> >
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)
> >         at
> >
> org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103)
> >         at
> >
> org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:562)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
> >         at
> >
> org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:500)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
> >         at
> >
> org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:468)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
> >         at
> >
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
> >         at
> >
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
> >         at
> >
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1101)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
> >         at
> >
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1093)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
> >         at
> >
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:990)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
> >         at
> >
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_25]
> >         at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_25]
> >         at java.lang.Thread.run(Thread.java:724)[:1.7.0_25]
> > Caused by: java.lang.ClassNotFoundException:
> > org.xmlpull.v1.XmlPullParserException not found by
> > org.apache.servicemix.bundles.xstream [131]
> >         at
> >
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
> >         at
> >
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
> >         at
> >
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
> >         at
> java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.7.0_25]
> >         ... 25 more
> >
> >
> >
> >
> > highlighting the following parts
> >
> >
> > Execution of JMS message listener failed. Caused by:
> > [java.lang.NoClassDefFoundError - org/xmlpull/v1/XmlPullParserException]
> >
> >
> > Caused by: java.lang.ClassNotFoundException:
> > org.xmlpull.v1.XmlPullParserException not found by
> > org.apache.servicemix.bundles.xstream [131]
> >
> > I searched and download the packages
> >
> > pull-parser-2.1.10
> > xmlpull-1.1.3.1
> > org.apache.felix.bundlerepository-1.6.6
> > org.apache.servicemix.bundles.xstream-1.3_3
> >
> >
> >
> > I have gotten as bundles to profile without any result
> >
> > could someone help me????   PLEASE
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/how-to-deploy-a-project-with-a-CAMEL-XSTREAM-in-fuse-fabric-container-tp5753655.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/
>



-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Re: how to deploy a project with a CAMEL-XSTREAM in fuse fabric container

Posted by Claus Ibsen <cl...@gmail.com>.
The xml file is that spring or blueprint?

Favor blueprint as that generally works better with OSGi.

On Thu, Jul 10, 2014 at 10:35 PM, aioria3077 <ai...@gmail.com> wrote:
> they would greatly appreciate your help
>
> my exercise is to convert a CSV separated by "|" to a XML, in which I'm
> using camel-bindy and camel-xstream,
>
> everything works fine if running with "mvn camel:run"
>
> I show my camel-context
>
> ...
> ...
> ...
> <bean id="activemq"
> class="org.apache.activemq.camel.component.ActiveMQComponent">
>         <property name="brokerURL" value="tcp://localhost:61618"/>
>         <property name="userName" value="admin"/>
>         <property name="password" value="admin"/>
>         </bean>
>
>   <camelContext xmlns="http://camel.apache.org/schema/spring">
>
>     <dataFormats>
>         <bindy id="bindy" type="Csv" classType="com.cion.csvBindy.CSVtoXML"/>
>         <xstream id="xstream">
>                         <aliases>
>                                 <alias name="movimiento" class="com.cion.csvBindy.CSVtoXML" />
>                         </aliases>
>         </xstream>
>     </dataFormats>
>
>     <route>
>       <from uri="file:work/input"/>
>                 <split parallelProcessing="true" streaming="true">
>             <tokenize token="\n" group="1"/>
>             <log message="${body}"/>
>             <to uri="activemq:colaSplit"/>
>         </split>
>     </route>
>
>     <route>
>         <from uri="activemq:colaSplit"/>
>         <log message="salida de la cola: ${body}"/>
>         <unmarshal ref="bindy"/>
>         <log message="despues de unmarshal: ${body}"/>
>         <marshal ref="xstream"/>
>         <log message="despues de marshal con Xstream: ${body}"/>
>         <to uri="activemq:colaXML"/>
>     </route>
>
> </camelContext>
>
> *REPEAT is working properly.*
>
> the problem comes when I have to deployar in a FUSE FABRIC CONTAINER
>
> for this I created a profile with the following characteristics:
>
> parents: mq-client, feature-camel
>
> features: camel, camel-spring, camel-core, camel-bindy, camel-xstream,
> activemq-camel
>
> repositories: mvn:org.apache.activemq......../features
>                    mvn:org.apache.camel.karaf......../features
>
> and the project as a bundle
>
> THE PROFILE IS PROVISIONED CORRECTLY, the "work / input" directory is
> created within the container
>
> when I insert the file, this is spent correctly, the problem comes in the
> second route right on the part of:
>
> <marshal ref="xstream"/>
>
> reviewing the log of the container, the error is as follows:
>
> 2014-07-10 13:23:56,497 | WARN  | sumer[colaSplit] | EndpointMessageListener
> | rg.apache.camel.util.CamelLogger  224 | 113 - org.apache.camel.camel-core
> - 2.12.0.redhat-610379 | Execution of JMS message listener failed. Caused
> by: [java.lang.NoClassDefFoundError - org/xmlpull/v1/XmlPullParserException]
> java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserException
>         at com.thoughtworks.xstream.XStream.<init>(XStream.java:350)
>         at
> org.apache.camel.dataformat.xstream.AbstractXStreamWrapper.createXStream(AbstractXStreamWrapper.java:79)
>         at
> org.apache.camel.dataformat.xstream.AbstractXStreamWrapper.getXStream(AbstractXStreamWrapper.java:66)
>         at
> org.apache.camel.dataformat.xstream.AbstractXStreamWrapper.marshal(AbstractXStreamWrapper.java:204)
>         at
> org.apache.camel.processor.MarshalProcessor.process(MarshalProcessor.java:81)
>         at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
>         at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
>         at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
>         at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>         at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)
>         at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)
>         at
> org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103)
>         at
> org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:562)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
>         at
> org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:500)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
>         at
> org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:468)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
>         at
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
>         at
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
>         at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1101)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
>         at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1093)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
>         at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:990)[129:org.apache.servicemix.bundles.spring-jms:3.2.8.RELEASE_1]
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_25]
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_25]
>         at java.lang.Thread.run(Thread.java:724)[:1.7.0_25]
> Caused by: java.lang.ClassNotFoundException:
> org.xmlpull.v1.XmlPullParserException not found by
> org.apache.servicemix.bundles.xstream [131]
>         at
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
>         at
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
>         at
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.7.0_25]
>         ... 25 more
>
>
>
>
> highlighting the following parts
>
>
> Execution of JMS message listener failed. Caused by:
> [java.lang.NoClassDefFoundError - org/xmlpull/v1/XmlPullParserException]
>
>
> Caused by: java.lang.ClassNotFoundException:
> org.xmlpull.v1.XmlPullParserException not found by
> org.apache.servicemix.bundles.xstream [131]
>
> I searched and download the packages
>
> pull-parser-2.1.10
> xmlpull-1.1.3.1
> org.apache.felix.bundlerepository-1.6.6
> org.apache.servicemix.bundles.xstream-1.3_3
>
>
>
> I have gotten as bundles to profile without any result
>
> could someone help me????   PLEASE
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/how-to-deploy-a-project-with-a-CAMEL-XSTREAM-in-fuse-fabric-container-tp5753655.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/