You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "venkata nagaraju (JIRA)" <ji...@apache.org> on 2017/07/15 18:35:00 UTC

[jira] [Commented] (CAMEL-6535) Exhausted after delivery attempt: 1 caught: javax.xml.transform.TransformerException: java.lang.NullPointerException

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

venkata nagaraju commented on CAMEL-6535:
-----------------------------------------

I also faced the same issue when using camel routing. I just done a simple route from activemq queue to a bean and it works fine for the first time and i am able to get the exchange but it was retrying to get the message from the same queue which was already consumed resulting into NullPointer Excpetion in my pojo.

My route is very simple
from(queueName).process(new ActionFlowProcess()).to("bean:JsonPojo?method=toString");
i got the exchange printed in my pojo method toString. but after that its a nagging issue

"UX_BSL_SR": {
		"action" :"BoltCancel",
		"SR_Header": {
			"OrderType": "BoltOnCancel",
			"ServiceRequestId": "Portal/App-Order-unique no",
			"RequestorChannelId": "Portal/App",
			"SrDate": "2017-07-15 5:55",
			"BackendChannel": "CRM"
			},
		"OrderType": "BoltOnCancel",
		"DeviceID": "",
		"AccountNumber":"",
		"SR_Message": {
			"OrderId": "Portal/App-Order-unique no",
			"BoltOn":[
					{					
					"Name": "BoltOn Name",
					"DealEndT": ""
					},
					{
					"Name": "BoltOn Name",
					"DealEndT": ""
					}
				],
				"Element1":"",
				"Element2":"",
				"Element3":""			
			}
}
}
BoltCancel
[Camel (camel-1) thread #0 - JmsConsumer[MbAppRequest]] ERROR org.apache.camel.processor.DefaultErrorHandler - Failed delivery for (MessageId: ID:DESKTOP-CH47PTC-61893-1500165070986-4:3:1:1:22 on ExchangeId: ID-DESKTOP-CH47PTC-65415-1500188330138-0-1). Exhausted after delivery attempt: 1 caught: java.lang.NullPointerException
java.lang.NullPointerException
	at com.covalense.csmart.model.JsonPojo.toString(JsonPojo.java:57)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:405)
	at org.apache.camel.component.bean.MethodInfo$1.doProceed(MethodInfo.java:278)
	at org.apache.camel.component.bean.MethodInfo$1.proceed(MethodInfo.java:251)
	at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:166)
	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
	at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:67)
	at org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:103)
	at org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:71)
	at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:122)
	at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:298)
	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:117)
	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at org.apache.camel.processor.interceptor.BacklogTracerInterceptor.process(BacklogTracerInterceptor.java:84)
	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:391)
	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:273)
	at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:46)
	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:335)
	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)

> Exhausted after delivery attempt: 1 caught: javax.xml.transform.TransformerException: java.lang.NullPointerException
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-6535
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6535
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-xslt
>    Affects Versions: 2.11.0
>         Environment: Windows
>            Reporter: Premkumar.TR
>            Priority: Minor
>
> I have created a route which getting a messsage from a JMS queue and remove the header and match it with XSD then map it to the destination xml. But while i doing it in a flow it breaks in the mapping and getting the below error.
> "Exhausted after delivery attempt: 1 caught: javax.xml.transform.TransformerException: java.lang.NullPointerException"
> Please find my Route :
> 	    <from uri="jms:queue:INPUTQueue"/>
> 	    <log message="LOG : XML File received from input Queue:"/>
> 	    <log message="LOG : SOAP Header removel process Started:"/>
>             <to uri="xslt:src/main/resources/Header_Removel_XSL.xsl"/>
>             <log message="LOG : SOAP Header removel Completed: Validation process Started:"/>
>             <to uri="validator:xsds/schema.xsd"/>
>             <log message="LOG : Validation process Completed: Mapping Started"/>
>             <to uri="xslt:src/main/resources/Mapping.xsl"/>
>             <log message="LOG : Mapping Completed:"/>
>             <to uri="jms:queue:OUTPUTQueue"/>
>             <log message="Output Message : ${body}"/>
> I have tested the Mapping.xsl alone and its wqorking fine. Please find the error below, Its a showstopper to us so kindly do the needful as ap.
> Error Message :
> DefaultErrorHandler            ERROR Failed delivery for (MessageId: queue_INPUT_Queue_ID_380a24259dc672ce51f20064110a134f0000000000000001 on ExchangeId: ID-CDC1-L-2C5LYX1-65478-1373437252921-0-1). Exhausted after delivery attempt: 1 caught: javax.xml.transform.TransformerException: java.lang.NullPointerException
> javax.xml.transform.TransformerException: java.lang.NullPointerException
> 	at com.ibm.xtq.xslt.jaxp.TransformerImpl.transform(Unknown Source)[:]
> 	at org.apache.camel.builder.xml.XsltBuilder.process(XsltBuilder.java:128)[camel-core-2.10.0.fuse-71-047.jar:2.10.0.fuse-71-047]
> 	at org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:101)[camel-core-2.10.0.fuse-71-047.jar:2.10.0.fuse-71-047]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)