You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Dinesh Chilkuri (JIRA)" <ji...@apache.org> on 2016/01/25 22:38:39 UTC
[jira] [Created] (SLING-5453)
org.apache.sling.testing.mock.osgi.MockBundleContext.getDataFile is
currently not implemented
Dinesh Chilkuri created SLING-5453:
--------------------------------------
Summary: org.apache.sling.testing.mock.osgi.MockBundleContext.getDataFile is currently not implemented
Key: SLING-5453
URL: https://issues.apache.org/jira/browse/SLING-5453
Project: Sling
Issue Type: Bug
Components: Testing
Affects Versions: Testing OSGi Mock 1.7.0
Reporter: Dinesh Chilkuri
Priority: Minor
I have a test for a WCMUsePojo Class using 1.5.0 version of io.wcm.testing.aem-mock - the test itself seems to run just fine but I see the following ERROR message logged. From the stack trace seems like the getDataFile method of MockBundleContext is not implemented.
@Rule
public final AemContext aemContext = new AemContext(ResourceResolverType.JCR_MOCK);
I have to use JCR_MOCK resource resolver type because my code uses JCR API.
[main] ERROR org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl - activate: Cannot access repository, failed setting up Mapping Support
java.lang.UnsupportedOperationException
at org.apache.sling.testing.mock.osgi.MockBundleContext.getDataFile(MockBundleContext.java:326)
at org.apache.sling.resourceresolver.impl.mapping.MapEntries.<init>(MapEntries.java:196)
at org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl.activate(CommonResourceResolverFactoryImpl.java:278)
at org.apache.sling.resourceresolver.impl.ResourceResolverFactoryActivator.registerFactory(ResourceResolverFactoryActivator.java:583)
at org.apache.sling.resourceresolver.impl.ResourceResolverFactoryActivator.checkFactoryPreconditions(ResourceResolverFactoryActivator.java:611)
at org.apache.sling.resourceresolver.impl.ResourceResolverFactoryActivator.activate(ResourceResolverFactoryActivator.java:519)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.sling.testing.mock.osgi.OsgiServiceUtil.invokeMethod(OsgiServiceUtil.java:253)
at org.apache.sling.testing.mock.osgi.OsgiServiceUtil.activateDeactivate(OsgiServiceUtil.java:86)
at org.apache.sling.testing.mock.osgi.MockOsgi.activate(MockOsgi.java:188)
at org.apache.sling.testing.mock.sling.ResourceResolverFactoryInitializer.initializeResourceResolverFactoryActivator(ResourceResolverFactoryInitializer.java:138)
at org.apache.sling.testing.mock.sling.ResourceResolverFactoryInitializer.setUp(ResourceResolverFactoryInitializer.java:76)
at org.apache.sling.testing.mock.sling.MockSling.newResourceResolverFactory(MockSling.java:88)
at io.wcm.testing.mock.aem.context.ContextResourceResolverFactory.get(ContextResourceResolverFactory.java:45)
at io.wcm.testing.mock.aem.context.AemContextImpl.newResourceResolverFactory(AemContextImpl.java:64)
at org.apache.sling.testing.mock.sling.context.SlingContextImpl.setUp(SlingContextImpl.java:98)
at io.wcm.testing.mock.aem.context.AemContextImpl.setUp(AemContextImpl.java:69)
at io.wcm.testing.mock.aem.junit.AemContext.access$000(AemContext.java:40)
at io.wcm.testing.mock.aem.junit.AemContext$1.before(AemContext.java:119)
I am using following versions of
- AEM mock / io.wcm.testing.aem-mock-1.5.0.jar
- Sling Resource Resolver / org.apache.sling.resourceresolver-1.2.6.jar
- AEM /uber-jar-6.1.0-apis.jar
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)