Why setting transferExchange to enabled throws a NullPointer Exception inside the main Camel Route ?

Solution Unverified - Updated -

Issue

  • Inside the blueprint are defined 2 routes. The main is:
<route id="WebServiceRoute">
    <from uri="cxfrs:bean:rsServer?resourceClasses=ws.platform.rest.service.TestService" />
    <inOnly uri="amq:queue:TestQ?transferExchange=true" />
        .
        .
        .
</route>
  • The second route is defined as following :
<camel:route id="testRoute" errorHandlerRef="DefaultErrorHandler" >
    <from uri="amq:queue:TestQ?transferExchange=true" />    
  • Setting the option transferExchange="true", during the test is throws the following exception:
2015-04-23 03:59:58,308 | WARN  | 176568118-109212 | WebApplicationExceptionMapper    | pl.WebApplicationExceptionMapper   73 | 1510 - org.apache.cxf.cxf-rt-frontend-jaxrs - 2.7.0.redhat-611412 | javax.ws.rs.WebApplicationException: org.apache.camel.RuntimeCamelException: java.lang.NullPointerException
        at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.returnResponse(CxfRsInvoker.java:161)
        at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.asyncInvoke(CxfRsInvoker.java:107)
        at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.performInvocation(CxfRsInvoker.java:57)
.........
Caused by: org.apache.camel.RuntimeCamelException: java.lang.NullPointerException
        at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1363)
        at org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:1005)
.........
Caused by: java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:514)
        at java.util.Hashtable.putAll(Hashtable.java:587)
        at java.util.Hashtable.<init>(Hashtable.java:297)
        at org.apache.camel.converter.CollectionConverter.toHashtable(CollectionConverter.java:114)
  • So how can I fix that?

Environment

  • Red Hat JBoss Fuse
    • 6.1.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content