CmisObjectNotFoundException: Not Found

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2014 01:43 AM
Hi All,
I have developed one app using <strong>alfresco android sdk 1.3.1.</strong>
This app was running fine but suddenly it started throwing exception like <strong>CmisObjectNotFoundException: Not Found…</strong>
Sometimes it starts working automatically when I am in different LAN connection.
The alfresco is installed on local machine…
I am using Android studio and emulator for development.. however I am not able to connect through mobile too….
I am connecting to the alfresco using IP address as below…
<strong>this.session = RepositorySession.connect("http://192.168.43.73:8080/alfresco", username, password);</strong>
However the below line works fine..
<strong>String urlStr = url +"service/api/login?u=" +username +"&pw=" +password;</strong>
One more question I am having is, why I am not able to connect alfresco using localhost instead of IP address…?
<strong>Exception:</strong>
06-07 05:32:31.670 2225-2237/com.sign.alfdroid.app E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #1
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:299)
Caused by: org.alfresco.mobile.android.api.exceptions.AlfrescoSessionException: org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException: Not Found
at org.alfresco.mobile.android.api.session.impl.AbstractAlfrescoSessionImpl.createSession(AbstractAlfrescoSessionImpl.java:460)
at org.alfresco.mobile.android.api.session.impl.RepositorySessionImpl.authenticate(RepositorySessionImpl.java:93)
at android.os.AsyncTask$2.call(AsyncTask.java:287)
Caused by: <strong>org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException: Not Found</strong>
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:474)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.read(AbstractAtomPubService.java:621)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getRepositoriesInternal(AbstractAtomPubService.java:787)
I have developed one app using <strong>alfresco android sdk 1.3.1.</strong>
This app was running fine but suddenly it started throwing exception like <strong>CmisObjectNotFoundException: Not Found…</strong>
Sometimes it starts working automatically when I am in different LAN connection.
The alfresco is installed on local machine…
I am using Android studio and emulator for development.. however I am not able to connect through mobile too….
I am connecting to the alfresco using IP address as below…
<strong>this.session = RepositorySession.connect("http://192.168.43.73:8080/alfresco", username, password);</strong>
However the below line works fine..
<strong>String urlStr = url +"service/api/login?u=" +username +"&pw=" +password;</strong>
One more question I am having is, why I am not able to connect alfresco using localhost instead of IP address…?
<strong>Exception:</strong>
06-07 05:32:31.670 2225-2237/com.sign.alfdroid.app E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #1
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:299)
Caused by: org.alfresco.mobile.android.api.exceptions.AlfrescoSessionException: org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException: Not Found
at org.alfresco.mobile.android.api.session.impl.AbstractAlfrescoSessionImpl.createSession(AbstractAlfrescoSessionImpl.java:460)
at org.alfresco.mobile.android.api.session.impl.RepositorySessionImpl.authenticate(RepositorySessionImpl.java:93)
at android.os.AsyncTask$2.call(AsyncTask.java:287)
Caused by: <strong>org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException: Not Found</strong>
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:474)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.read(AbstractAtomPubService.java:621)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getRepositoriesInternal(AbstractAtomPubService.java:787)
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2014 04:18 AM
Aloah,
The localhost refers to the device on which the code is running, in this case the emulator and not your computer where Alfresco Server is installed.
If you want to refer to the computer which is running the Android simulator, use the IP address 10.0.2.2 instead. You can read more from here.
About the CmisObjectNotFoundException I think it might come from a network disconnection from your emulator.
Sometimes emulator have bad habits to disconnect intempestively from networks… which can cause this exception.
Check the network with opening a browser for example and try to go to the alfresco share interface.
If you can't it's surely a network issue.
If it's not the case, do you encounter this issue only during session creation or also when executing other part of your code ?
Hope it helps.
The localhost refers to the device on which the code is running, in this case the emulator and not your computer where Alfresco Server is installed.
If you want to refer to the computer which is running the Android simulator, use the IP address 10.0.2.2 instead. You can read more from here.
About the CmisObjectNotFoundException I think it might come from a network disconnection from your emulator.
Sometimes emulator have bad habits to disconnect intempestively from networks… which can cause this exception.
Check the network with opening a browser for example and try to go to the alfresco share interface.
If you can't it's surely a network issue.
If it's not the case, do you encounter this issue only during session creation or also when executing other part of your code ?
Hope it helps.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2014 05:40 AM
Thanks for your reply jm.pascal
The exception comes when I try to create a session…
Thanks!
The exception comes when I try to create a session…
Thanks!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2014 12:33 PM
What's the version number of your Alfresco Repository ?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2014 01:03 AM
Thanks pascal,
Your first reply helped me and I solved the problem. As you told there could be problem with network and it was so…
I forgot to put Internet permission in my mobile app and that is why it was not getting connected….
Thanks a lot…
Your first reply helped me and I solved the problem. As you told there could be problem with network and it was so…
I forgot to put Internet permission in my mobile app and that is why it was not getting connected….
Thanks a lot…
