mule - Data Weave transformatio expcetion on JSON inbound message to Json outbound message -


i trying following transformation in data weave

%dw 1.0 %input in application/json %output application/json --- flowvars["xyz"] 

"xyz" variable json object. ask because need merge 2 payload(payload + variable) 1 json object , first step.

also if provide payload instead of flowvars["xyz"] same error.the payload of same type json object.

the following stack trace

root exception stack trace: com.mulesoft.weave.writer.json.jsoninvalidstructureexception: json can have 1 top-level value , value can either array or object @ com.mulesoft.weave.writer.json.jsonwriter.value(jsonwriter.scala:44) @ com.mulesoft.weave.writer.json.jsonwriter.value(jsonwriter.scala:36) @ com.mulesoft.weave.engine.engine.internalexecute(engine.scala:88) @ com.mulesoft.weave.engine.engine.execute(engine.scala:53) @ com.mulesoft.weave.engine.engine.execute(engine.scala:181) @ com.mulesoft.weave.mule.weavemessageprocessor$weaveoutputhandler.write(weavemessageprocessor.scala:198) @ org.mule.transformer.simple.objecttostring.createstringfromoutputhandler(objecttostring.java:102) @ org.mule.transformer.simple.objecttostring.dotransform(objecttostring.java:56) @ org.mule.transformer.abstracttransformer.transform(abstracttransformer.java:415) @ org.mule.transformer.abstracttransformer.transform(abstracttransformer.java:366) @ org.mule.defaultmulemessage.transformmessage(defaultmulemessage.java:1606) @ org.mule.defaultmulemessage.applyalltransformers(defaultmulemessage.java:1509) @ org.mule.defaultmulemessage.applytransformers(defaultmulemessage.java:1487) @ org.mule.defaultmulemessage.applytransformers(defaultmulemessage.java:1479) @ org.mule.transformer.abstracttransformer.process(abstracttransformer.java:114) @ org.mule.execution.exceptiontomessagingexceptionexecutioninterceptor.execute(exceptiontomessagingexceptionexecutioninterceptor.java:24) @ org.mule.execution.messageprocessornotificationexecutioninterceptor.execute(messageprocessornotificationexecutioninterceptor.java:107) @ org.mule.execution.messageprocessorexecutiontemplate.execute(messageprocessorexecutiontemplate.java:44) @ org.mule.processor.blockingprocessorexecutor.executenext(blockingprocessorexecutor.java:94) @ org.mule.processor.blockingprocessorexecutor.execute(blockingprocessorexecutor.java:56) @ org.mule.execution.exceptiontomessagingexceptionexecutioninterceptor.execute(exceptiontomessagingexceptionexecutioninterceptor.java:24) @ org.mule.execution.messageprocessorexecutiontemplate.execute(messageprocessorexecutiontemplate.java:44) @ org.mule.processor.blockingprocessorexecutor.executenext(blockingprocessorexecutor.java:94) @ org.mule.processor.blockingprocessorexecutor.execute(blockingprocessorexecutor.java:56) @ org.mule.processor.asyncinterceptingmessageprocessor.process(asyncinterceptingmessageprocessor.java:102) @ org.mule.execution.exceptiontomessagingexceptionexecutioninterceptor.execute(exceptiontomessagingexceptionexecutioninterceptor.java:24) @ org.mule.execution.messageprocessornotificationexecutioninterceptor.execute(messageprocessornotificationexecutioninterceptor.java:107) @ org.mule.execution.messageprocessorexecutiontemplate.execute(messageprocessorexecutiontemplate.java:44) @ org.mule.processor.blockingprocessorexecutor.executenext(blockingprocessorexecutor.java:94) @ org.mule.processor.blockingprocessorexecutor.execute(blockingprocessorexecutor.java:56) @ org.mule.construct.dynamicpipelinemessageprocessor.process(dynamicpipelinemessageprocessor.java:55) @ org.mule.execution.exceptiontomessagingexceptionexecutioninterceptor.execute(exceptiontomessagingexceptionexecutioninterceptor.java:24) @ org.mule.execution.messageprocessornotificationexecutioninterceptor.execute(messageprocessornotificationexecutioninterceptor.java:107) @ org.mule.execution.messageprocessorexecutiontemplate.execute(messageprocessorexecutiontemplate.java:44) @ org.mule.processor.blockingprocessorexecutor.executenext(blockingprocessorexecutor.java:85) @ org.mule.processor.blockingprocessorexecutor.execute(blockingprocessorexecutor.java:56) @ org.mule.execution.exceptiontomessagingexceptionexecutioninterceptor.execute(exceptiontomessagingexceptionexecutioninterceptor.java:24) @ org.mule.execution.messageprocessorexecutiontemplate.execute(messageprocessorexecutiontemplate.java:44) @ org.mule.processor.blockingprocessorexecutor.executenext(blockingprocessorexecutor.java:94) @ org.mule.processor.blockingprocessorexecutor.execute(blockingprocessorexecutor.java:56) @ org.mule.interceptor.abstractenvelopeinterceptor.processblocking(abstractenvelopeinterceptor.java:58) @ org.mule.processor.abstractrequestresponsemessageprocessor.process(abstractrequestresponsemessageprocessor.java:47) @ org.mule.execution.exceptiontomessagingexceptionexecutioninterceptor.execute(exceptiontomessagingexceptionexecutioninterceptor.java:24) @ org.mule.execution.messageprocessornotificationexecutioninterceptor.execute(messageprocessornotificationexecutioninterceptor.java:107) @ org.mule.execution.messageprocessorexecutiontemplate.execute(messageprocessorexecutiontemplate.java:44) @ org.mule.processor.blockingprocessorexecutor.executenext(blockingprocessorexecutor.java:94) @ org.mule.processor.blockingprocessorexecutor.execute(blocking... 

let me know if more information needed

you need set mime-type in flowvar application/json. need set payload if it's not.


Comments

Post a Comment

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -