I have some problems with a following route:

The route

 - Receives json string an converts it to list (HashSet) of JSONObjects.
 - split the received list to json objects.
 - Set corresponding headers according to object content
 - Routes the messages according to headers to endpoint1.1 or endpoint1.2
 - Convert messages to mongodb Criteria and send to endpoint2
 - Endpoint2 routes messages according to another header to endpoint2.1 or
endpoint2.2.
 - Endpoint2.2 aggregates all received messages, processes it to get mongodb
Criteria and sends it to endpoint2.1 (completionSize is calculated at step 2
and saved in property "endpoint22").
 - Endpoint2.1 aggregates ALL messages (CamelSplitSize) converts aggregated
messages to Query object and sends it to Repository to retrieve the data.

 can see valid response object in debugger but anyway I get an error:
 - No message body writer has been found for class java.util.HashSet,
ContentType: application/json

The problem is not in response object as it works with other routes and it
does not contain HashSets.

My guess is that route sends to the output the HashSet created tat STEP 1...

The questions are:

 - what is wrong in the route output?
 - both recipientList() try to forward messages to invalid endpoint ( I have
to use .ignoreInvalidEndpoints() to avoid exception):

org.apache.camel.NoSuchEndpointException: No endpoint could be found for:
org.springframework.data.mongodb.core.query.Criteria@20f55e70, please check
your classpath contains the needed Camel component jar.


Any help would be much appreciated! Thanks.

repost:  http://stackoverflow.com/questions/36431973/apache-camel-eip-route
<http://stackoverflow.com/questions/36431973/apache-camel-eip-route>  



--
View this message in context: 
http://camel.465427.n5.nabble.com/EIP-Route-problem-tp5780512.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to