Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-10346

ResourceResolver: MapEntries.dispose throws NPE when vanity path is disabled

    XMLWordPrintableJSON

    Details

      Description

      example:

      java.lang.AssertionError: For value JCR_MOCK (teardown): Unable to invoke method 'deactivate' for class org.apache.sling.resourceresolver.impl.ResourceResolverFactoryActivator
      	at io.wcm.testing.junit.rules.parameterized.RepeatedStatement.evaluate(RepeatedStatement.java:69)
      	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
      	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
      	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
      	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
      	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
      	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:542)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
      Caused by: java.lang.RuntimeException: Unable to invoke method 'deactivate' for class org.apache.sling.resourceresolver.impl.ResourceResolverFactoryActivator
      	at org.apache.sling.testing.mock.osgi.OsgiServiceUtil.invokeMethod(OsgiServiceUtil.java:347)
      	at org.apache.sling.testing.mock.osgi.OsgiServiceUtil.invokeLifecycleMethod(OsgiServiceUtil.java:234)
      	at org.apache.sling.testing.mock.osgi.OsgiServiceUtil.activateDeactivate(OsgiServiceUtil.java:98)
      	at org.apache.sling.testing.mock.osgi.MockOsgi.deactivate(MockOsgi.java:272)
      	at org.apache.sling.testing.mock.osgi.MockBundleContext.shutdown(MockBundleContext.java:448)
      	at org.apache.sling.testing.mock.osgi.MockOsgi.shutdown(MockOsgi.java:371)
      	at org.apache.sling.testing.mock.osgi.context.OsgiContextImpl.tearDown(OsgiContextImpl.java:58)
      	at org.apache.sling.testing.mock.sling.context.SlingContextImpl.tearDown(SlingContextImpl.java:256)
      	at io.wcm.testing.mock.aem.context.AemContextImpl.tearDown(AemContextImpl.java:105)
      	at io.wcm.testing.mock.aem.junit.AemContext.access$2(AemContext.java:1)
      	at io.wcm.testing.mock.aem.junit.AemContext$3.execute(AemContext.java:216)
      	at io.wcm.testing.mock.aem.junit.AemContext$3.execute(AemContext.java:1)
      	at io.wcm.testing.junit.rules.parameterized.RepeatedStatement.evaluate(RepeatedStatement.java:65)
      	... 18 more
      Caused by: java.lang.NullPointerException
      	at org.apache.sling.resourceresolver.impl.mapping.MapEntries.dispose(MapEntries.java:530)
      	at org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl.deactivate(CommonResourceResolverFactoryImpl.java:339)
      	at org.apache.sling.resourceresolver.impl.ResourceResolverFactoryActivator.unregisterFactory(ResourceResolverFactoryActivator.java:500)
      	at org.apache.sling.resourceresolver.impl.ResourceResolverFactoryActivator.unregisterFactory(ResourceResolverFactoryActivator.java:485)
      	at org.apache.sling.resourceresolver.impl.ResourceResolverFactoryActivator.deactivate(ResourceResolverFactoryActivator.java:454)
      	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:498)
      	at org.apache.sling.testing.mock.osgi.OsgiServiceUtil.invokeMethod(OsgiServiceUtil.java:338)
      	... 30 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sseifert Stefan Seifert
                Reporter:
                sseifert Stefan Seifert
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: