Unable to use a custom data format id in the dataformat producer endpoint
Issue
Unable to use a custom data format id in the dataformat producer endpoint due to org.apache.camel.FailedToCreateRouteException.
camel route
<camelContext id="camel-context" xmlns="http://camel.apache.org/schema/spring" streamCache="true">
<dataFormats>
<json id="json1" library="Jackson" unmarshalTypeName="com.sample.Request" />
</dataFormats>
<route id="test">
<from uri="direct:test" />
<to uri="dataformat:json1:unmarshal"></to>
</route>
</camelContext>
error
org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route test at: >>> To[dataformat:json1:unmarshal] <<< in route: Route(test)[[From[direct:test]] -> [To[dataformat:json1:unma... because of Failed to resolve endpoint: dataformat://json1:unmarshal due to: Cannot find data format with name: json1
Environment
- Red Hat Fuse
- 7.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.