camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Toomey <ctoo...@gmail.com>
Subject Type converter for serialized object?
Date Fri, 28 Mar 2014 01:15:30 GMT
I'm working on an app that's using akka camel (the akka camel extension) to
send/receive JMS messages to/from another application that is using Spring
Integration.

In our first baby steps in integration testing we're getting the following
exception when trying to convert a message whose body is a serialized
instance of an application-specific class C via
camelMessage.getBodyAs(C.class, ctx):

Caught exception: org.apache.camel.NoTypeConversionAvailableException: No
type converter available to convert from type: byte[] to the required type:
C

I've verified that the camel message body is the serialized object of type
C as I can deserialize it into the object in separate test code that I
wrote to check that.

Do the default type converters that Camel uses not include one that can
deserialize a serialized object?  If that's true, is there a type converter
that does this that I can include, or do I need to write a custom
converter?  Aren't serialized objects as message bodies quite a common use
case?

thx,
Chris

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message