我正在尝试将一个arraylist从mule发送到salesforce以保存一些数据,但我得到以下异常。
Status 500 Exception while executing: [{DocumentName="sample.pdf", Blobdata=[B@12a23ba8}, {DocumentName="sample2.pdf", Blobdata=[B@7ec5db40}] ^ Unexpected character 'D' at index 2 (line 1, position 3), expected '"' (com.mulesoft.weave.mule.exception.WeaveExecutionException). Message payload is of type: ArrayList
Root Exception stack trace:
com.mulesoft.weave.reader.json.JsonReaderException: Unexpected character 'D' at index 2 (line 1, position 3), expected '"'
at com.mulesoft.weave.reader.json.JsonTokenizer.fail(JsonTokenizer.scala:190)
at com.mulesoft.weave.reader.json.JsonTokenizer.require(JsonTokenizer.scala:187)
at com.mulesoft.weave.reader.json.JsonTokenizer.readString(JsonTokenizer.scala:74)
at com.mulesoft.weave.reader.json.JsonTokenizer.readObjectMembers(JsonTokenizer.scala:143)
at com.mulesoft.weave.reader.json.JsonTokenizer.com$mulesoft$weave$reader$json$JsonTokenizer$$readObject(JsonTokenizer.scala:137)
at com.mulesoft.weave.reader.json.JsonTokenizer$$anonfun$readValue$1.apply$mcV$sp(JsonTokenizer.scala:37)
at com.mulesoft.weave.reader.json.JsonTokenizer.inner(JsonTokenizer.scala:59)
at com.mulesoft.weave.reader.json.JsonTokenizer.readValue(JsonTokenizer.scala:37)
at com.mulesoft.weave.reader.json.JsonTokenizer.values$1(JsonTokenizer.scala:157)
at com.mulesoft.weave.reader.json.JsonTokenizer.com$mulesoft$weave$reader$json$JsonTokenizer$$readArray(JsonTokenizer.scala:160)
at com.mulesoft.weave.reader.json.JsonTokenizer$$anonfun$readValue$2.apply$mcV$sp(JsonTokenizer.scala:38)
at com.mulesoft.weave.reader.json.JsonTokenizer.inner(JsonTokenizer.scala:59)
at com.mulesoft.weave.reader.json.JsonTokenizer.readValue(JsonTokenizer.scala:38)
at com.mulesoft.weave.reader.json.JsonTokenizer.tokens(JsonTokenizer.scala:16)
at com.mulesoft.weave.reader.json.JsonReader.root(JsonReader.scala:17)
at com.mulesoft.weave.mule.reader.ReusableReader.root(ReusableReader.scala:12)
at com.mulesoft.weave.engine.ExecutionContext$InternalExecutionContext$$anonfun$3.apply(ExecutionContext.scala:29)
at com.mulesoft.weave.engine.ExecutionContext$InternalExecutionContext$$anonfun$3.apply(ExecutionContext.scala:26)
at scala.collection.immutable.Map$Map1.foreach(Map.scala:116)
at com.mulesoft.weave.engine.ExecutionContext$InternalExecutionContext.<init>(ExecutionContext.scala:26)
at com.mulesoft.weave.engine.ExecutionContext$.apply(ExecutionContext.scala:126)
at com.mulesoft.weave.engine.Engine.execute(Engine.scala:216)
at com.mulesoft.weave.mule.WeaveMessageProcessor.execute(WeaveMessageProcessor.scala:119)
at com.mulesoft.weave.mule.WeaveMessageProcessor.process(WeaveMessageProcessor.scala:68)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:88)
at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:98)
at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
at org.mule.processor.AsyncInterceptingMessageProcessor.process(AsyncInterceptingMessageProcessor.java:102)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:98)
at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
at org.mule.construct.DynamicPipelineMessageProcessor.process(DynamicPipelineMessageProcessor.java:55)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:88)
at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.Blo...
以上是我在尝试发送列表时遇到的异常。 我如何解决它?
答案 0 :(得分:0)
如果您的Salesforce连接器放在DataWeave转换器之后,DataSense应该向DataWeave转换器提供元数据信息。
因此,DataWeave转换器输出元数据应该向您显示要向Salesforce提供的内容。这应该是Salesforce特定的对象。
此处提供更多信息:https://docs.mulesoft.com/mule-user-guide/v/3.7/dataweave-tutorial
在Salesforce中插入联系人的示例:https://www.mulesoft.com/exchange#!/import-contacts-into-salesforce