The WARN is from camel-jms when you send to a jms endpoint and the message body type cannot be determined to match a suitable JMS type.
When this happens it fallback to use Object type which is serialized java objects which often is not desired. See the jms page for more details and how mapping, and what you can do http://camel.apache.org/jms On Thu, Jan 8, 2015 at 4:36 PM, James Green <james.mk.gr...@gmail.com> wrote: > This errors: > > from(source()) > .transacted() > .unmarshal(jacksonUnmarshall) > .process(router) > .recipientList(simple("${body.media}")) > .marshal(jacksonMarshall); > > The router sets the In of the Exchange to an object that has a List<String> > media. This is as single String of value "activemq:queue:foo". > > The error: > > 15:29:32,463 WARN org.apache.camel.component.jms.JmsBinding:486 > createJmsMessage() - Cannot determine specific JmsMessage type to use from > body class. Will use generic JmsMessage. Body class: > com.foo.server.ngw.msgtosend.MessageToSend. If you want to send a POJO then > your class might need to implement java.io.Serializable, or you can force a > specific type by setting the jmsMessageType option on the JMS endpoint. > > I tried with marshal before the recipientList but then ${body.media} cannot > be found. > > I'm guessing I'm bending things in ways not intended. The router wants to > set which media(s) the message should be transmitted onwards to. Camel > should then transmit to those as a set of queues. > > Pretty simple, but crashes. Suggestions? > > James -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@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/