【发布时间】:2015-01-30 12:59:00
【问题描述】:
我刚开始使用Mule 我正在使用twitter 创建一个非常简单的示例
我正在使用mule 3.5 我开始创建New Example Project 然后Hello world
现在我正在使用twitter,当我使用show user 时,一切看起来都还不错,但是当我使用update status 时,我得到了这个错误消息:
Failed to invoke updateStatus. Message payload is of type: String
这是我的 XML
<flow name="TwitterUserID" doc:name="TwitterUserID">
<http:inbound-endpoint exchange-pattern="request-response"
host="localhost" port="8081" doc:name="HTTP"
doc:description="This endpoint receives an HTTP message." />
<object-to-string-transformer doc:name="Object to String"/>
<twitter:update-status config-ref="Twitter" doc:name="Twitter" status="This is from
Mule "/>
<json:object-to-json-transformer doc:name="Object to JSON"/>
</flow>
错误
Root Exception stack trace:
twitter4j.internal.org.json.JSONException: JSONObject["text"] not found.
at twitter4j.internal.org.json.JSONObject.get(JSONObject.java:395)
at twitter4j.internal.org.json.JSONObject.getString(JSONObject.java:509)
at twitter4j.internal.json.StatusJSONImpl.init(StatusJSONImpl.java:166)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************
WARN 2014-01-27 08:57:13,406 [[hello-world].connector.http.mule.default.receiver.02]
org.apache.commons.httpclient.HttpMethodDirector: Unable to respond to any of these
challenges: {oauth=OAuth realm="https://api.twitter.com"}
ERROR 2014-01-27 08:57:13,409 [[hello-world].connector.http.mule.default.receiver.02]
org.mule.retry.notifiers.ConnectNotifier: Failed to connect/reconnect: Work Descriptor.
Root Exception was: JSONObject["text"] not found.. Type: class
twitter4j.internal.org.json.JSONException
ERROR 2014-01-27 08:57:13,412 [[hello-world].connector.http.mule.default.receiver.02]
org.mule.exception.DefaultMessagingExceptionStrategy:
********************************************************************************
Message : Failed to invoke updateStatus. Message payload is of type:
String
Code : MULE_ERROR--2
--------------------------------------------------------------------------------
Exception stack is:
1. JSONObject["text"] not found. (twitter4j.internal.org.json.JSONException)
twitter4j.internal.org.json.JSONObject:395 (null)
2. JSONObject["text"] not found. (twitter4j.TwitterException)
twitter4j.internal.json.StatusJSONImpl:172 (null)
3. Failed to invoke updateStatus. Message payload is of type: String
(org.mule.api.MessagingException)
org.mule.twitter.processors.UpdateStatusMessageProcessor:175
--------------------------------------------------------------------------------
Root Exception stack trace:
twitter4j.internal.org.json.JSONException: JSONObject["text"] not found.
at twitter4j.internal.org.json.JSONObject.get(JSONObject.java:395)
at twitter4j.internal.org.json.JSONObject.getString(JSONObject.java:509)
at twitter4j.internal.json.StatusJSONImpl.init(StatusJSONImpl.java:166)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
【问题讨论】:
标签: mule esb mule-studio