Not able to store data in mongodb
I am trying to store data received data(Json) from timer source in mongodb. But i am getting the below error. org.apache.camel.component.mongodb.CamelMongoDbException: MongoDB operation = insert, Body is not conversible to type Documentt nor List<Document>
I am following this example online: https://dzone.com/articles/apache-camel-mongodb-component-example?fbclid=IwAR0u8VuBNWmJtIyz7RRF9iYpYD9XTHmqorMopfbxQz884HO6QSkEjqhyXsY. When I get to the steps of trying to insert {name:"Anne"} into my database by making a POST request using Postman, I keep getting this error:
org.apache.camel.component.mongodb.CamelMongoDbException: MongoDB operation = insert, Body is not conversible to type DBObject nor List<DBObject>. The content-type I have set is raw (text).
I have tried adding .convertBodyTo("Document.class") after the from, but that gave me this error caused by: No type converter available to convert from type: org.apache.camel.converter.stream.InputStreamCache to the required type:
Is this problem related to Karavan or the general Camel issue?