You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Honwai Wong (JIRA)" <ji...@apache.org> on 2014/10/28 15:37:34 UTC

[jira] [Updated] (SLING-4111) SlingContext: default resourceresolver type not available

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

Honwai Wong updated SLING-4111:
-------------------------------
    Attachment: ContextResourceResolverFactory.patch

> SlingContext: default resourceresolver type not available
> ---------------------------------------------------------
>
>                 Key: SLING-4111
>                 URL: https://issues.apache.org/jira/browse/SLING-4111
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>    Affects Versions: Testing Sling Mock 1.0.0
>            Reporter: Honwai Wong
>            Priority: Minor
>         Attachments: ContextResourceResolverFactory.patch
>
>
> According to the Sling Mocks [documentation|http://sling.apache.org/documentation/development/sling-mock.html#resource-resolver-types], the {{RESOURCERESOLVER_MOCK}} resource resolver type is supposed to be the default. However, initializing the {{SlingContext}} test rule without any arguments, a RuntimeException is thrown:
> {code}
> java.lang.RuntimeException: Unable to initialize null resource resolver factory.
> 	at org.apache.sling.testing.mock.sling.context.ContextResourceResolverFactory.get(ContextResourceResolverFactory.java:60)
> 	at org.apache.sling.testing.mock.sling.context.SlingContextImpl.newResourceResolverFactory(SlingContextImpl.java:109)
> 	at org.apache.sling.testing.mock.sling.context.SlingContextImpl.setUp(SlingContextImpl.java:101)
> 	at org.apache.sling.testing.mock.sling.junit.SlingContext.access$000(SlingContext.java:32)
> 	at org.apache.sling.testing.mock.sling.junit.SlingContext$1.before(SlingContext.java:170)
> {code}
> Attaching a patch which sets above resource resolver type as default.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)