Uploaded image for project: '[Read Only] - Hippo Repository'
  1. [Read Only] - Hippo Repository
  2. REPO-121

Patched Jackrabbit artifacts (2.2.5-h3) dependencies are sometimes masked by other non-patched Jackrabbit artifacts causing the original versions resolved by Maven

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.19.03
    • 2.19.03
    • None

    Description

      HST trunk tests currently fail because of this:

      ~/workspace/hst-trunk/components/session-pool$ mvn dependency:tree -Dincludes=org.apache.jackrabbit

      [INFO] ------------------------------------------------------------------------
      [INFO] Building Hippo Site Toolkit JCR Session Pool Component 2.21.01-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] — maven-dependency-plugin:2.1:tree (default-cli) @ hst-session-pool —
      [INFO] org.onehippo.cms7.hst.components:hst-session-pool:jar:2.21.01-SNAPSHOT
      [INFO] +- org.onehippo.cms7:hippo-repository-connector:jar:2.19.03-SNAPSHOT:provided
      [INFO] | +- org.apache.jackrabbit:jackrabbit-api:jar:2.2.5:provided
      [INFO] | +- org.apache.jackrabbit:jackrabbit-jcr-rmi:jar:2.2.5:provided
      [INFO] | +- org.apache.jackrabbit:jackrabbit-jcr2spi:jar:2.2.5:provided
      [INFO] | | +- org.apache.jackrabbit:jackrabbit-spi:jar:2.2.5:provided
      [INFO] | | +- org.apache.jackrabbit:jackrabbit-spi-commons:jar:2.2.5:provided
      [INFO] | | - org.apache.jackrabbit:jackrabbit-jcr-commons:jar:2.2.5:provided
      [INFO] | - org.apache.jackrabbit:jackrabbit-spi2jcr:jar:2.2.5:provided
      [INFO] - org.onehippo.cms7.hst:hst-test:jar:tests:2.21.01-SNAPSHOT:test
      [INFO] - org.onehippo.cms7:hippo-repository-engine:jar:2.19.03-SNAPSHOT:test
      [INFO] - org.apache.jackrabbit:jackrabbit-core:jar:2.2.5-h3:test
      [INFO] ------------------------------------------------------------------------

      As can see from above, jackrabbit-core:jar:2.2.5-h3 is correctly resolved, but jackrabbit-spi-commons:jar:2.2.5 is not correct (should be 2.2.5-h3)
      causing:

      java.lang.NoClassDefFoundError: org/apache/jackrabbit/spi/commons/name/CargoNamePath
      at org.hippoecm.repository.jackrabbit.HippoHierarchyManager.resolveNodePath(HippoHierarchyManager.java:103)
      at org.hippoecm.repository.security.HippoAccessManager.init(HippoAccessManager.java:251)
      at org.hippoecm.repository.jackrabbit.XASessionImpl.createAccessManager(XASessionImpl.java:105)
      at org.apache.jackrabbit.core.SessionImpl.<init>(SessionImpl.java:272)
      at org.apache.jackrabbit.core.SessionImpl.<init>(SessionImpl.java:238)

      As a temporary fix I'll force (add) a jackrabbit-spi-commons:jar:2.2.5-h3 dependency to hippo-repository-connector which seems to at least "fix" the test build for HST trunk.

      However, there is no guarantee other (transitive) dependencies to either jackrabbit-spi2jcr or jackrabbit-jcr2spi (both depending on jackrabbit-spi-common) might still pull in the wrong (original) jackrabbit-spi-common.
      Theoretically, the same might happen with jackrabbit-core too.

      The "cleanest" way to fix this is to also patch all (other) jackrabbit artifact poms to ensure every possible chain of dependency to these "real" patched artifact properly resolves correctly.
      That would mean we build and deploy the complete jackrabbit -h3 version and only use that, not a mixture of patched/un-patched versions.

      Alternatively, we would have to define (currently) both patched artifacts in every project pom which (transitively) might reference these in its dependencymanagement, or a parent pom thereof.
      This latter solution might work if we put it in the cms7-release-pom, but still that won't work for our own cms7 projects (hippo-cms, hippo-addons-, hippo forge *, hst) which *might these be added in their root pom then as well...

      Attachments

        Activity

          People

            jsheriff Junaidh Kadhar Sheriff
            adouma Ate Douma
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: