You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by bocamel <jo...@gmail.com> on 2015/11/13 04:32:00 UTC

cxfendpoint consumer fails for certain WS soap calls (2.16.0) - nullpoint exception

After upgrade to 2.16.0, certain WS soap calls fail with the error below. 
This works with all the combinations of 2.15.x and CXF 3.1.x.  But it does
not work for 2.16.0 and CXF 3.1.x.  Is there any change I need to make for
the CXF endpoint (consumer or producer) for 2.16.0?  Using IDE, I could see
that for some soap calls, the in message body can be converted to String. 
But others it would only show CXFPayload.  These soap calls are almost
identical.

Thanks for any help!

Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
store file:
log\acme\uat\.\2015-11-12\failed_messages\----20151112-222445902.xml
	at
org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:292)
	at
org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:277)
	at
org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:165)
	at
org.apache.camel.component.file.GenericFileProducer.process(GenericFileProducer.java:79)
	at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
	at
org.apache.camel.processor.SendDynamicProcessor$1.doInAsyncProducer(SendDynamicProcessor.java:124)
	at
org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:341)
	at
org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:119)
	at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:460)
	at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)
	at
org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:137)
	at
org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:133)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.camel.InvalidPayloadException: No body available of
type: java.io.InputStream but has value:
org.apache.camel.component.cxf.CxfPayload@297d8e2e of type:
org.apache.camel.component.cxf.CxfPayload on: Message:
org.apache.camel.component.cxf.CxfPayload@297d8e2e. Caused by: Error during
type conversion from type: java.lang.String to the required type:
java.io.InputStream with value
org.apache.camel.component.cxf.CxfPayload@297d8e2e due Problem converting
content to Element. Exchange[ID-John-PCI-54846-1447385077811-0-10][Message:
org.apache.camel.component.cxf.CxfPayload@297d8e2e]. Caused by:
[org.apache.camel.TypeConversionException - Error during type conversion
from type: java.lang.String to the required type: java.io.InputStream with
value org.apache.camel.component.cxf.CxfPayload@297d8e2e due Problem
converting content to Element]
	at
org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:101)
	at
org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:273)
	... 17 more
Caused by: org.apache.camel.TypeConversionException: Error during type
conversion from type: java.lang.String to the required type:
java.io.InputStream with value
org.apache.camel.component.cxf.CxfPayload@297d8e2e due Problem converting
content to Element
	at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.createTypeConversionException(BaseTypeConverterRegistry.java:610)
	at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:177)
	at
org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:99)
	... 18 more
Caused by: org.apache.camel.RuntimeCamelException: Problem converting
content to Element
	at org.apache.camel.component.cxf.CxfPayload$1.get(CxfPayload.java:101)
	at org.apache.camel.component.cxf.CxfPayload$1.get(CxfPayload.java:66)
	at
org.apache.camel.component.cxf.converter.NodeListWrapper.item(NodeListWrapper.java:37)
	at
org.apache.camel.converter.jaxp.DomConverter.toString(DomConverter.java:73)
	at
org.apache.camel.converter.jaxp.DomConverter.toByteArray(DomConverter.java:144)
	at
org.apache.camel.converter.jaxp.DomConverter.toInputStream(DomConverter.java:139)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:1243)
	at
org.apache.camel.impl.converter.InstanceMethodTypeConverter.convertTo(InstanceMethodTypeConverter.java:78)
	at
org.apache.camel.support.TypeConverterSupport.convertTo(TypeConverterSupport.java:39)
	at
org.apache.camel.component.cxf.converter.CxfPayloadConverter.convertTo(CxfPayloadConverter.java:218)
	at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:1243)
	at
org.apache.camel.impl.converter.StaticMethodFallbackTypeConverter.convertTo(StaticMethodFallbackTypeConverter.java:62)
	at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.doConvertTo(BaseTypeConverterRegistry.java:333)
	at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:168)
	... 19 more
Caused by: java.lang.NullPointerException
	at
org.apache.camel.component.cxf.CxfPayload.addNamespace(CxfPayload.java:120)
	at org.apache.camel.component.cxf.CxfPayload$1.get(CxfPayload.java:97)
	... 39 more



--
View this message in context: http://camel.465427.n5.nabble.com/cxfendpoint-consumer-fails-for-certain-WS-soap-calls-2-16-0-nullpoint-exception-tp5773787.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: cxfendpoint consumer fails for certain WS soap calls (2.16.0) - nullpoint exception

Posted by Aki Yoshida <el...@gmail.com>.
there has been some recent fixes in Camel that are related to the
namespace handling.

Could you describe your scenario in more details? How is the route configured?

thanks.
aki

2015-11-13 4:32 GMT+01:00 bocamel <jo...@gmail.com>:
> After upgrade to 2.16.0, certain WS soap calls fail with the error below.
> This works with all the combinations of 2.15.x and CXF 3.1.x.  But it does
> not work for 2.16.0 and CXF 3.1.x.  Is there any change I need to make for
> the CXF endpoint (consumer or producer) for 2.16.0?  Using IDE, I could see
> that for some soap calls, the in message body can be converted to String.
> But others it would only show CXFPayload.  These soap calls are almost
> identical.
>
> Thanks for any help!
>
> Stacktrace
> ---------------------------------------------------------------------------------------------------------------------------------------
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
> store file:
> log\acme\uat\.\2015-11-12\failed_messages\----20151112-222445902.xml
>         at
> org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:292)
>         at
> org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:277)
>         at
> org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:165)
>         at
> org.apache.camel.component.file.GenericFileProducer.process(GenericFileProducer.java:79)
>         at
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>         at
> org.apache.camel.processor.SendDynamicProcessor$1.doInAsyncProducer(SendDynamicProcessor.java:124)
>         at
> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:341)
>         at
> org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:119)
>         at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:460)
>         at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
>         at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
>         at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)
>         at
> org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:137)
>         at
> org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:133)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.camel.InvalidPayloadException: No body available of
> type: java.io.InputStream but has value:
> org.apache.camel.component.cxf.CxfPayload@297d8e2e of type:
> org.apache.camel.component.cxf.CxfPayload on: Message:
> org.apache.camel.component.cxf.CxfPayload@297d8e2e. Caused by: Error during
> type conversion from type: java.lang.String to the required type:
> java.io.InputStream with value
> org.apache.camel.component.cxf.CxfPayload@297d8e2e due Problem converting
> content to Element. Exchange[ID-John-PCI-54846-1447385077811-0-10][Message:
> org.apache.camel.component.cxf.CxfPayload@297d8e2e]. Caused by:
> [org.apache.camel.TypeConversionException - Error during type conversion
> from type: java.lang.String to the required type: java.io.InputStream with
> value org.apache.camel.component.cxf.CxfPayload@297d8e2e due Problem
> converting content to Element]
>         at
> org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:101)
>         at
> org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:273)
>         ... 17 more
> Caused by: org.apache.camel.TypeConversionException: Error during type
> conversion from type: java.lang.String to the required type:
> java.io.InputStream with value
> org.apache.camel.component.cxf.CxfPayload@297d8e2e due Problem converting
> content to Element
>         at
> org.apache.camel.impl.converter.BaseTypeConverterRegistry.createTypeConversionException(BaseTypeConverterRegistry.java:610)
>         at
> org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:177)
>         at
> org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:99)
>         ... 18 more
> Caused by: org.apache.camel.RuntimeCamelException: Problem converting
> content to Element
>         at org.apache.camel.component.cxf.CxfPayload$1.get(CxfPayload.java:101)
>         at org.apache.camel.component.cxf.CxfPayload$1.get(CxfPayload.java:66)
>         at
> org.apache.camel.component.cxf.converter.NodeListWrapper.item(NodeListWrapper.java:37)
>         at
> org.apache.camel.converter.jaxp.DomConverter.toString(DomConverter.java:73)
>         at
> org.apache.camel.converter.jaxp.DomConverter.toByteArray(DomConverter.java:144)
>         at
> org.apache.camel.converter.jaxp.DomConverter.toInputStream(DomConverter.java:139)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:497)
>         at org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:1243)
>         at
> org.apache.camel.impl.converter.InstanceMethodTypeConverter.convertTo(InstanceMethodTypeConverter.java:78)
>         at
> org.apache.camel.support.TypeConverterSupport.convertTo(TypeConverterSupport.java:39)
>         at
> org.apache.camel.component.cxf.converter.CxfPayloadConverter.convertTo(CxfPayloadConverter.java:218)
>         at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:497)
>         at org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:1243)
>         at
> org.apache.camel.impl.converter.StaticMethodFallbackTypeConverter.convertTo(StaticMethodFallbackTypeConverter.java:62)
>         at
> org.apache.camel.impl.converter.BaseTypeConverterRegistry.doConvertTo(BaseTypeConverterRegistry.java:333)
>         at
> org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:168)
>         ... 19 more
> Caused by: java.lang.NullPointerException
>         at
> org.apache.camel.component.cxf.CxfPayload.addNamespace(CxfPayload.java:120)
>         at org.apache.camel.component.cxf.CxfPayload$1.get(CxfPayload.java:97)
>         ... 39 more
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/cxfendpoint-consumer-fails-for-certain-WS-soap-calls-2-16-0-nullpoint-exception-tp5773787.html
> Sent from the Camel - Users mailing list archive at Nabble.com.