camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nico <>
Subject Marshaling to json from jdbc
Date Sat, 03 Nov 2012 23:22:54 GMT
Hello I've a route like the following:

		.setBody(constant("SELECT * FROM \"schema1\".\"table1\""))
			.marshal().json(JsonLibrary.XStream, Table1Record.class)

And the following class:

public class Table1Record {
	public Long field1;

	public Long getField1() {
		return field1;
	public void setField1(Long field1) {
		this.field1 = field1;

But eveen marshalling it to Table1Record, annotated with xstream, this
expression: exchange.getIn().getBody(String.class) returns me something like
this: {"linked-hash-map":{"entry":[{"string":"Field1","int":5}]}}

And exchange.getIn().getBody(Table1Record.class) returns me null...

Any clue on this?

If more information is needed please ask me.


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message