camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Re: Migration from Camel 1.6 to 2.7
Date Fri, 15 Apr 2011 06:16:02 GMT
Hi Vineet,

to get ahead with your transition from Camel 1.6 to 2.7 I suggest that 
you switch your routes to a serialization that is a bit more loosely 
coupled.
For example you could send JAXB serialized objects over the wire or use 
SOAP/JMS. For jaxb you need to annotate the objects and include the 
camel-jaxb jar in the classpath. The drawback is that
you cannot transpareantly call methods and have to send objects instead.

For SOAP/JMS you can use the Camel transport for CXF or CXF Endpoints. 
Again you will have to annotate the classes and the interface. If you 
want to be even more loosely coupled you should think about going wsdl 
first and generate the stub classes from the wsdl.

I know both solutions will make your communication more complex but 
often the advantage of not running into incompatibilities makes it worth.

Christian


Am 14.04.2011 23:43, schrieb Claus Ibsen:
> It seems like you got some messages on a JMS message queue which has
> send message to that queue using one version of Camel. And then you
> have another version of Camel consuming those messages. And then you
> have a version mis-match.
>
> You should use compatible versions of Camel on both sides. The problem
> is that you use javax.jmx.ObjectMessage (eg Java objects) as JMS
> messages. And thus they need to be serializable compatible.
>
>
>
>
> On Thu, Apr 14, 2011 at 11:40 PM, vineet<vineet.pandita@gmail.com>  wrote:
>> So we decided to migrate to Spring 3.0 and saw that we necessarily needed to
>> upgrade camel as well, since
>> org.springframework.jms.listener.serversession.ServerSessionFactory does not
>> exist in spring 3.0.
>>
>> We have different projects and they talk over JMS. I was planning to upgrade
>> only one project for now.
>>
>> So the issue I am having is when a message gets passed from a Project still
>> on 1.6 to my project on 2.7 I get the following error (please see below).
>>
>> Any ideas? To me it seems 1.6 serialized messages cannot be understood by
>> 2.7 so both my projects need to be on 2.7.
>> But that seems wrong to me.
>>
>> I am very new to camel.. so pardon me in case of me not knowing something
>> obvious!
>>
>> Thanks...
>> Vineet
>>
>>
>> ************************************************************************************************************************************
>> org.apache.camel.component.jms.JmsMessageListenerContainer - Execution of
>> JMS message listener failed, and no ErrorHandler has been set.
>> org.apache.camel.RuntimeCamelException: Failed to extract body due to:
>> javax.jms.JMSException: Failed to build body from bytes. Reason:
>> java.io.InvalidClassException:
>> org.apache.camel.component.bean.BeanInvocation; local class incompatible:
>> stream classdesc serialVersionUID = -9178727976940773498, local class
>> serialVersionUID = -7835266201358427212. Message: ActiveMQObjectMessage
>> {blah blah blah}
>>         at
>> org.apache.camel.component.jms.JmsBinding.extractBodyFromJms(JmsBinding.java:160)
>>         at
>> org.apache.camel.component.jms.JmsMessage.createBody(JmsMessage.java:183)
>>         at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:41)
>>         at org.apache.camel.impl.DefaultUnitOfWork.(DefaultUnitOfWork.java:72)
>>         at
>> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:94)
>>         at
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
>>         at
>> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
>>         at
>> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
>>         at
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
>>         at
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:103)
>>         at
>> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:85)
>>         at
>> org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:92)
>>         ... spring related stack trace
>> Caused by: javax.jms.JMSException: Failed to build body from bytes. Reason:
>> java.io.InvalidClassException:
>> org.apache.camel.component.bean.BeanInvocation; local class incompatible:
>> stream classdesc serialVersionUID = -9178727976940773498, local class
>> serialVersionUID = -7835266201358427212
>>         at
>> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
>>         at
>> org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:183)
>>         at
>> org.apache.camel.component.jms.JmsBinding.extractBodyFromJms(JmsBinding.java:127)
>>         ... 22 more
>> Caused by: java.io.InvalidClassException:
>> org.apache.camel.component.bean.BeanInvocation; local class incompatible:
>> stream classdesc serialVersionUID = -9178727976940773498, local class
>> serialVersionUID = -7835266201358427212
>>         at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)
>>         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
>>         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
>>         at
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
>>         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
>>         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
>>         at
>> org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:177)
>>         ... 23 more
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/Migration-from-Camel-1-6-to-2-7-tp4304191p4304191.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>
>

-- 
----
http://www.liquid-reality.de


Mime
View raw message