cancel
Showing results for 
Search instead for 
Did you mean: 

runtime exception while interecting with repository using CMIS api

ranveer
Champ in-the-making
Champ in-the-making
Hi all,

I am using CMIS api to interect with alfresco repository. My applcation is throwing exception while interecting with repository.

My application is in struts 2.0 . the stacktrace is

06:51:46,877 ERROR [com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor] (http–0.0.0.0-9090-4) Unexpected document! Received: HTML document: org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Unexpected document! Received: HTML document
        at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.parse(AbstractAtomPubService.java:596) [chemistry-opencmis-client-bindings-0.10.0.jar:0.10.0]
        at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getRepositoriesInternal(AbstractAtomPubService.java:777) [chemistry-opencmis-client-bindings-0.10.0.jar:0.10.0]
        at org.apache.chemistry.opencmis.client.bindings.spi.atompub.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:65) [chemistry-opencmis-client-bindings-0.10.0.jar:0.10.0]
        at org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:85) [chemistry-opencmis-client-bindings-0.10.0.jar:0.10.0]
        at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:109) [chemistry-opencmis-client-impl-0.10.0.jar:0.10.0]
        at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:96) [chemistry-opencmis-client-impl-0.10.0.jar:0.10.0]
6 REPLIES 6

afaust
Legendary Innovator
Legendary Innovator
Hello,

which CMIS API endpoint did you try to use? I see that the AtomPub service is in the stacktrace - can you give the endpoint configurations you have used?
Also, have you tried accessing the same URL to retrieve the list of repositories with a browser or cURL? Do you get a HTML page that way as well? What does it show?
Is there any output in the Alfresco logs?

Regards
Axel

ranveer
Champ in-the-making
Champ in-the-making
Basically, I haven't tried to change anything. I have few AMPs which runs fine in Windows. Now I tried to install Alfresco in Ubuntu and if I use the same AMPs I am getting this error. Same configuration works fine in Windows. I tried to put AMPs under amps folder and applied apply_amp.sh file. And restarted the alfresco and alfresco.log there was no error related to registering new AMP files.

kaynezhang
World-Class Innovator
World-Class Innovator
If it works fine in Windows but not in Ubuntu. It might be file encoding problem.

ranveer
Champ in-the-making
Champ in-the-making
Which file you are talking about.
<strong>AMP file or other file. </strong> I installed alfresco-4.2.c on ubuntu by refering this url

<a>http://www.linuxfunda.com/2013/07/29/how-to-install-alfresco-community-edition-on-ubuntu-12-04/ </a>

kaynezhang
World-Class Innovator
World-Class Innovator
I'm sorry I misunderstood you .I thought you just copied the files in AMPs  from windows to linux.

ranveer
Champ in-the-making
Champ in-the-making
<strong> I copied a.APM file from windows alfresco installation directory and paste the same file into the amp's folder of alfresco installation directory of linux machine. Is it correct ? </strong>