Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.1.5
-
None
-
camel-cxf-transport 2.16.2
-
Novice
Description
When configuring a cxf-bus with:
<bean class="org.apache.cxf.ext.logging.LoggingFeature">
<property name="prettyLogging" value="${cxf.prettyLogging}" />
</bean>
you will get NPE inside String.getBytes, because the charset given is null:
java.lang.NullPointerException: null at java.lang.String.getBytes(String.java:917) ~[na:1.8.0_72] at org.apache.cxf.ext.logging.event.PrettyLoggingFilter.getPrettyMessage(PrettyLoggingFilter.java:69) ~[cxf-rt-features-logging-3.1.5.jar:3.1.5] at org.apache.cxf.ext.logging.event.PrettyLoggingFilter.send(PrettyLoggingFilter.java:48) ~[cxf-rt-features-logging-3.1.5.jar:3.1.5] at org.apache.cxf.ext.logging.LoggingInInterceptor.handleMessage(LoggingInInterceptor.java:62) ~[cxf-rt-features-logging-3.1.5.jar:3.1.5] at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[cxf-core-3.1.5.jar:3.1.5] at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) [cxf-core-3.1.5.jar:3.1.5] at org.apache.camel.component.cxf.transport.CamelDestination.incoming(CamelDestination.java:161) [camel-cxf-transport-2.16.2.jar:2.16.2] at org.apache.camel.component.cxf.transport.CamelDestination$ConsumerProcessor.process(CamelDestination.java:188) [camel-cxf-transport-2.16.2.jar:2.16.2] at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) [camel-core-2.16.2.jar:2.16.2] at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62) [camel-core-2.16.2.jar:2.16.2] at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:141) [camel-core-2.16.2.jar:2.16.2] at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77) [camel-core-2.16.2.jar:2.16.2] at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163) [camel-core-2.16.2.jar:2.16.2] at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:460) [camel-core-2.16.2.jar:2.16.2] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190) [camel-core-2.16.2.jar:2.16.2] at org.apache.camel.processor.Pipeline.process(Pipeline.java:121) [camel-core-2.16.2.jar:2.16.2] at org.apache.camel.processor.Pipeline.process(Pipeline.java:83) [camel-core-2.16.2.jar:2.16.2] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190) [camel-core-2.16.2.jar:2.16.2] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109) [camel-core-2.16.2.jar:2.16.2] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87) [camel-core-2.16.2.jar:2.16.2] at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:112) [camel-jms-2.16.2.jar:2.16.2] at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:721) [spring-jms-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:681) [spring-jms-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:651) [spring-jms-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:315) [spring-jms-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:233) [spring-jms-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1150) [spring-jms-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1142) [spring-jms-4.2.4.RELEASE.jar:4.2.4.RELEASE] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1039) [spring-jms-4.2.4.RELEASE.jar:4.2.4.RELEASE] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_72] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_72] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_72]