0 Replies Latest reply on Jul 1, 2016 2:55 AM by Rakesh Chhabria

    org.apache.camel.NoTypeConversionAvailableException

    Rakesh Chhabria Newbie

      Hi,

       

      I'm trying to call web service exposed by third party. After receiving the response I'm wrapping the response to the appropriate class. While marshaling the object of the wrapper class to xml string using "jaxb" I'm getting the error as : org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: com.unifyv4.ws.CreateOrganisationResponse to the required type: java.io.InputStream with value com.unifyv4.ws.CreateOrganisationResponse@312ea56e

       

      Detailed Stack Trace:

       

      n  |     BodyType        com.unifyv4.ws.CreateOrganisationResponse
      n  |     Body            com.unifyv4.ws.CreateOrganisationResponse@2c9a5080

      n  | ]n  | n  | Stacktracen  | ---------------------------------------------------------------------------------------------------------------------------------------

      java.io.IOException: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: com.unifyv4.ws.CreateOrganisationResponse to the required type: java.io.InputStream with value com.unifyv4.ws.CreateOrganisationResponse@2c9a5080

          at org.apache.camel.converter.jaxb.JaxbDataFormat.marshal(JaxbDataFormat.java:141)[235:org.apache.camel.camel-jaxb:2.15.1.redhat-621084]

          at org.apache.camel.processor.MarshalProcessor.process(MarshalProcessor.java:83)[198:org.apache.camel.camel-core:2.15.1.redhat-621084]

          at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)[198:org.apache.camel.camel-core:2.15.1.redhat-621084]

          at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:448)[198:org.apache.camel.camel-core:2.15.1.redhat-621084]

          at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[198:org.apache.camel.camel-core:2.15.1.redhat-621084]

          at org.apache.camel.processor.Pipeline.process(Pipeline.java:121)[198:org.apache.camel.camel-core:2.15.1.redhat-621084]

          at org.apache.camel.processor.Pipeline.access$100(Pipeline.java:44)[198:org.apache.camel.camel-core:2.15.1.redhat-621084]

          at org.apache.camel.processor.Pipeline$1.done(Pipeline.java:139)[198:org.apache.camel.camel-core:2.15.1.redhat-621084]

          at org.apache.camel.processor.CamelInternalProcessor$InternalCallback.done(CamelInternalProcessor.java:251)[198:org.apache.camel.camel-core:2.15.1.redhat-621084]

          at org.apache.camel.processor.RedeliveryErrorHandler$1.done(RedeliveryErrorHandler.java:460)[198:org.apache.camel.camel-core:2.15.1.redhat-621084]

          at org.apache.camel.management.InstrumentationProcessor$1.done(InstrumentationProcessor.java:86)[198:org.apache.camel.camel-core:2.15.1.redhat-621084]

          at org.apache.camel.processor.SendProcessor$1.done(SendProcessor.java:149)[198:org.apache.camel.camel-core:2.15.1.redhat-621084]

          at org.apache.camel.component.cxf.CxfClientCallback.handleResponse(CxfClientCallback.java:61)[207:org.apache.camel.camel-cxf:2.15.1.redhat-621084]

          at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:823)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621084]

          at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1644)[96:org.apache.cxf.cxf-rt-transports-http:3.0.4.redhat-621084]

          at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:1155)[96:org.apache.cxf.cxf-rt-transports-http:3.0.4.redhat-621084]

          at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$3.run(AutomaticWorkQueueImpl.java:428)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621084]

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_40]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_40]

          at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$AWQThreadFactory$1.run(AutomaticWorkQueueImpl.java:353)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621084]

          at java.lang.Thread.run(Thread.java:745)[:1.8.0_40]

      Caused by: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: com.unifyv4.ws.CreateOrganisationResponse to the required type: java.io.InputStream with value com.unifyv4.ws.CreateOrganisationResponse@2c9a5080

          at org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:177)[198:org.apache.camel.camel-core:2.15.1.redhat-621084]

          at org.apache.camel.core.osgi.OsgiTypeConverter.mandatoryConvertTo(OsgiTypeConverter.java:122)[204:org.apache.camel.camel-blueprint:2.15.1.redhat-621084]

          at org.apache.camel.converter.jaxb.JaxbDataFormat.marshal(JaxbDataFormat.java:172)[235:org.apache.camel.camel-jaxb:2.15.1.redhat-621084]

          at org.apache.camel.converter.jaxb.JaxbDataFormat.marshal(JaxbDataFormat.java:138)[235:org.apache.camel.camel-jaxb:2.15.1.redhat-621084]

          ... 20 more

       

       

      Attached is the project for the same.

       

      Kindly provide the update on this.

       

      Thanks and  Regards,

      Rakesh Chhabria.