saurav
saurav

Reputation: 5926

Cannot access error while creating a document in an open cmis based server

I have been trying to create a document inside an existing folder using the Open CMIS chemistry server.

While doing so i always get this error

Cannot access https://test.com/json/cc5646c4e12341020012fc05/root?objectId=oRZQrt4ApnNx6fj6hAZ-4rW3wp8MGpgiZ6bvQgnUmDQ": null

The folder id (under which i am trying to create a document )is correct which is as given in the url oRZQrt4ApnNx6fj6hAZ-4rW3wp8MGpgiZ6bvQgnUmDQ. I am not an admin of the server, do i need to have some write rights ?..not able to find the actual cause.

UPDATE: Stack trace which is coming

01-01 19:04:16.825: E/MetadataDownloadThread(18968): Error ERROR_CONNECT_FAILURE in metadata thread processing task (repository cc5646c4e12341020012fc05, High, DocumentUpload, Document: [oRZQrt4ApnNx6fj6hAZ-4rW3wp8MGpgiZ6bvQgnUmDQ, 1388583206977])
01-01 19:04:16.825: E/MetadataDownloadThread(18968): org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Cannot access "https://mobiledocs-mcm.hana.ondemand.com/mcm/b/json/cc5646c4e12341020012fc05/root?objectId=oRZQrt4ApnNx6fj6hAZ-4rW3wp8MGpgiZ6bvQgnUmDQ": null
01-01 19:04:16.825: E/MetadataDownloadThread(18968):    at org.apache.chemistry.opencmis.client.bindings.spi.http.AbstractApacheClientHttpInvoker.invoke(AbstractApacheClientHttpInvoker.java:305)
01-01 19:04:16.825: E/MetadataDownloadThread(18968):    at org.apache.chemistry.opencmis.client.bindings.spi.http.AbstractApacheClientHttpInvoker.invokePOST(AbstractApacheClientHttpInvoker.java:86)
01-01 19:04:16.825: E/MetadataDownloadThread(18968):    at org.apache.chemistry.opencmis.client.bindings.spi.browser.AbstractBrowserBindingService.post(AbstractBrowserBindingService.java:358)
01-01 19:04:16.825: E/MetadataDownloadThread(18968):    at org.apache.chemistry.opencmis.client.bindings.spi.browser.ObjectServiceImpl.createDocument(ObjectServiceImpl.java:83)
01-01 19:04:16.825: E/MetadataDownloadThread(18968):    at org.apache.chemistry.opencmis.client.runtime.SessionImpl.createDocument(SessionImpl.java:841)
01-01 19:04:16.825: E/MetadataDownloadThread(18968):    at org.apache.chemistry.opencmis.client.runtime.FolderImpl.createDocument(FolderImpl.java:75)
01-01 19:04:16.825: E/MetadataDownloadThread(18968):    at org.apache.chemistry.opencmis.client.runtime.FolderImpl.createDocument(FolderImpl.java:449)
01-01 19:04:16.825: E/MetadataDownloadThread(18968):    at com.test.mcm.MetadataDownloadThread.createDocumentOnServer(MetadataDownloadThread.java:549)
01-01 19:04:16.825: E/MetadataDownloadThread(18968):    at com.test.mcm.MetadataDownloadThread.run(MetadataDownloadThread.java:235)
01-01 19:04:16.825: E/MetadataDownloadThread(18968): Caused by: org.apache.http.client.ClientProtocolException
01-01 19:04:16.825: E/MetadataDownloadThread(18968):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:557)
01-01 19:04:16.825: E/MetadataDownloadThread(18968):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
01-01 19:04:16.825: E/MetadataDownloadThread(18968):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
01-01 19:04:16.825: E/MetadataDownloadThread(18968):    at org.apache.chemistry.opencmis.client.bindings.spi.http.AbstractApacheClientHttpInvoker.invoke(AbstractApacheClientHttpInvoker.java:256)
01-01 19:04:16.825: E/MetadataDownloadThread(18968):    ... 8 more
01-01 19:04:16.825: E/MetadataDownloadThread(18968): Caused by: org.apache.http.client.NonRepeatableRequestException: Cannot retry request with a non-repeatable request entity
01-01 19:04:16.825: E/MetadataDownloadThread(18968):    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:420)
01-01 19:04:16.825: E/MetadataDownloadThread(18968):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
01-01 19:04:16.825: E/MetadataDownloadThread(18968):    ... 11 more

The same url when i do a post through chrome i get the following json response.

{
    "exception": "permissionDenied",
    "message": "INVALID_TOKEN_PROVIDED"
}

Thanks and Regards, Saurav

Upvotes: 0

Views: 1368

Answers (1)

Florian Müller
Florian Müller

Reputation: 3235

Looks like you are you connecting to a SAP Mobile Documents server. Could you provide a stacktrace of the exception?

If you want to test from a web browser, you have to provide an extra token. Please see the SAP Mobile Documents documentation for details.

Upvotes: 1

Related Questions