Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Resource Resolver 1.1.2
Description
The sling resource resolver fails on OAK if you add the sling:vanityPath property quasi-concurrently. Just add nodes and add the property in an automated way, without wait.
This works on sling on jackrabbit, fails with oak.
I get:
23.06.2014 17:47:17.760 WARN [pool-5-thread-4] org.apache.felix.eventadmin Service [Map Entries Observation,2923] EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=org/apache/sling/api/resource/Resource/CHANGED] | [org.osgi.service.event.EventHandler] | Bundle(org.apache.sling.resourceresolver [217])] (java.lang.NullPointerException) java.lang.NullPointerException: null at org.apache.sling.resourceresolver.impl.mapping.MapEntries.loadVanityPath(MapEntries.java:748) at org.apache.sling.resourceresolver.impl.mapping.MapEntries.doAddVanity(MapEntries.java:292) at org.apache.sling.resourceresolver.impl.mapping.MapEntries.doAddAttributes(MapEntries.java:209) at org.apache.sling.resourceresolver.impl.mapping.MapEntries.handleEvent(MapEntries.java:505) at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:412) at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:118) at org.apache.felix.eventadmin.impl.handler.EventAdminImpl.sendEvent(EventAdminImpl.java:114) at org.apache.felix.eventadmin.impl.security.EventAdminSecurityDecorator.sendEvent(EventAdminSecurityDecorator.java:96) at org.apache.sling.jcr.resource.internal.OakResourceListener.sendOsgiEvent(OakResourceListener.java:243) at org.apache.sling.jcr.resource.internal.OakResourceListener.changed(OakResourceListener.java:133) at org.apache.jackrabbit.oak.plugins.observation.NodeObserver$NodeEventHandler.leave(NodeObserver.java:204) at org.apache.jackrabbit.oak.plugins.observation.FilteredHandler.leave(FilteredHandler.java:51) at org.apache.jackrabbit.oak.plugins.observation.EventGenerator$Continuation.run(EventGenerator.java:154) at org.apache.jackrabbit.oak.plugins.observation.EventGenerator.generate(EventGenerator.java:98) at org.apache.jackrabbit.oak.plugins.observation.NodeObserver.contentChanged(NodeObserver.java:155) at org.apache.jackrabbit.oak.spi.commit.BackgroundObserver$1$1.call(BackgroundObserver.java:117) at org.apache.jackrabbit.oak.spi.commit.BackgroundObserver$1$1.call(BackgroundObserver.java:111) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722)
After debugging this, the problem is that resource is null in MapEntries.java:291 :
private void doAddVanity(String path) { Resource resource = resolver.getResource(path); loadVanityPath(resource, resolveMapsMap, vanityTargets); }
Introduced by r1605423
Attachments
Issue Links
- is related to
-
SLING-3505 Improve handling of updates to mapping (alias, vanity path)
- Closed