You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Konrad Windszus <ko...@gmx.de> on 2017/12/08 16:28:27 UTC

NPE in Oak with PaxExam IT

I see the following error when executing a test with paxexam

org.ops4j.pax.exam.TestContainerException: There are unresolved bundles. See previous ERROR log messages for details.

The testing.log exposes only one error, namely

2017-12-08 17:20:00,138 ERROR [Apache Sling Repository Startup Thread] o.a.s.j.o.s.i.OakSlingRepositoryManager [AbstractSlingRepositoryManager.java : 499] start: Uncaught Throwable trying to access Repository, calling stopRepository()
java.lang.NullPointerException: null
	at org.apache.jackrabbit.oak.plugins.index.property.Multiplexers.getStrategies(Multiplexers.java:75)
	at org.apache.jackrabbit.oak.plugins.index.property.Multiplexers.getStrategies(Multiplexers.java:62)
	at org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditor.getStrategies(PropertyIndexEditor.java:220)
	at org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditor.updateIndex(PropertyIndexEditor.java:286)
	at org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditor.leave(PropertyIndexEditor.java:239)
	at org.apache.jackrabbit.oak.spi.commit.CompositeEditor.leave(CompositeEditor.java:74)
	at org.apache.jackrabbit.oak.spi.commit.ProgressNotificationEditor.leave(ProgressNotificationEditor.java:76)
	at org.apache.jackrabbit.oak.spi.commit.VisibleEditor.leave(VisibleEditor.java:63)
	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:130)
	at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:161)
	at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:461)
	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:125)
	at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:161)
	at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:461)
	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:52)
	at org.apache.jackrabbit.oak.plugins.index.IndexUpdate.enter(IndexUpdate.java:169)
	at org.apache.jackrabbit.oak.spi.commit.VisibleEditor.enter(VisibleEditor.java:57)
	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:49)
	at org.apache.jackrabbit.oak.spi.commit.EditorHook.processCommit(EditorHook.java:54)
	at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:61)
	at org.apache.jackrabbit.oak.segment.SegmentNodeStore$Commit.prepare(SegmentNodeStore.java:603)
	at org.apache.jackrabbit.oak.segment.SegmentNodeStore$Commit.optimisticMerge(SegmentNodeStore.java:634)
	at org.apache.jackrabbit.oak.segment.SegmentNodeStore$Commit.execute(SegmentNodeStore.java:690)
	at org.apache.jackrabbit.oak.segment.SegmentNodeStore.merge(SegmentNodeStore.java:334)
	at org.apache.jackrabbit.oak.spi.lifecycle.OakInitializer.initialize(OakInitializer.java:52)
	at org.apache.jackrabbit.oak.Oak.createNewContentRepository(Oak.java:636)
	at org.apache.jackrabbit.oak.Oak.createContentRepository(Oak.java:624)
	at org.apache.jackrabbit.oak.jcr.Jcr.createContentRepository(Jcr.java:386)
	at org.apache.sling.jcr.oak.server.internal.OakSlingRepositoryManager.acquireRepository(OakSlingRepositoryManager.java:170)
	at org.apache.sling.jcr.base.AbstractSlingRepositoryManager.initializeAndRegisterRepositoryService(AbstractSlingRepositoryManager.java:471)
	at org.apache.sling.jcr.base.AbstractSlingRepositoryManager.access$300(AbstractSlingRepositoryManager.java:85)
	at org.apache.sling.jcr.base.AbstractSlingRepositoryManager$4.run(AbstractSlingRepositoryManager.java:455)


This happens in a slightly modified https://github.com/apache/sling-org-apache-sling-validation-core/blob/master/src/test/java/org/apache/sling/validation/impl/it/tests/ValidationServiceIT.java.

Has anyone ever seen this before?
What else do I need to configure for PaxExam to make Oak come up successfully?

Thanks,
Konrad
 




Re: NPE in Oak with PaxExam IT

Posted by Konrad Windszus <ko...@gmx.de>.
Hi Robert,
the version from Oak was the one being provided in pax-exam 0.0.4 (https://github.com/apache/sling-org-apache-sling-testing-paxexam/tree/org.apache.sling.testing.paxexam-0.0.4 <https://github.com/apache/sling-org-apache-sling-testing-paxexam/tree/org.apache.sling.testing.paxexam-0.0.4>), the versions are provided in https://github.com/apache/sling-org-apache-sling-testing-paxexam/blob/org.apache.sling.testing.paxexam-0.0.4/src/main/java/org/apache/sling/testing/paxexam/SlingVersionResolver.java <https://github.com/apache/sling-org-apache-sling-testing-paxexam/blob/org.apache.sling.testing.paxexam-0.0.4/src/main/java/org/apache/sling/testing/paxexam/SlingVersionResolver.java>.
Yes, looks indeed like the MountInfoProvider was null, but I have no idea how that can happen.
Konrad

> On 11. Dec 2017, at 21:56, Robert Munteanu <ro...@apache.org> wrote:
> 
> Hi Konrad,
> 
> On Fri, 2017-12-08 at 17:28 +0100, Konrad Windszus wrote:
>> I see the following error when executing a test with paxexam
>> 
>> org.ops4j.pax.exam.TestContainerException: There are unresolved
>> bundles. See previous ERROR log messages for details.
>> 
>> The testing.log exposes only one error, namely
>> 
>> 2017-12-08 17:20:00,138 ERROR [Apache Sling Repository Startup
>> Thread] o.a.s.j.o.s.i.OakSlingRepositoryManager
>> [AbstractSlingRepositoryManager.java : 499] start: Uncaught Throwable
>> trying to access Repository, calling stopRepository()
>> java.lang.NullPointerException: null
>>        at
>> org.apache.jackrabbit.oak.plugins.index.property.Multiplexers.getStra
>> tegies(Multiplexers.java:75)
>>        at
>> org.apache.jackrabbit.oak.plugins.index.property.Multiplexers.getStra
>> tegies(Multiplexers.java:62)
>>        at
>> org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditor.
>> getStrategies(PropertyIndexEditor.java:220)
>>        at
>> org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditor.
>> updateIndex(PropertyIndexEditor.java:286)
>>        at
>> org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditor.
>> leave(PropertyIndexEditor.java:239)
> 
> What version of Oak were you using for the test? Looks like somewhere
> along the line a null MountInfoProvider was passed.
> 
> Robert


Re: NPE in Oak with PaxExam IT

Posted by Robert Munteanu <ro...@apache.org>.
Hi Konrad,

On Fri, 2017-12-08 at 17:28 +0100, Konrad Windszus wrote:
> I see the following error when executing a test with paxexam
> 
> org.ops4j.pax.exam.TestContainerException: There are unresolved
> bundles. See previous ERROR log messages for details.
> 
> The testing.log exposes only one error, namely
> 
> 2017-12-08 17:20:00,138 ERROR [Apache Sling Repository Startup
> Thread] o.a.s.j.o.s.i.OakSlingRepositoryManager
> [AbstractSlingRepositoryManager.java : 499] start: Uncaught Throwable
> trying to access Repository, calling stopRepository()
> java.lang.NullPointerException: null
>         at
> org.apache.jackrabbit.oak.plugins.index.property.Multiplexers.getStra
> tegies(Multiplexers.java:75)
>         at
> org.apache.jackrabbit.oak.plugins.index.property.Multiplexers.getStra
> tegies(Multiplexers.java:62)
>         at
> org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditor.
> getStrategies(PropertyIndexEditor.java:220)
>         at
> org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditor.
> updateIndex(PropertyIndexEditor.java:286)
>         at
> org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditor.
> leave(PropertyIndexEditor.java:239)

What version of Oak were you using for the test? Looks like somewhere
along the line a null MountInfoProvider was passed.

Robert

Re: NPE in Oak with PaxExam IT

Posted by Oliver Lietz <ap...@oliverlietz.de>.
On Friday 08 December 2017 17:28:27 Konrad Windszus wrote:
> I see the following error when executing a test with paxexam
> 
> org.ops4j.pax.exam.TestContainerException: There are unresolved bundles. See
> previous ERROR log messages for details.
> 
> The testing.log exposes only one error, namely
> 
> 2017-12-08 17:20:00,138 ERROR [Apache Sling Repository Startup Thread]
> o.a.s.j.o.s.i.OakSlingRepositoryManager
> [AbstractSlingRepositoryManager.java : 499] start: Uncaught Throwable
> trying to access Repository, calling stopRepository()
> java.lang.NullPointerException: null
> 	at
> org.apache.jackrabbit.oak.plugins.index.property.Multiplexers.getStrategies
> (Multiplexers.java:75) at
> org.apache.jackrabbit.oak.plugins.index.property.Multiplexers.getStrategies
> (Multiplexers.java:62) at
> org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditor.getStr
> ategies(PropertyIndexEditor.java:220) at
> org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditor.update
> Index(PropertyIndexEditor.java:286) at
> org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditor.leave(
> PropertyIndexEditor.java:239) at
> org.apache.jackrabbit.oak.spi.commit.CompositeEditor.leave(CompositeEditor.
> java:74) at
> org.apache.jackrabbit.oak.spi.commit.ProgressNotificationEditor.leave(Progr
> essNotificationEditor.java:76) at
> org.apache.jackrabbit.oak.spi.commit.VisibleEditor.leave(VisibleEditor.java
> :63) at
> org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.j
> ava:130) at
> org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmpty
> State(EmptyNodeState.java:161) at
> org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(
> SegmentNodeState.java:461) at
> org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.j
> ava:125) at
> org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmpty
> State(EmptyNodeState.java:161) at
> org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(
> SegmentNodeState.java:461) at
> org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:52)
> at
> org.apache.jackrabbit.oak.plugins.index.IndexUpdate.enter(IndexUpdate.java:
> 169) at
> org.apache.jackrabbit.oak.spi.commit.VisibleEditor.enter(VisibleEditor.java
> :57) at
> org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:49)
> at
> org.apache.jackrabbit.oak.spi.commit.EditorHook.processCommit(EditorHook.ja
> va:54) at
> org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeH
> ook.java:61) at
> org.apache.jackrabbit.oak.segment.SegmentNodeStore$Commit.prepare(SegmentNo
> deStore.java:603) at
> org.apache.jackrabbit.oak.segment.SegmentNodeStore$Commit.optimisticMerge(S
> egmentNodeStore.java:634) at
> org.apache.jackrabbit.oak.segment.SegmentNodeStore$Commit.execute(SegmentNo
> deStore.java:690) at
> org.apache.jackrabbit.oak.segment.SegmentNodeStore.merge(SegmentNodeStore.j
> ava:334) at
> org.apache.jackrabbit.oak.spi.lifecycle.OakInitializer.initialize(OakInitia
> lizer.java:52) at
> org.apache.jackrabbit.oak.Oak.createNewContentRepository(Oak.java:636) at
> org.apache.jackrabbit.oak.Oak.createContentRepository(Oak.java:624) at
> org.apache.jackrabbit.oak.jcr.Jcr.createContentRepository(Jcr.java:386) at
> org.apache.sling.jcr.oak.server.internal.OakSlingRepositoryManager.acquireR
> epository(OakSlingRepositoryManager.java:170) at
> org.apache.sling.jcr.base.AbstractSlingRepositoryManager.initializeAndRegis
> terRepositoryService(AbstractSlingRepositoryManager.java:471) at
> org.apache.sling.jcr.base.AbstractSlingRepositoryManager.access$300(Abstrac
> tSlingRepositoryManager.java:85) at
> org.apache.sling.jcr.base.AbstractSlingRepositoryManager$4.run(AbstractSlin
> gRepositoryManager.java:455)
> 
> 
> This happens in a slightly modified
> https://github.com/apache/sling-org-apache-sling-validation-core/blob/maste
> r/src/test/java/org/apache/sling/validation/impl/it/tests/ValidationServiceI
> T.java.
> 
> Has anyone ever seen this before?

Yes, seems to be a bug in Oak 1.6 related to OAK-3403.

> What else do I need to configure for PaxExam to make Oak come up
> successfully?

Not a Pax Exam problem – or do we have a configuration for multiplexing in 
Sling Launchpad/Starter?

Regards,
O.

> Thanks,
> Konrad