Reputation: 9666
I tried to run the box connector after importing the project from github https://github.com/mulesoft/box-connector project running successfully but after grant permission, I am getting the following error,
Unable to fetch access token. Message payload is of type: NullPayload
Console Error:
ERROR 2015-10-05 13:36:28,731 [[doc-sample].auto-generated-listener-config-0.worker.01] org.mule.exception.DefaultMessagingExceptionStrategy:
Message : Unable to fetch access token. Message payload is of type: NullPayload Type : org.mule.api.MessagingException Code : MULE_ERROR--2 JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html Payload : {NullPayload}
Exception stack is: 1. null (java.lang.NullPointerException) org.mule.util.store.PartitionedPersistentObjectStore:105 (null) 2. Unable to fetch access token. Message payload is of type: NullPayload (org.mule.api.MessagingException)
Upvotes: 0
Views: 632
Reputation: 9666
The below code will work fine with version 3.7.2
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
<box:config name="Box" clientId="05zpeboxxfms6fo7805izrxff9dwbc74" clientSecret="LVD5juoF7ookFVn4uN69Pco3NI4EQeE0" doc:name="Box">
<box:oauth-callback-config domain="localhost" localPort="8082" remotePort="8082" path="callback"/>
</box:config>
<objectstore:config name="ObjectStore__Configuration" objectStore-ref="_defaultInMemoryObjectStore" doc:name="ObjectStore: Configuration" />
<flow name="boxAuthenticationFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/auth" doc:name="HTTP"/>
<box:authorize config-ref="Box" doc:name="Box-Authorize" />
</flow>
Upvotes: 0
Reputation: 9666
<http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="8081" doc:name="HTTP Listener Configuration"/>
<flow name="cookbook-helloworldFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
<component class="com.enkindle.Greeting" doc:name="Java"/>
</flow>
Upvotes: 0
Reputation: 367
Its working for me without issues. Anyway below is the my working POC code XML. Give a try with this and note that I am using Mule 3.5.2 run time version
<box:config name="Box_Global_Connector" clientId="*********"
clientSecret="********" doc:name="Box">
<box:oauth-callback-config domain="localhost"
localPort="8083" path="callback" remotePort="8083" />
</box:config>
<flow name="mule_box_authorize" doc:name="mule_box_authorize">
<http:inbound-endpoint exchange-pattern="request-response"
host="localhost" port="8082" path="createFolder" doc:name="HTTP" />
<logger message="---- Box authorize service triggred" level="INFO"
doc:name="Logger" />
<box:authorize config-ref="Box_Global_Connector"
doc:name="Box_Authorize" />
<box:create-folder config-ref="Box_Global_Connector"
folderName="Sample_Folder_07Oct2015_v2" doc:name="Box_CreateFolder" />
</flow>
Upvotes: 1
Reputation: 367
Recently I did a POC on Integrating Mule ESB with Box using Mule Box Connector and made a PPT on this. Just go through the below slidshare PPT for more details
http://www.slideshare.net/RamakrishnaNarkedami/mule-integration-with-box
Also Share your mule config XML code to see where is the issue.
Upvotes: 0