dataweave coersion string to array error -


i having issue in transforming message in dataweave, in mule 3.7. input xml has structure below: input xml

dataweave code: dataweave code

error below: exception stack is: 1. cannot coerce :string :array (com.mulesoft.weave.model.values.coercion.exception.unsupportedtypecoercionexception) com.mulesoft.weave.model.values.formatting.arrayformattypecoercionvalue:31 (null) 2. exception while executing: header_key : payload.data.header.key, ^ cannot coerce :string :array (com.mulesoft.weave.mule.exception.weaveexecutionexception) com.mulesoft.weave.mule.weavemessageprocessor$weaveoutputhandler:162 (null)


root exception stack trace: com.mulesoft.weave.model.values.coercion.exception.unsupportedtypecoercionexception: cannot coerce :string :array @ com.mulesoft.weave.model.values.formatting.arrayformattypecoercionvalue.evaluate(arrayformattypecoercionvalue.scala:31) @ com.mulesoft.weave.model.values.formatting.arrayformattypecoercionvalue.evaluate(arrayformattypecoercionvalue.scala:13) @ com.mulesoft.weave.reader.csv.csvwriter.writecsv(csvwriter.scala:70) @ com.mulesoft.weave.reader.csv.csvwriter.writevalue(csvwriter.scala:44) @ com.mulesoft.weave.model.values.value$class.write(value.scala:31) @ com.mulesoft.weave.engine.ast.structure.objectnode.write(objectnode.scala:11) @ com.mulesoft.weave.engine.engine.internalexecute(engine.scala:89) @ com.mulesoft.weave.engine.engine.execute(engine.scala:54) @ com.mulesoft.weave.engine.engine.execute(engine.scala:169) @ com.mulesoft.weave.mule.weavemessageprocessor$weaveoutputhandler.write(weavemessageprocessor.scala:159) @ org.mule.transformer.simple.objecttobytearray.dotransform(objecttobytearray.java:63) @ org.mule.transformer.abstracttransformer.transform(abstracttransformer.java:415) @ org.mule.defaultmulemessage.getpayload(defaultmulemessage.java:425) @ org.mule.defaultmulemessage.getpayload(defaultmulemessage.java:373) @ org.mule.defaultmulemessage.getpayloadasbytes(defaultmulemessage.java:714) @ org.mule.module.http.internal.listener.httpresponsebuilder.build(httpresponsebuilder.java:177) @ org.mule.module.http.internal.listener.httpmessageprocessortemplate.sendresponsetoclient(httpmessageprocessortemplate.java:97) @ org.mule.execution.asyncresponseflowprocessingphase.runphase(asyncresponseflowprocessingphase.java:83) @ org.mule.execution.asyncresponseflowprocessingphase.runphase(asyncresponseflowprocessingphase.java:38) @ org.mule.execution.phaseexecutionengine$internalphaseexecutionengine.phasesuccessfully(phaseexecutionengine.java:65) @ org.mule.execution.phaseexecutionengine$internalphaseexecutionengine.phasesuccessfully(phaseexecutionengine.java:69) @ com.mulesoft.mule.throttling.throttlingphase.runphase(throttlingphase.java:185) @ com.mulesoft.mule.throttling.throttlingphase.runphase(throttlingphase.java:1) @ org.mule.execution.phaseexecutionengine$internalphaseexecutionengine.process(phaseexecutionengine.java:114) @ org.mule.execution.phaseexecutionengine.process(phaseexecutionengine.java:41) @ org.mule.execution.mulemessageprocessingmanager.processmessage(mulemessageprocessingmanager.java:32) @ org.mule.module.http.internal.listener.defaulthttplistener$1.handlerequest(defaulthttplistener.java:126) @ org.mule.module.http.internal.listener.grizzly.grizzlyrequestdispatcherfilter.handleread(grizzlyrequestdispatcherfilter.java:83) @ org.glassfish.grizzly.filterchain.executorresolver$9.execute(executorresolver.java:119) @ org.glassfish.grizzly.filterchain.defaultfilterchain.executefilter(defaultfilterchain.java:283) @ org.glassfish.grizzly.filterchain.defaultfilterchain.executechainpart(defaultfilterchain.java:200) @ org.glassfish.grizzly.filterchain.defaultfilterchain.execute(defaultfilterchain.java:132) @ org.glassfish.grizzly.filterchain.defaultfilterchain.process(defaultfilterchain.java:111) @ org.glassfish.grizzly.processorexecutor.execute(processorexecutor.java:77) @ org.glassfish.grizzly.nio.transport.tcpniotransport.fireioevent(tcpniotransport.java:536) @ org.glassfish.grizzly.strategies.abstractiostrategy.fireioevent(abstractiostrategy.java:112) @ org.mule.module.http.internal.listener.grizzly.executorperserveraddressiostrategy.run0(executorperserveraddressiostrategy.java:102) @ org.mule.module.http.internal.listener.grizzly.executorperserveraddressiostrategy.access$100(executorperserveraddressiostrategy.java:30) @ org.mule.module.http.internal.listener.grizzly.executorperserveraddressiostrategy$workerthreadrunnable.run(executorperserveraddressiostrategy.java:125) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:745)

anyone has idea issue code? lot!

the thing can see map operator expects array , payload.data.po doesn't exist. know not getting npe, can check if error?


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -