Only the body can be binary objects / headers cannot. On Tue, Feb 9, 2016 at 3:14 PM, Hubertus.Willuhn <hubertus.will...@dinsoftware.de> wrote: > Hi, > > i am using the LevelDB repository of Camel to store exchange while > aggregating. > > Every exchange contains a simple POJO in the header that serves as > aggregation predicate. > > But Camel don't wont to serialize my class because: > > WARN org.apache.camel.impl.DefaultExchangeHolder -- Exchange in headers > containing key: RECID with object: CEN-PRJ-22 of type: com.domain.ID is not > valid header type, it will be excluded by the holder. > > I look into the DefaultExchangeHolder and this function seems to be the > problem: > > protected static Object getValidHeaderValue(String headerName, Object > headerValue) { > > Why does this class do a check with the default java types? > In the official documentation of LevelDB ( > http://camel.apache.org/leveldb.html <http://camel.apache.org/leveldb.html> > ) you can read: > > LevelDBAggregationRepository will only preserve any Serializable compatible > data types. If a data type is not such a type its dropped and a WARN is > logged. And it only persists the Message body and the Message headers. The > Exchange properties are not persisted. > > So my class got the signature: > > public class ID implements Cloneable, Serializable { > > and only 3 properties: > > private final String org; > private final String type; > private String key; > > So it should be possible to store/restore this as header field? > Did i miss something here? > > Thanks in advance. > > Best regards, > > Hubertus Willuhn > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/LevelDB-and-Serializable-Bug-tp5777469.html > Sent from the Camel - Users mailing list archive at Nabble.com.
-- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2