[
https://issues.apache.org/jira/browse/SLING-7189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jens Lauterbach updated SLING-7189:
-----------------------------------
Priority: Trivial (was: Minor)
> 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: Apache Sling Testing Rules
> Affects Versions: Testing Sling Mock 2.2.12
> Reporter: Jens Lauterbach
> Priority: Trivial
> Attachments: sling-7189-code.zip
>
>
> 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)