0
我剛開始Mule
我創建使用twitter
無法調用updateStatus。消息負載的類型爲:字符串
我使用mule 3.5
一個很簡單的例子,我開始與現在創建New Example Project
那麼Hello world
我使用twitter
和每一件事情看起來不錯,當我使用show user
我得到的JSON對象,但是當我做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)