简体   繁体   English

org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException:意外的文档! 收到:原子条目

[英]org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Unexpected document! Received: Atom Entry

Im trying to create a client application connmecting to Sharepoint 2013. 我正在尝试创建连接到Sharepoint 2013的客户端应用程序。

Im receiving this kind of exception, seems the response cant be parsed by the library i used which is chemistry cmis library. 我收到这种异常,看来响应无法由我使用的化学cimis库解析。

Below is my code: 下面是我的代码:

public Session fillParams() {//define some values for the connection string

    Map<String, String> parameter = new HashMap<String, String>();

    // Set the user credentials
    parameter.put(SessionParameter.USER, "**");
    parameter.put(SessionParameter.PASSWORD, "**");

    // Specify the connection settings
    parameter.put(SessionParameter.ATOMPUB_URL, "http://bbdurl.bbd.cloudappsportal.com/sites/_api/web");
    parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());

    // Set the alfresco object factory
    parameter.put(SessionParameter.OBJECT_FACTORY_CLASS, "org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl");

    // Create a session
    SessionFactory factory = SessionFactoryImpl.newInstance();
    List<Repository> repositories = new ArrayList<Repository>();
    repositories = factory.getRepositories(parameter);
    Repository repository = repositories.get(0);

    Session session = factory.createSession(parameter);
    return session;
}

Full stack trace: 完整堆栈跟踪:

Exception in thread "main" org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Unexpected document! Received: Atom Entry
    at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.parse(AbstractAtomPubService.java:602)
    at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getRepositoriesInternal(AbstractAtomPubService.java:783)
    at org.apache.chemistry.opencmis.client.bindings.spi.atompub.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:65)
    at org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:88)
    at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:133)
    at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:111)
    at sample.CMISConnect.fillParams(CMISConnect.java:59)
    at sample.CMISConnect.main(CMISConnect.java:70)

This is not a CMIS URL. 这不是CMIS URL。 Make sure that the CMIS producer is activated on SharePoint 2013 (it's turned off by default) and then try this URL pattern: http:///_vti_bin/cmis/rest?getRepositories 确保在SharePoint 2013上激活了CMIS生产者(默认情况下已关闭),然后尝试以下URL模式:http:/// _ vti_bin / cmis / rest?getRepositories

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException - org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException org.apache.chemistry.opencmis.commons.exceptions.CmisUnauthorizedException:未经授权 - org.apache.chemistry.opencmis.commons.exceptions.CmisUnauthorizedException: Unauthorized CMIS java.lang.RuntimeException:java.lang.NoClassDefFoundError:org / apache / chemistry / opencmis / client / api / SessionFactory - CMIS java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/chemistry/opencmis/client/api/SessionFactory org.apache.chemistry.opencmis.client.api.CmisObject上的getRenditions()返回null - getRenditions() on org.apache.chemistry.opencmis.client.api.CmisObject returns null 引起原因:java.lang.ClassNotFoundException:org.apache.chemistry.opencmis.server.shared.AbstractCmisHttpServlet - Caused by: java.lang.ClassNotFoundException: org.apache.chemistry.opencmis.server.shared.AbstractCmisHttpServlet 使用Apache Chemistry对OpenCMIS服务器进行本地绑定 - Local binding to an OpenCMIS server using Apache Chemistry java.lang.NoClassDefFoundError:org / apache / chemistry / opencmis / client / api / SessionFactory - java.lang.NoClassDefFoundError: org/apache/chemistry/opencmis/client/api/SessionFactory Apache Chemistry OpenCMIS服务器不会在JBoss AS 7上部署 - Apache Chemistry OpenCMIS server won't deploy on JBoss AS 7 通过化学OpenCMIS更新户外内容类型 - Update alfresco content type through chemistry OpenCMIS org.apache.commons.net.ftp.FTPClient 的问题,获取 FTP 响应 421 接收错误 - Problems with org.apache.commons.net.ftp.FTPClient, getting FTP response 421 received error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM