使用 Chemistry CMIS 连接到 Alfresco 时出现服务不可用异常

Service Unavailable Exception while connecting to Alfresco with Chemistry CMIS

我正在使用以下 Chemistry CMIS 代码连接到 Alfresco

final SessionFactory sessionFactory = SessionFactoryImpl.newInstance();
// prepare connection parameters
final Map<String, String> connectionParameters = new HashMap<String, String>();
// User credentials.
connectionParameters.put(SessionParameter.USER,"******");
connectionParameters.put(SessionParameter.PASSWORD,"*****");
// Connection settings.
connectionParameters.put(SessionParameter.ATOMPUB_URL,"https://******/alfresco/api/-default-/public/cmis/versions/1.1/atom");
connectionParameters.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
connectionParameters.put(SessionParameter.OBJECT_FACTORY_CLASS, "org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl");
session = sessionFactory.getRepositories(connectionParameters).get(0).createSession();

我正在使用

<dependency>
    <groupId>org.apache.chemistry.opencmis</groupId>
    <artifactId>chemistry-opencmis-client-impl</artifactId>
    <version>1.0.0</version>
</dependency>

连接到它但出现以下错误

Exception in thread "main" org.apache.chemistry.opencmis.commons.exceptions.CmisServiceUnavailableException: Service Unavailable
    at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:518)
    at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.read(AbstractAtomPubService.java:701)
    at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getRepositoriesInternal(AbstractAtomPubService.java:873)
    at org.apache.chemistry.opencmis.client.bindings.spi.atompub.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:66)
    at org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:92)
    at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:120)
    at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:107)
    at com.ge.dms.batch.TestAPP.main(TestAPP.java:71)

请帮忙。

问题是由于 AWS 中安装的 alfresco 不稳定。正确重新安装 Alfresco 后,上面的代码可以正常工作。