<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic cmis atompub connection error in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/cmis-atompub-connection-error/m-p/61812#M21521</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Error:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Unexpected document! Received: HTML document&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This exception appears to happen when calling the getRepositories (please see below for code)&lt;/P&gt;&lt;P&gt;In the browser from the same server machine, we are able to access the Alfresco CMIS Atompub url, it gives back the atompub xml. &lt;STRONG&gt;Only from J2EE app, the connection is not working, so to speak&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;One thing to note is that these servers (J2EE/JBoss server, and Alfresco, etc) are on the "great" cloud environments. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I believe, it has something to do with the security or some cloud/network related process.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Did anyone have similar issues?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Environment fact&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Using: Alfresco 5.2 community&lt;/P&gt;&lt;P&gt;Application: EJB has this Alfresco CMIS API code&lt;/P&gt;&lt;P&gt;Host URL for reference&lt;/P&gt;&lt;P&gt;ttp://host//alfresco/api/-default-/public/cmis/versions/1.1/atom&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Map&amp;lt;String, String&amp;gt; parametersMap = new HashMap&amp;lt;String, String&amp;gt;();&lt;BR /&gt; parametersMap.put(SessionParameter.USER, this.configUser);&lt;BR /&gt; parametersMap.put(SessionParameter.PASSWORD, this.configUserPassword);&lt;BR /&gt; parametersMap.put(SessionParameter.ATOMPUB_URL, cmisAtomPubUrl);&lt;BR /&gt; parametersMap.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;SessionFactory sessionFactory = SessionFactoryImpl.newInstance();&lt;BR /&gt; List&amp;lt;Repository&amp;gt; repositories = new ArrayList&amp;lt;Repository&amp;gt;();&lt;BR /&gt; repositories = sessionFactory.getRepositories(parametersMap);&lt;BR /&gt; if (repositories == null || repositories.size() &amp;lt;= 0) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;more detailed exception&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Unexpected document! Received: HTML documentat org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.parse(AbstractAtomPubService.java:628)at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getRepositoriesInternal(AbstractAtomPubService.java:809)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:90)at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:135)at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:112)at com.sa.v4.dms.services.impl.AlfrescoCMISOpenWSProxyAdapter.initialize(AlfrescoCMISOpenWSProxyAdapter.java:154)at com.sa.v4.dms.services.DmsServicesAdapterFactory.getDmsServicesAdapter(DmsServicesAdapterFactory.java:22)at com.sa.v4.dms.DocumentRepositoryBean.ejbCreate(DocumentRepositoryBean.java:50)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptor.java:96)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.as.ejb3.component.session.SessionBeanSetSessionContextMethodInvocationInterceptor.processInvocation(SessionBeanSetSessionContextMethodInvocationInterceptor.java:56)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.as.ee.component.AroundConstructInterceptorFactory$1.processInvocation(AroundConstructInterceptorFactory.java:28)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:273)at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:347)at org.jboss.as.ejb3.tx.LifecycleCMTTxInterceptor.processInvocation(LifecycleCMTTxInterceptor.java:74)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161)at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:134)at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:88)at org.jboss.as.ejb3.component.stateless.StatelessSessionComponent$1.create(StatelessSessionComponent.java:64)at org.jboss.as.ejb3.component.stateless.StatelessSessionComponent$1.create(StatelessSessionComponent.java:61)at org.jboss.as.ejb3.pool.AbstractPool.create(AbstractPool.java:56)at org.jboss.as.ejb3.pool.strictmax.StrictMaxPool.get(StrictMaxPool.java:124)at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:47)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:273)at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:330)at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:238)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:89)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.as.ejb3.deployment.processors.EjbSuspendInterceptor.processInvocation(EjbSuspendInterceptor.java:45)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.as.ejb3.component.interceptors.EjbExceptionTransformingInterceptorFactories$1.processInvocation(EjbExceptionTransformingInterceptorFactories.java:80)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:438)at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:619)at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:57)at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:266)at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:454)at org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleInvocation(RemotingEJBClientInterceptor.java:51)at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:466)at org.jboss.ejb.client.TransactionPostDiscoveryInterceptor.handleInvocation(TransactionPostDiscoveryInterceptor.java:79)at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:466)at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocation(DiscoveryEJBClientInterceptor.java:94)at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:466)at org.jboss.ejb.client.NamingEJBClientInterceptor.handleInvocation(NamingEJBClientInterceptor.java:63)at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:466)at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:165)at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:466)at org.wildfly.common.context.Contextual.runExConsumer(Contextual.java:203)at org.jboss.ejb.client.EJBClientInvocationContext.sendRequestInitial(EJBClientInvocationContext.java:302)at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:173)at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:112)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Nov 2018 17:34:14 GMT</pubDate>
    <dc:creator>sepgs2004</dc:creator>
    <dc:date>2018-11-02T17:34:14Z</dc:date>
    <item>
      <title>cmis atompub connection error</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-atompub-connection-error/m-p/61812#M21521</link>
      <description>Error&lt;IMG id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;rg.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Unexpected document! Received: HTML documentThis exception appears to happen when calling the getRepositories (please see below for code)In the browser from the same server machine, we are able to access the Alfresco CMI</description>
      <pubDate>Fri, 02 Nov 2018 17:34:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-atompub-connection-error/m-p/61812#M21521</guid>
      <dc:creator>sepgs2004</dc:creator>
      <dc:date>2018-11-02T17:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: cmis atompub connection error</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-atompub-connection-error/m-p/61813#M21522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What happens if you use curl to hit that URL from the same machine where your CMIS code is running? (I assume your CMIS code is running on a different machine than Alfresco).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fact that you are getting back an HTML page makes me think you are hitting a proxy and it isn't forwarding the request to the Alfresco CMIS AtomPub endpoint.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Nov 2018 04:06:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-atompub-connection-error/m-p/61813#M21522</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2018-11-03T04:06:26Z</dc:date>
    </item>
  </channel>
</rss>

