[ https://issues.apache.org/jira/browse/CAMEL-4449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13107140#comment-13107140 ]
Vadim TSes'ko edited comment on CAMEL-4449 at 9/17/11 7:26 PM: --------------------------------------------------------------- My message body class implements {{Serializable}}. It has Scala {{Tuple2[String, java.util.List[String]]}} type. was (Author: incubos): My message body class implements serializable. It is Scala Tuple2[String, java.util.List[String]]. > NullPointerException when unmarshalling using serialization data format > ----------------------------------------------------------------------- > > Key: CAMEL-4449 > URL: https://issues.apache.org/jira/browse/CAMEL-4449 > Project: Camel > Issue Type: Bug > Components: camel-core > Affects Versions: 2.8.0 > Environment: MacOS X 10.6.8 > Java 1.6.0_26 > Apache Camel 2.8.0 > Consuming from remote Kestrel queue (XStream marshalling/unmarshalling works > just fine) > Reporter: Vadim TSes'ko > Assignee: Claus Ibsen > Fix For: 2.8.2, 2.9.0 > > > Spring configuration: > {code:xml} > <!-- A custom CamelContext --> > <camel:camelContext id="camel"> > <!-- JSON data format marshalling --> > <camel:dataFormats> > <camel:serialization id="serialization"/> > </camel:dataFormats> > <!-- RawOffer input route --> > <camel:route> > <camel:from uri="kestrel://etl01f/feeds"/> > <camel:unmarshal ref="serialization"/> > <camel:to uri="bean:shard?method=consume"/> > </camel:route> > </camel:camelContext> > {code} > Exception: > {code:java} > run: > [java] log4j:WARN No appenders could be found for logger > (org.springframework.context.support.ClassPathXmlApplicationContext). > [java] log4j:WARN Please initialize the log4j system properly. > [java] log4j:WARN See > http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. > [java] 13:28:07.587 [main] INFO o.a.c.s.h.CamelNamespaceHandler - OSGi > environment not detected. > [java] 13:28:09.028 [main] INFO o.a.camel.spring.SpringCamelContext - > Apache Camel 2.8.0 (CamelContext: camel) is starting > [java] 13:28:09.028 [main] INFO o.a.camel.spring.SpringCamelContext - > JMX enabled. Using ManagedManagementStrategy. > [java] 13:28:09.415 [main] INFO o.a.c.i.c.AnnotationTypeConverterLoader > - Found 3 packages with 14 @Converter classes to load > [java] 13:28:09.489 [main] INFO o.a.c.i.c.DefaultTypeConverter - Loaded > 153 core type converters (total 153 type converters) > [java] 13:28:09.528 [main] INFO o.a.c.i.c.DefaultTypeConverter - Loaded > additional 0 type converters (total 153 type converters) in 0.003 seconds > [java] 13:28:09.730 [main] INFO o.a.c.c.kestrel.KestrelComponent - > Creating endpoint for queue "feeds" on etl01f, parameters={} > [java] 13:28:09.967 [main] INFO o.a.c.c.kestrel.KestrelComponent - > Creating MemcachedClient for etl01f/feeds > [java] 2011-09-14 13:28:10.073 INFO > net.spy.memcached.MemcachedConnection: Added {QA > sa=etl01f/95.108.229.218:22133, #Rops=0, #Wops=0, #iq=0, topRop=null, > topWop=null, toWrite=0, interested=0} to connect queue > [java] 2011-09-14 13:28:10.084 INFO > net.spy.memcached.MemcachedConnection: Connection state changed for > sun.nio.ch.SelectionKeyImpl@711b50a1 > [java] 13:28:10.293 [main] INFO o.a.c.c.kestrel.KestrelConsumer - > Starting consumer for kestrel://etl01f/feeds > [java] 13:28:10.302 [main] INFO o.a.camel.spring.SpringCamelContext - > Route: route1 started and consuming from: Endpoint[kestrel://etl01f/feeds] > [java] 13:28:10.318 [main] INFO o.a.camel.spring.SpringCamelContext - > Total 1 routes, of which 1 is started. > [java] 13:28:10.318 [main] INFO o.a.camel.spring.SpringCamelContext - > Apache Camel 2.8.0 (CamelContext: camel) started in 1.291 seconds > [java] 13:28:12.858 [Camel (camel) thread #0 - > Poller-kestrel://etl01f/feeds] ERROR o.a.c.processor.DefaultErrorHandler - > Failed delivery for exchangeId: ID-incubos-osx-local-51787-1315992488896-0-1. > Exhausted after delivery attempt: 1 caught: java.lang.NullPointerException > [java] java.lang.NullPointerException: null > [java] at > org.apache.camel.impl.SerializationDataFormat.unmarshal(SerializationDataFormat.java:57) > ~[camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:56) > ~[camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50) > ~[camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) > [camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98) > [camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89) > [camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69) > [camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) > [camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98) > [camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89) > [camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99) > ~[camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) > [camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:318) > [camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209) > [camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305) > [camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) > [camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.processor.Pipeline.process(Pipeline.java:116) > [camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.processor.Pipeline.process(Pipeline.java:79) > [camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102) > [camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78) > [camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98) > [camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89) > [camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69) > [camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104) > [camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:85) > [camel-core-2.8.0.jar:2.8.0] > [java] at > org.apache.camel.component.kestrel.KestrelConsumer$Poller.run(KestrelConsumer.java:230) > [camel-kestrel-2.8.0.jar:2.8.0] > [java] at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) > [na:1.6.0_26] > [java] at > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > [na:1.6.0_26] > [java] at java.util.concurrent.FutureTask.run(FutureTask.java:138) > [na:1.6.0_26] > [java] at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > [na:1.6.0_26] > [java] at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > [na:1.6.0_26] > [java] at java.lang.Thread.run(Thread.java:680) [na:1.6.0_26] > {code} > It seems that {{ExchangeHelper.convertToType()}} method returned {{null}} > because {{camelContext.getTypeConverter()}} returned {{null}}. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira