[ 
https://issues.apache.org/activemq/browse/CAMEL-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44204#action_44204
 ] 

Charles Moulliard commented on CAMEL-638:
-----------------------------------------

You can close the bug. Indeed the classes created in the package 
com.company.soft.type.schema weren't serialisable. After adding "implements 
serializable"  to each class, my camel routes have been executed perfectly.



> jaba.io.NotSerializableException - JAXB - ActiveMq when unmarshalled objects 
> are send to VM ActiveMQ
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-638
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-638
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-jaxb
>    Affects Versions: 1.4.0
>         Environment: Win 2K
>            Reporter: Charles Moulliard
>             Fix For: 1.5.0
>
>
> When I unmarshall a xml file using Jaxb through Camel and that I send the 
> result to an in-memory ActiveMq queue (brokerURL = VM), I receive the 
> following error :
> 1) Error
> GRAVE: Failed delivery for exchangeId: 
> ID-dell-charles/1108-1214228785562/0-2. On delivery attempt: 0 caught: 
> java.lang.RuntimeException: com.company.soft.type.schema.Document
> java.lang.RuntimeException: com.company.soft.type.schema.Document
>         at 
> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:104)
>         at 
> org.apache.activemq.command.ActiveMQObjectMessage.setObject(ActiveMQObjectMessage.java:155)
>         at 
> org.apache.activemq.ActiveMQSession.createObjectMessage(ActiveMQSession.java:317)
>         at 
> org.apache.activemq.pool.PooledSession.createObjectMessage(PooledSession.java:149)
>         at 
> org.apache.camel.component.jms.JmsBinding.createJmsMessage(JmsBinding.java:221)
>         at 
> org.apache.camel.component.jms.JmsBinding.makeJmsMessage(JmsBinding.java:136)
>         at 
> org.apache.camel.component.jms.JmsProducer$2.createMessage(JmsProducer.java:229)
>         at 
> org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:557)
>         at 
> org.springframework.jms.core.JmsTemplate$4.doInJms(JmsTemplate.java:538)
>         at 
> org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:459)
>         at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:535)
>         at 
> org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:227)
>         at 
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:61)
>         at 
> org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50)
>         at 
> org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:45)
>         at 
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:43)
>         at 
> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:85)
>         at 
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:57)
>         at 
> org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:50)
>         at 
> org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:45)
>         at 
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:43)
>         at 
> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
>         at 
> org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:146)
>         at 
> org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:90)
>         at 
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:39)
>         at 
> org.apache.camel.component.file.FileConsumer.pollFile(FileConsumer.java:128)
>         at 
> org.apache.camel.component.file.FileConsumer.pollFileOrDirectory(FileConsumer.java:77)
>         at 
> org.apache.camel.component.file.FileConsumer.pollFileOrDirectory(FileConsumer.java:84)
>         at 
> org.apache.camel.component.file.FileConsumer.poll(FileConsumer.java:57)
>         at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:65)
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
>         at 
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
>         at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
>         at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)
>         at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: java.io.NotSerializableException: 
> com.company.soft.type.schema.Document
>         at 
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
>         at 
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
>         at 
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
>         at 
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
>         at 
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
>         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
>         at 
> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:98)
> 2) Config
>         public void configure() {
>                 DataFormat jaxb = new JaxbDataFormat(
>                                 "com.company.soft.type.schema");
>                 
> errorHandler(deadLetterChannel("seda:errors").maximumRedeliveries(1)
>                                 .useExponentialBackOff());
>                 from(
>                                 
> "file:///c:/temp/test?moveNamePrefix=c:/temp/consumed/&moveNamePostfix=old")
>                                 .unmarshal(jaxb)
>                                 .to("activemq:queue:component.queue");
>                                
>                                
>                                
>        <camelContext useJmx="true"
>               xmlns="http://activemq.apache.org/camel/schema/spring";>         
>        
>       <package>com.company.soft.core.routing</package>
>           </camelContext>
>          
>           <!--  ActiveMQ brokerURL using VM protocol -->
>           <bean id="activemq" 
> class="org.apache.activemq.camel.component.ActiveMQComponent">
>         <property name="brokerURL" 
> value="vm://localhost:61616?broker.persistent=false"/>
>       </bean>
> 3) Version used : apache - Camel 1.4 SNAPSHOT, ActiveMQ - 5.1 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to