camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CAMEL-798) NullPointerException is generated when Flatpack component is used with Tracer
Date Sat, 09 Aug 2008 17:04:52 GMT

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

Claus Ibsen commented on CAMEL-798:
-----------------------------------

Charles about the bug?

You need to convert the content to something that can be serailized/handled by the JMS provider.
But as said before we should give the flatpack component an overhaul.

But can you test with this (there is a type converter from DataSet to Map)

from(flatpack:fixed:com/bravura/babel/transformation/cutas/in/CUTAS.xml)
.convertBodyTo(Map.class)
.to(activemq:queue:cutas.clientA.accepted.in);

I will close this as not a bug. And then we must make sure the flatpack stuff can be sent
to JMS out-of-the-box with eg a good type converter or a camel type that is seiralizable.

> NullPointerException is generated when Flatpack component is used with Tracer
> -----------------------------------------------------------------------------
>
>                 Key: CAMEL-798
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-798
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-flatpack
>    Affects Versions: 1.4.0
>            Reporter: Charles Moulliard
>             Fix For: 1.5.0
>
>
> Hi, 
> The following error is returned when Tracer is activated for the Flatpack component :
> 4317672 [Thread: 2 org.apache.camel.component.file.FileComponent@14f5a31] INFO  org.apache.camel.processor.interceptor.TraceInterceptor
 - ID-dell-charles/1671-1218196761734/1-1 -> interceptor2 Interceptor[Delegate(DeadLetterChannel[Delegate(TraceInterceptor[To[flatpack:fixed:com/bravura/babel/transformation/cutas/in/CUTAS.xml]]),
sendTo(Endpoint[seda:errors]), RedeliveryPolicy[maximumRedeliveries=1]])] InOnly Properties:{org.apache.camel.file.lock.name=c:\temp\cutas\input\clientA\ST000355.txt.cameLock,
org.apache.camel.file.lock=sun.nio.ch.FileLockImpl[0:9223372036854775807 exclusive valid],
org.apache.camel.fileChannel=sun.nio.ch.FileChannelImpl@4610fa} Headers:{org.apache.camel.file.name=ST000355.txt}
BodyType:java.io.File
> 4317672 [Thread: 2 org.apache.camel.component.file.FileComponent@14f5a31] INFO  org.apache.camel.processor.interceptor.TraceInterceptor
 - ID-dell-charles/1671-1218196761734/1-1 -> to4 To[flatpack:fixed:com/bravura/babel/transformation/cutas/in/CUTAS.xml]
InOnly Properties:{CamelCauseException=null, org.apache.camel.file.lock.name=c:\temp\cutas\input\clientA\ST000355.txt.cameLock,
org.apache.camel.file.lock=sun.nio.ch.FileLockImpl[0:9223372036854775807 exclusive valid],
org.apache.camel.fileChannel=sun.nio.ch.FileChannelImpl@4610fa} Headers:{org.apache.camel.file.name=ST000355.txt}
BodyType:java.io.File
> 4318031 [Thread: 2 org.apache.camel.component.file.FileComponent@14f5a31] INFO  org.apache.camel.processor.interceptor.TraceInterceptor
 - ID-dell-charles/1671-1218196761734/1-2 -> interceptor3 Interceptor[Delegate(DeadLetterChannel[Delegate(TraceInterceptor[To[activemq:queue:cutas.clientA.accepted.in]]),
sendTo(Endpoint[seda:errors]), RedeliveryPolicy[maximumRedeliveries=1]])] InOnly Properties:{}
Headers:{camelFlatpackCounter=0} BodyType:net.sf.flatpack.DefaultDataSet
> 4318031 [Thread: 2 org.apache.camel.component.file.FileComponent@14f5a31] INFO  org.apache.camel.processor.interceptor.TraceInterceptor
 - ID-dell-charles/1671-1218196761734/1-2 -> to5 To[activemq:queue:cutas.clientA.accepted.in]
InOnly Properties:{CamelCauseException=null} Headers:{camelFlatpackCounter=0} BodyType:net.sf.flatpack.DefaultDataSet
> 4318172 [Thread: 2 org.apache.camel.component.file.FileComponent@14f5a31] INFO  org.apache.camel.processor.interceptor.TraceInterceptor
 - ID-dell-charles/1671-1218196761734/1-3 -> interceptor3 Interceptor[Delegate(DeadLetterChannel[Delegate(TraceInterceptor[To[activemq:queue:cutas.clientA.accepted.in]]),
sendTo(Endpoint[seda:errors]), RedeliveryPolicy[maximumRedeliveries=1]])] InOnly Properties:{}
Headers:{camelFlatpackCounter=1} BodyType:net.sf.flatpack.DefaultDataSet
> 4318172 [Thread: 2 org.apache.camel.component.file.FileComponent@14f5a31] INFO  org.apache.camel.processor.interceptor.TraceInterceptor
 - ID-dell-charles/1671-1218196761734/1-3 -> to5 To[activemq:queue:cutas.clientA.accepted.in]
InOnly Properties:{CamelCauseException=null} Headers:{camelFlatpackCounter=1} BodyType:net.sf.flatpack.DefaultDataSet
> 4318172 [Thread: 2 org.apache.camel.component.file.FileComponent@14f5a31] INFO  org.apache.camel.processor.interceptor.TraceInterceptor
 - ID-dell-charles/1671-1218196761734/1-4 -> interceptor3 Interceptor[Delegate(DeadLetterChannel[Delegate(TraceInterceptor[To[activemq:queue:cutas.clientA.accepted.in]]),
sendTo(Endpoint[seda:errors]), RedeliveryPolicy[maximumRedeliveries=1]])] InOnly Properties:{}
Headers:{camelFlatpackCounter=2} BodyType:net.sf.flatpack.DefaultDataSet
> 4318172 [Thread: 2 org.apache.camel.component.file.FileComponent@14f5a31] INFO  org.apache.camel.processor.interceptor.TraceInterceptor
 - ID-dell-charles/1671-1218196761734/1-4 -> to5 To[activemq:queue:cutas.clientA.accepted.in]
InOnly Properties:{CamelCauseException=null} Headers:{camelFlatpackCounter=2} BodyType:net.sf.flatpack.DefaultDataSet
> 4318172 [Thread: 2 org.apache.camel.component.file.FileComponent@14f5a31] INFO  org.apache.camel.processor.interceptor.TraceInterceptor
 - ID-dell-charles/1671-1218196761734/1-5 -> interceptor3 Interceptor[Delegate(DeadLetterChannel[Delegate(TraceInterceptor[To[activemq:queue:cutas.clientA.accepted.in]]),
sendTo(Endpoint[seda:errors]), RedeliveryPolicy[maximumRedeliveries=1]])] InOnly Properties:{}
Headers:{camelFlatpackCounter=3} BodyType:net.sf.flatpack.DefaultDataSet
> 4318172 [Thread: 2 org.apache.camel.component.file.FileComponent@14f5a31] INFO  org.apache.camel.processor.interceptor.TraceInterceptor
 - ID-dell-charles/1671-1218196761734/1-5 -> to5 To[activemq:queue:cutas.clientA.accepted.in]
InOnly Properties:{CamelCauseException=null} Headers:{camelFlatpackCounter=3} BodyType:net.sf.flatpack.DefaultDataSet
> 4318172 [Thread: 2 org.apache.camel.component.file.FileComponent@14f5a31] INFO  org.apache.camel.processor.interceptor.TraceInterceptor
 - ID-dell-charles/1671-1218196761734/1-6 -> interceptor3 Interceptor[Delegate(DeadLetterChannel[Delegate(TraceInterceptor[To[activemq:queue:cutas.clientA.accepted.in]]),
sendTo(Endpoint[seda:errors]), RedeliveryPolicy[maximumRedeliveries=1]])] InOnly Properties:{}
Headers:{camelFlatpackCounter=4} BodyType:net.sf.flatpack.DefaultDataSet
> 4318172 [Thread: 2 org.apache.camel.component.file.FileComponent@14f5a31] INFO  org.apache.camel.processor.interceptor.TraceInterceptor
 - ID-dell-charles/1671-1218196761734/1-6 -> to5 To[activemq:queue:cutas.clientA.accepted.in]
InOnly Properties:{CamelCauseException=null} Headers:{camelFlatpackCounter=4} BodyType:net.sf.flatpack.DefaultDataSet
> 4318172 [Thread: 2 org.apache.camel.component.file.FileComponent@14f5a31] INFO  org.apache.camel.processor.interceptor.TraceInterceptor
 - ID-dell-charles/1671-1218196761734/1-7 -> interceptor3 Interceptor[Delegate(DeadLetterChannel[Delegate(TraceInterceptor[To[activemq:queue:cutas.clientA.accepted.in]]),
sendTo(Endpoint[seda:errors]), RedeliveryPolicy[maximumRedeliveries=1]])] InOnly Properties:{}
Headers:{camelFlatpackCounter=5} BodyType:net.sf.flatpack.DefaultDataSet
> 4318172 [Thread: 2 org.apache.camel.component.file.FileComponent@14f5a31] INFO  org.apache.camel.processor.interceptor.TraceInterceptor
 - ID-dell-charles/1671-1218196761734/1-7 -> to5 To[activemq:queue:cutas.clientA.accepted.in]
InOnly Properties:{CamelCauseException=null} Headers:{camelFlatpackCounter=5} BodyType:net.sf.flatpack.DefaultDataSet
> 4318219 [DefaultMessageListenerContainer-9] WARN  org.apache.camel.component.jms.EndpointMessageListener
 - Endpoint[activemq:queue:cutas.clientA.accepted.in] consumer caught an exception while processing
JMS message: ActiveMQMessage {commandId = 5, responseRequired = true, messageId = ID:dell-charles-1675-1218196762046-2:3:1:1:1,
originalDestination = null, originalTransactionId = null, producerId = ID:dell-charles-1675-1218196762046-2:3:1:1,
destination = queue://cutas.clientA.accepted.in, transactionId = null, expiration = 0, timestamp
= 1218196771187, arrival = 0, brokerInTime = 1218196771187, brokerOutTime = 1218196771218,
correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID
= null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content
= null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 1024,
properties = {camelFlatpackCounter=0}, readOnlyProperties = true, readOnlyBody = true, droppable
= false}
> 43org.apache.camel.RuntimeCamelException: java.lang.NullPointerException
> 	at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:71)
> 	at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:531)
> 	at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:466)
> 	at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:435)
> 	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:322)
> 	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
> 	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
> 	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:875)
> 	at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.NullPointerException
> 	at org.apache.camel.processor.interceptor.TraceFormatter.getBodyTypeAsString(TraceFormatter.java:124)
> 	at org.apache.camel.processor.interceptor.TraceFormatter.format(TraceFormatter.java:39)
> 	at org.apache.camel.processor.interceptor.TraceInterceptor.format(TraceInterceptor.java:68)
> 	at org.apache.camel.processor.Logger.logMessage(Logger.java:218)
> 	at org.apache.camel.processor.Logger.process(Logger.java:125)
> 	at org.apache.camel.processor.interceptor.TraceInterceptor.logException(TraceInterceptor.java:128)
> 	at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:59)
> 	at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
> 	at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:39)
> 	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
> 	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66)
> 	at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:68)
> 	... 8 more
> 	
> Code snippet :
> 	public void configure() {
> 			
> 		errorHandler(deadLetterChannel("seda:errors").maximumRedeliveries(1)
> 				.useExponentialBackOff());
> 		
>         // Display trace
> 		Tracer tracer = new Tracer();
> 		tracer.getFormatter().setShowBody(false);
> 		tracer.getFormatter().setShowHeaders(true);
> 		tracer.getFormatter().setShowNode(true);
> 		getContext().addInterceptStrategy(tracer);
> 		
> 	
> 		from(file:///c:/temp/cutas/input/clientA/?delete=false&amp;lock=true&amp;consumer.delay=500&amp;consumer.initialDelay=10)
> 		.to(flatpack:fixed:com/bravura/babel/transformation/cutas/in/CUTAS.xml);
> 		
> 		from(flatpack:fixed:com/bravura/babel/transformation/cutas/in/CUTAS.xml)
> 		.to(activemq:queue:cutas.clientA.accepted.in);

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


Mime
View raw message