如何在Muleosft中获取有关Dataweave异常的更多信息 [英] How to get more information about dataweave exception in muleosft
问题描述
执行m子流时,我低于dataweave异常:
I am getting below dataweave exception while executing a mule flow :
"
INFO 2016-11-06 09:02:42,097 [[abc].HTTP_Listener_Configuration.worker.01] com.mulesoft.weave.mule.utils.MuleWeaveFactory$: MimeType was not resolved '*/*' delegating to Java.
ERROR 2016-11-06 09:02:42,290 [[abc].HTTP_Listener_Configuration.worker.01] org.mule.exception.CatchMessagingExceptionStrategy:
Message : Exception while executing:
"Response": {
^
Unexpected character '\u000a' at index 25 (line 2, position 24), expected '"'
Payload : test
Payload Type : java.lang.String
Element : /Process11/processors/9/1/9 @ abc:def.xml:331 (TM_F1)
Element XML : <dw:transform-message doc:name="TM_F1">
<dw:set-payload>%dw 1.0%output application/json---{Data: [{// in_id : flowVars.instanceId,pd: '{AmIds:[{AmId:' ++ flowVars.AmId ++ '}]}'}]}</dw:set-payload>
</dw:transform-message>
Root Exception stack trace:
com.mulesoft.weave.reader.json.JsonReaderException: Unexpected character '\u000a' at index 25 (line 2, position 24), expected '"'
at com.mulesoft.weave.reader.json.JsonTokenizer.fail(JsonTokenizer.scala:193)
at com.mulesoft.weave.reader.json.JsonTokenizer.require(JsonTokenizer.scala:190)
at com.mulesoft.weave.reader.json.JsonTokenizer.readString(JsonTokenizer.scala:80)
"
是否有可能启用更多的调试选项来获取有关此特定异常的更多信息,以便于找出根本原因.
Is there any possibility to enable more debug options to get more information about this particular exception so that it will be easy to find out the root cause.
这里的问题是,即使我没有在转换消息中使用有效负载,但由于muleflow中先前的http调用返回的有效负载,我还是报错了.
The problem here is, even though i am not using the payload in transform message i am getting error because of the payload returned by the previous http call in muleflow.
M子的版本是:Studio 6.1和运行时3.8.
Mule version is : studio 6.1 and runtime 3.8.
请帮助我解决此问题.
谢谢 sdg
推荐答案
这不是dataweave问题.异常来自JsonReaderException:
This is not dataweave question. Exception what you have is from JsonReaderException:
com.mulesoft.weave.reader.json.JsonReaderException: Unexpected character '\u000a' at index 25 (line 2, position 24), expected '"'
这意味着您提供的JSON在第2行的位置设置了新行(\ u000a),我想这是这样的:
It means that JSON what you provide has new line (\u000a) ate line 2 position 24. I imagine it is something like this:
"Response": {
"Message" : "67890123
456 the end"
}
使用特殊字符表示JSON中的新行.
Use special characters to represent new line in JSON.
"Response": {
"Message" : "67890123\n456 the end"
}
这篇关于如何在Muleosft中获取有关Dataweave异常的更多信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!