问题描述
我认为这是某种通用的MuleSoft错误消息,基本上说它对输入或输出不满意,但是我已经做了最简单的流程,据我所知,没有任何参数可用于通过.
I think this is some type of generic MuleSoft error message, basically saying that it's either unhappy about the input or output, but I've made the simplest flow that I can, and as far as I know there are no parameters to pass.
我正在尝试的测试流程:
The test flow I'm trying to do:
HTTP -> ZenDesk/ListTickets -> Set Payload ("hello world")
我看过的东西:
- 我正在使用全局配置,并且连接验证
- 我正在使用密码(相对于安全令牌)
- 如果我输入的密码不正确,则会得到401的预期结果,如果我改用密钥,则会得到相同的结果
- 我在ZenDesk中拥有admin/API特权
- 我能够通过浏览器使用REST API
- 列表票证"没有列出任何输入参数,请参见文档
- 如果之后我将有效载荷"设置为简单的字符串,则返回类型无关紧要
- 进行调试时,在ZenDesk和SetPayload上具有断点,它永远不会进入设置有效载荷"步骤
- I'm using a global config and the connection verifies
- I'm using my password (vs. the security token)
- If I make the password incorrect I get a 401 as expected, same if I use my key instead
- I have admin/API privs in ZenDesk
- I'm able to use the REST API from a browser
- There aren't any input parameters listed for "List Tickets", see doc
- If I do a Set Payload to a simple string afterwards then the return type shouldn't matter
- When doing debugging, with breakpoints on the ZenDesk and SetPayload, it never gets to the Set Payload step
在浏览器中,我得到:
null (java.lang.UnsupportedOperationException). Message payload is of type: ZendeskConnector$1
在控制台中,我看到:
Message : null (java.lang.UnsupportedOperationException). Message payload is of type: ZendeskConnector$1
Code : MULE_ERROR--2
--------------------------------------------------------------------------------
Exception stack is:
1. null (java.lang.UnsupportedOperationException)
org.mule.modules.utils.pagination.PaginatedCollection:84 (null)
2. null (java.lang.UnsupportedOperationException). Message payload is of type: ZendeskConnector$1 (org.mule.api.MessagingException)
org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor:35 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
java.lang.UnsupportedOperationException
at org.mule.modules.utils.pagination.PaginatedCollection.toArray(PaginatedCollection.java:84)
at com.mulesoft.mule.debugger.response.ObjectFieldDefinitionFactory.create(ObjectFieldDefinitionFactory.java:51)
at com.mulesoft.mule.debugger.response.ObjectFieldDefinitionFactory.createFromObject(ObjectFieldDefinitionFactory.java:133)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
Mule Flow xml文件:(虽然非常简单)
Mule Flow xml file: (though really simple)
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:zendesk="http://www.mulesoft.org/schema/mule/zendesk"
xmlns:data-mapper="http://www.mulesoft.org/schema/mule/ee/data-mapper"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:json="http://www.mulesoft.org/schema/mule/json"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:core="http://www.mulesoft.org/schema/mule/core"
version="EE-3.4.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/solr/1.0.0/mule-solr.xsd
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd
http://www.mulesoft.org/schema/mule/ee/data-mapper http://www.mulesoft.org/schema/mule/ee/data-mapper/current/mule-data-mapper.xsd
http://www.mulesoft.org/schema/mule/zendesk http://www.mulesoft.org/schema/mule/zendesk/1.0/mule-zendesk.xsd">
<zendesk:config name="Zendesk" username="[email protected]" password="password-not-security-token" apiUrl="https://my-company.zendesk.com/api/v2/" doc:name="Zendesk">
<zendesk:connection-pooling-profile initialisationPolicy="INITIALISE_ONE" exhaustedAction="WHEN_EXHAUSTED_GROW"/>
</zendesk:config>
<flow name="my_flow" doc:name="my_flow">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" path="zendesk" doc:name="HTTP"/>
<zendesk:list-tickets config-ref="Zendesk" doc:name="Zendesk" />
<set-payload value="Hello World" doc:name="Set Payload"/>
</flow>
</mule>
推荐答案
这是类型转换错误...您来自zendesk的味精是特定的类对象,因此请我们使用转换器来转换消息,它将正常工作...
It is type casting error ... your msg is coming from zendesk is particular class object so please us transformer to transform message and it will work fine...
这篇关于Mule + ZenDesk:无用的错误消息:"null(java.lang.UnsupportedOperationException).消息有效载荷的类型为:ZendeskConnector $ 1".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!