sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Seifert (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SLING-7189) Misleading Artifact Coordinates message for ResourceResolverType.JCR_OAK
Date Wed, 11 Oct 2017 14:55:00 GMT

     [ https://issues.apache.org/jira/browse/SLING-7189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Stefan Seifert resolved SLING-7189.
-----------------------------------
       Resolution: Fixed
         Assignee: Stefan Seifert
    Fix Version/s: Testing Sling Mock 2.2.14
                   Testing Sling Mock 1.9.10

you're right - this is a typo - thanks for reporting.
fixed in the next release.

Completed: At revision: 1811834  (2.x)
Completed: At revision: 1811833  (1.x)

> Misleading Artifact Coordinates message for ResourceResolverType.JCR_OAK
> ------------------------------------------------------------------------
>
>                 Key: SLING-7189
>                 URL: https://issues.apache.org/jira/browse/SLING-7189
>             Project: Sling
>          Issue Type: Bug
>          Components: Testing
>    Affects Versions: Testing Sling Mock 2.2.12
>            Reporter: Jens Lauterbach
>            Assignee: Stefan Seifert
>            Priority: Trivial
>             Fix For: Testing Sling Mock 1.9.10, Testing Sling Mock 2.2.14
>
>         Attachments: sling-7189-code.zip, sling-7189.patch
>
>
> When you create a {{SlingContext}} using {{ResourceResolverType.JCR_OAK}} you get the
following error if you do not have the required dependency:
> {quote}
> java.lang.RuntimeException: Unable to initialize JCR_OAK resource resolver factory: Unable
to instantiate resourcer resolver: org.apache.sling.testing.mock.sling.oak.OakMockResourceResolverAdapter.
Make sure this maven dependency is included: org.apache.sling:org.apache.sling.testing.sling-mock-jackrabbit-oak
> {quote}
> The message contains the {{groupId}} and {{artifactId}} of the dependency you are supposed
to add to your project:
> {quote}org.apache.sling:org.apache.sling.testing.sling-mock-jackrabbit-oak{quote}
> The problem is that this dependency does not seem to exist. I was able to solve this
issue by adding the following dependency:
> {code}
> <dependency>
>     <groupId>org.apache.sling</groupId>
>     <artifactId>org.apache.sling.testing.sling-mock-oak</artifactId>
>     <version>2.0.2</version>
>  </dependency>
> {code}
> This dependency does include the class {{org.apache.sling.testing.mock.sling.oak.OakMockResourceResolverAdapter}}
which is apparently the class that is supposed to be loaded by all of this.
> *Therefore, I would propose to update the artifact coordinates in the error message.*
> I added a demo project that can be used to re-produce this issue:
> # Extract the attached archive
> # Run {{mvn clean test}}
> # Error occurs
> # Uncomment dependency in {{pom.xml}}
> # Run {{mvn clean test}}
> # Error is gone



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message