0 Replies Latest reply on Apr 15, 2019 12:31 AM by kullboys

    Data format 'json-jackson' could not be created


      Hi everyone,



      I have a simple route like this,



      <routes xmlns="http://camel.apache.org/schema/spring">






          <from uri="switchyard://IObjectMapper"/>



               <log message="IObjectMapper - JSON Request: ${



               <process ref="BookServiceMappingProcess"/>



               <log message="JSON Response: ${body}"/>



          <to uri="switchyard://IBookService"/>



               <process ref="BookResultProcess"/>






                    <json library="Jackson" prettyPrint="true"/>






               <log message="IBookService Response: ${body}"/>












      I expect result message with json formatted, so I try to marshal message body using Jackson library.

      If I try to deploy the app to the JBoss EAP, Failed to start service with error bellow:






      Caused by: java.lang.IllegalArgumentException: Data format 'json-jackson' could not be created. Ensure that the data format is valid and the associated Camel component is present on the classpath



        at org.apache.camel.model.DataFormatDefinition.getDataFormat(DataFormatDefinition.java:89)



        at org.apache.camel.model.DataFormatDefinition.getDataFormat(DataFormatDefinition.java:79)



        at org.apache.camel.model.UnmarshalDefinition.createProcessor(UnmarshalDefinition.java:156)



        at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:461)



        at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:179)



        at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:876)



        ... 15 more






      If I mark,




            <json library="Jackson" prettyPrint="true"/>





      the app success to deploy and running well, but i don't get message body as json formatted.



      I don't have any clue for fix this issue. Please any kind of advise.