Here's how the rote looks like
from("direct:runlegacyrules")
.routeId("executeLegacyRules")
.setProperty(SupplyItemRoutesConstants.ORIGINAL_MESSAGE, body())
.setHeader(Exchange.HTTP_METHOD, constant(HttpMethods.POST))
.setHeader(Exchange.ACCEPT_CONTENT_TYPE,
constant(SupplyItemRoutesConstants.JSON_CONTENT_TYPE))
.bean(jsonSupplyItemConverter, "convertToSupplyItemLegacyJson")
.convertBodyTo(String.class)
.choice()
//routing to this endpoint will check if V1 Legacy
validation toggle is
turned "on" or "off"
.when(predicate.new
DivisionPredicate()).to(SupplyItemRoutesConstants.TOGGLE_V1_LEGACY_VALIDATION_ENDPOINT)
//routing to this endpoint will check if V2 Legacy
validation toggle is
turned "on" or "off"
.when(not(predicate.new
DivisionPredicate())).to(SupplyItemRoutesConstants.TOGGLE_V2_LEGACY_VALIDATION_ENDPOINT)
.end();
The route above takes the message converts to JSON using the converter
jsonSupplyItemConverter and then converts to to String.class to be passed on
to the DivisionPredicate.
The intermittent exception occurs while converting the json to String.class.
This route is deployed on tomcat.
Thanks,
Preethi
--
View this message in context:
http://camel.465427.n5.nabble.com/Failing-to-load-converters-tp5750509p5750532.html
Sent from the Camel - Users mailing list archive at Nabble.com.