Do you have camel-xmljson in your classpath?

Regards,
Raúl.
On 30 Aug 2015 22:38, "anish.somadevan" <netan...@gmail.com> wrote:

> Hi Yogesh,
>
> I did define it as you mentoned, and referenced it in my route as given
> below,
>
> <dataFormats>
>     <xmljson id="xmljson"/>
>     <xmljson id="xmljsonWithOptions" forceTopLevelObject="true"
> trimSpaces="true" rootName="newRoot" skipNamespaces="true"
>              removeNamespacePrefixes="true" expandableProperties="d e"/>
> </dataFormats>
>
>
>  <route id="parseJSON">
>         <from uri="direct:inter2" />
>          <unmarshal ref="xmljsonWithOptions"/>
>
>
> But i still get the same error as mentioned earlier,
>
> JmsConsumer[ISEEOutboundQueue]) Apache Camel 2.10.3 (CamelContext: camel-4)
> is starting
> 21:30:46,732 INFO  [org.apache.camel.management.ManagementStrategyFactory]
> (Camel (camelAgent) thread #6 - JmsConsumer[ISEEOutboundQueue]) JMX
> enabled.
> 21:30:46,904 WARN  [org.apache.camel.util.ObjectHelper] (Camel (camelAgent)
> thread #6 - JmsConsumer[ISEEOutboundQueue]) Cannot find class:
> xmljsonWithOptions
> 21:30:46,905 INFO  [org.apache.camel.impl.DefaultCamelContext] (Camel
> (camelAgent) thread #6 - JmsConsumer[ISEEOutboundQueue]) Apache Camel
> 2.10.3
> (CamelContext: camel-4) is shutting down
> 21:30:46,909 INFO  [org.apache.camel.impl.converter.DefaultTypeConverter]
> (Camel (camelAgent) thread #6 - JmsConsumer[ISEEOutboundQueue])
> TypeConverterRegistry utilization[attempts=1, hits=1, misses=0, failures=0]
> mappings[total=186, misses=0]
> 21:30:46,911 INFO  [org.apache.camel.impl.DefaultCamelContext] (Camel
> (camelAgent) thread #6 - JmsConsumer[ISEEOutboundQueue]) Apache Camel
> 2.10.3
> (CamelContext: camel-4) is shutdown in 0.006 seconds. Uptime 0.191 seconds.
> 21:30:46,913 INFO  [com.acp.adapter.cameladapter.CamelOutboundAdapter]
> (Camel (camelAgent) thread #6 - JmsConsumer[ISEEOutboundQueue])
> CamelOutboundAdapter exception: Failed to create route parseJSON at: >>>
> Unmarshal[ref:xmljsonWithOptions] <<< in route: Route[[From[direct:inter2]]
> -> [ConvertBodyTo[java.lang.Stri... because of Cannot find data format in
> registry with ref: xmljsonWithOptions
>
>
> I see a warning mentioning that the class is not found
> 21:30:46,904 WARN  [org.apache.camel.util.ObjectHelper] (Camel (camelAgent)
> thread #6 - JmsConsumer[ISEEOutboundQueue]) Cannot find class:
> xmljsonWithOptions
>
> But when i refer my just "xmljson" in my route, it works fine. The JSON
> gets
> converted to XML.
> <route id="parseJSON">
>         <from uri="direct:inter2" />
>          <unmarshal ref="xmljson"/>
>
> Please let me know how to resolve this.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/JSON-to-XML-Conversion-tp5771032p5771083.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to