venkat
venkat

Reputation: 85

Message payload is of type: BufferInputStream

I am getting following error while reading the json data from text file. I am using transormer as json to object. I gave return class as java.util.HashMap. I tried to insert the data read from text file i.e. is in json format.

After running the application I got the below error.

Failed to transform from "json" to "java.util.HashMap". 
   Message payload is of type: BufferInputStream (org.mule.api.transformer.TransformerMessagingException). 
   Message payload is of type: BufferInputStream.

How to send data from text file to DB?

Upvotes: 0

Views: 758

Answers (2)

Swati Vatyani
Swati Vatyani

Reputation: 47

You can add transformer in the File Connector itself. In the File Connector, go to transformers and add json-to-object there.

Upvotes: 0

Manik Magar
Manik Magar

Reputation: 1401

Try adding object-to-string after file inbound and then try to use json-to-object. Looks like json to object is not able to decode from input stream.

Upvotes: 1

Related Questions