-
Bug
-
Resolution: Won't Do
-
Blocker
-
3.2.0.Final
-
None
I get the following exception after the attached test case has run for a while.
14:55:09,677 ERROR JcrRepository:175 - Error during background garbage collection: null java.lang.NullPointerException at org.modeshape.jcr.SystemContent.systemKey(SystemContent.java:127) at org.modeshape.jcr.SystemContent.systemNode(SystemContent.java:174) at org.modeshape.jcr.SystemContent.locksKey(SystemContent.java:156) at org.modeshape.jcr.SystemContent.mutableLocksNode(SystemContent.java:202) at org.modeshape.jcr.SystemContent.cleanUpLocks(SystemContent.java:796) at org.modeshape.jcr.JcrRepository$RunningState.cleanUpLocks(JcrRepository.java:1675) at org.modeshape.jcr.JcrRepository$LockGarbageCollectionTask.doRun(JcrRepository.java:2001) at org.modeshape.jcr.JcrRepository$GarbageCollectionTask.run(JcrRepository.java:1971) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) 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)
Attaching a debugger and catching the error shows that the value of system.getNode(system.getRootKey()) is returning a null.
public NodeKey systemKey() { if (systemKey == null) { // This is idempotent, so no need to lock CachedNode rootNode = system.getNode(system.getRootKey()); ChildReference systemRef = rootNode.getChildReferences(system).getChild(JcrLexicon.SYSTEM); systemKey = systemRef.getKey(); } return systemKey; }