Service Packs and Hot Fixes
  1. Service Packs and Hot Fixes
  2. MNT-5743

Stack Specific - It's im possible to connent to Alfresco through CMIS Atom PUb binding

    Details

    • Type: Bug Bug
    • Status: Closed Closed (View Workflow)
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.0.2
    • Component/s: CMIS
    • Labels:
      None
    • Environment:
      Alfresco Enterprise - v4.0.0 (800), Suse 11.1 x64, Websphere 7.0.0.latest x64, DB2 v9.7.0.4 db2jcc4.jar, IBM JDK2 IBM J9 VM - latest with 7.0.0.latest, AD+LDAP, Client: WindowsXP, IE7
    • Testcase ID:
      Hide

      sanity CMIS suit

      Show
      sanity CMIS suit

      Description

      Steps to reproduce:
      1. Open CMIS workbench;
      2. Try to connect in Basic mode : http://172.30.40.166:9080/alfresco/cmisatom
      3. Try to connect in Expert mode:
      org.apache.chemistry.opencmis.binding.spi.type=atompub
      org.apache.chemistry.opencmis.binding.atompub.url=http://172.30.40.166:9080/alfresco/cmisatom
      org.apache.chemistry.opencmis.user=admin
      org.apache.chemistry.opencmis.password=alfresco
      org.apache.chemistry.opencmis.binding.compression=true
      cmis.workbench.folder.includeAcls=false
      cmis.workbench.object.includeAcls=false
      cmis.workbench.version.includeAcls=false

      Actual result:
      Error occurs;
      The issue is also reproduced on clean database.
      CMIS log:
      > 14:31:58 ERROR hemistry.opencmis.workbench.ClientHelper: CmisConnectionException: Cannot access http://localhost:9080/alfresco/cmisatom: Connection refused: connect
      org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Cannot access http://localhost:9080/alfresco/cmisatom: Connection refused: connect
      at org.apache.chemistry.opencmis.client.bindings.spi.http.HttpUtils.invoke(HttpUtils.java:208)
      at org.apache.chemistry.opencmis.client.bindings.spi.http.HttpUtils.invokeGET(HttpUtils.java:62)
      at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.read(AbstractAtomPubService.java:550)
      at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getRepositoriesInternal(AbstractAtomPubService.java:718)
      at org.apache.chemistry.opencmis.client.bindings.spi.atompub.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:59)
      at org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:85)
      at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:109)
      at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:96)
      at org.apache.chemistry.opencmis.workbench.model.ClientSession.connect(ClientSession.java:173)
      at org.apache.chemistry.opencmis.workbench.model.ClientSession.<init>(ClientSession.java:101)
      at org.apache.chemistry.opencmis.workbench.LoginDialog.createClientSession(LoginDialog.java:502)
      at org.apache.chemistry.opencmis.workbench.LoginDialog$1.actionPerformed(LoginDialog.java:196)
      at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
      at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
      > 14:31:58 ERROR hemistry.opencmis.workbench.ClientHelper: Error code: 0
      > 14:32:22 ERROR hemistry.opencmis.workbench.ClientHelper: CmisRuntimeException: Internal Server Error
      org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: Internal Server Error
      at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:452)
      at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.read(AbstractAtomPubService.java:554)
      at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getObjectInternal(AbstractAtomPubService.java:778)
      at org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.getObject(ObjectServiceImpl.java:510)
      at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObject(SessionImpl.java:393)
      at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObject(SessionImpl.java:371)
      at org.apache.chemistry.opencmis.workbench.model.ClientModel.loadFolder(ClientModel.java:155)
      at org.apache.chemistry.opencmis.workbench.ClientFrame.showLoginForm(ClientFrame.java:297)
      at org.apache.chemistry.opencmis.workbench.ClientFrame.<init>(ClientFrame.java:97)
      at org.apache.chemistry.opencmis.workbench.Workbench$1.run(Workbench.java:60)
      at java.awt.event.InvocationEvent.dispatch(Unknown Source)
      at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
      at java.awt.EventQueue.access$000(Unknown Source)
      at java.awt.EventQueue$1.run(Unknown Source)
      > 14:32:22 ERROR hemistry.opencmis.workbench.ClientHelper: Error code: 0
      > 14:32:22 ERROR hemistry.opencmis.workbench.ClientHelper: Error content: Error 500:

      > 14:44:06 ERROR hemistry.opencmis.workbench.ClientHelper: CmisRuntimeException: Internal Server Error
      org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: Internal Server Error
      at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:452)
      at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.read(AbstractAtomPubService.java:554)
      at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getObjectInternal(AbstractAtomPubService.java:778)
      at org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.getObject(ObjectServiceImpl.java:510)
      at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObject(SessionImpl.java:393)
      at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObject(SessionImpl.java:371)
      at org.apache.chemistry.opencmis.workbench.model.ClientModel.loadFolder(ClientModel.java:155)
      at org.apache.chemistry.opencmis.workbench.ClientFrame.showLoginForm(ClientFrame.java:297)
      at org.apache.chemistry.opencmis.workbench.ClientFrame.access$000(ClientFrame.java:47)
      at org.apache.chemistry.opencmis.workbench.ClientFrame$1.actionPerformed(ClientFrame.java:124)
      at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
      at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
      at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
      at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
      > 14:44:06 ERROR hemistry.opencmis.workbench.ClientHelper: Error code: 0
      > 14:44:06 ERROR hemistry.opencmis.workbench.ClientHelper: Error content: Error 500:

      Note, it works OK for Webservices binding;

      Thank you,
      JuliaG

        Issue Links

          Activity

          Hide
          dward added a comment -

          Why port 9080?

          Show
          dward added a comment - Why port 9080?
          Hide
          dward added a comment -

          Oh I see - Websphere!

          Show
          dward added a comment - Oh I see - Websphere!
          Hide
          dward added a comment -

          The root cause exception was

          Caused by: java.lang.ClassCastException: com.ibm.xml.xlxp2.jaxb.JAXBContextImpl incompatible with javax.xml.bind.JAXBContext
          at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:147)
          at javax.xml.bind.ContextFinder.find(ContextFinder.java:289)
          at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
          at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
          at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
          at org.alfresco.repo.audit.model.AuditModelRegistryImpl.unmarshallModel(AuditModelRegistryImpl.java:741)
          ... 129 more

          Searching on this revealed

          https://issues.apache.org/jira/browse/CMIS-420

          and

          https://svn.apache.org/repos/asf/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/webapp/WEB-INF/websphere/how-to-setup.txt

          It's no wonder that we have issues because we reference sun JAX-WS classes in our web.xml. The CMIS instructions recommend 'wrapping' the application in the servlet 2.5 / JAX-WS way.

          So without having an alternative .war file just for websphere, I think the replacement of JAXB in the endorsed directory is the best approach for now.

          Show
          dward added a comment - The root cause exception was Caused by: java.lang.ClassCastException: com.ibm.xml.xlxp2.jaxb.JAXBContextImpl incompatible with javax.xml.bind.JAXBContext at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:147) at javax.xml.bind.ContextFinder.find(ContextFinder.java:289) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244) at org.alfresco.repo.audit.model.AuditModelRegistryImpl.unmarshallModel(AuditModelRegistryImpl.java:741) ... 129 more Searching on this revealed https://issues.apache.org/jira/browse/CMIS-420 and https://svn.apache.org/repos/asf/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/webapp/WEB-INF/websphere/how-to-setup.txt It's no wonder that we have issues because we reference sun JAX-WS classes in our web.xml. The CMIS instructions recommend 'wrapping' the application in the servlet 2.5 / JAX-WS way. So without having an alternative .war file just for websphere, I think the replacement of JAXB in the endorsed directory is the best approach for now.
          Hide
          dward added a comment -

          I've applied Dmity's changes to the shared library and altered the build so that the necessary endorsed libraries are included in a 'java/jre/lib/endorsed' directory inside myfaces1_1-websphere-shared-lib-4.0.2.zip, inside alfresco-enterprise-ear-4.0.2.zip!

          So step 1 of http://docs.alfresco.com/3.4/topic/com.alfresco.Enterprise_3_4_0.doc/tasks/alf-websphere-install.html (for 4.0 only) should become:

          Create a Myfaces v1.1 shared library.
          Because neither of the versions of JSF that ship with WebSphere 7 are compatible with Alfresco, you must define a new isolated shared library in WebSphere that contains a compatible implementation. This is documented in the Configuring JavaServer Faces implementation section of the WebSphere 7 manual. The Alfresco Enterprise .ear file embeds an appropriate shared library definition in META-INF/ibmconfig, so it is only necessary to prepare WebSphere, as described in this section.

          Obtain the Enterprise distributable file alfresco-enterprise-ear.zip from Alfresco, which contains the myfaces1_1-websphere-shared-lib.zip file. Extract the myfaces1_1-websphere-shared-lib.zip file to the root WebSphere installation directory. This creates a myfaces1_1 directory containing all the .jars required by the myfaces1_1 shared library on WebSphere. It also populates the java/jre/lib/endorsed directory with the reference JAXB implementation, necessary to allow Open CMIS functionality to work on Websphere.

          Show
          dward added a comment - I've applied Dmity's changes to the shared library and altered the build so that the necessary endorsed libraries are included in a 'java/jre/lib/endorsed' directory inside myfaces1_1-websphere-shared-lib-4.0.2.zip, inside alfresco-enterprise-ear-4.0.2.zip! So step 1 of http://docs.alfresco.com/3.4/topic/com.alfresco.Enterprise_3_4_0.doc/tasks/alf-websphere-install.html (for 4.0 only) should become: Create a Myfaces v1.1 shared library. Because neither of the versions of JSF that ship with WebSphere 7 are compatible with Alfresco, you must define a new isolated shared library in WebSphere that contains a compatible implementation. This is documented in the Configuring JavaServer Faces implementation section of the WebSphere 7 manual. The Alfresco Enterprise .ear file embeds an appropriate shared library definition in META-INF/ibmconfig, so it is only necessary to prepare WebSphere, as described in this section. Obtain the Enterprise distributable file alfresco-enterprise-ear.zip from Alfresco, which contains the myfaces1_1-websphere-shared-lib.zip file. Extract the myfaces1_1-websphere-shared-lib.zip file to the root WebSphere installation directory. This creates a myfaces1_1 directory containing all the .jars required by the myfaces1_1 shared library on WebSphere. It also populates the java/jre/lib/endorsed directory with the reference JAXB implementation, necessary to allow Open CMIS functionality to work on Websphere.
          Hide
          dward added a comment -

          ALF-14023 logged for doc impact

          Show
          dward added a comment - ALF-14023 logged for doc impact
          Hide
          Alfresco QA Team added a comment -

          Successfully validated on Suse 11.1 x64, DB2 v9.7.0.4, com.ibm.db2.jcc.DB2Driver db2jcc4.jar, WebSphere App Server Fix Pack 7.0.0.21, Java™ SDK 1.6.0 SR9 FP2 for V7.0, AD LDAP
          It is possible to connect in Expert mode
          TatianaK

          Show
          Alfresco QA Team added a comment - Successfully validated on Suse 11.1 x64, DB2 v9.7.0.4, com.ibm.db2.jcc.DB2Driver db2jcc4.jar, WebSphere App Server Fix Pack 7.0.0.21, Java™ SDK 1.6.0 SR9 FP2 for V7.0, AD LDAP It is possible to connect in Expert mode TatianaK

            People

            • Assignee:
              Closed Bugs
              Reporter:
              Alfresco QA Team
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 weeks, 1 day, 6 hours, 30 minutes
                3w 1d 6h 30m