isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JohanDoornen...@filternet.nl
Subject nullpointer exception when testing event
Date Mon, 30 Mar 2015 09:00:07 GMT


Hi,



I am writing an integrationtest in Estatio - testing a RemoveEvent on the eventbus.



Can anybody explain the nullPointer exception I get at [1]

The same constuction seems to work at [2]

What am I missing?



grtz Johan



[1]

https://github.com/johandoornenbal/estatio/blob/projects/estatioapp/integtests/src/test/java/org/estatio/integtests/projects/ProgramRolesTest.java#L208 

[2] https://github.com/johandoornenbal/estatio/blob/projects/estatioapp/integtests/src/test/java/org/estatio/integtests/agreement/AgreementRolesTest.java#L192




	java.lang.NullPointerException

	at org.estatio.dom.project.ProjectRoles.on(ProjectRoles.java:147)

	at org.estatio.integtests.projects.ProjectRolesTest$OnPartyRemove.invalidBecauseNoReplacement(ProjectRolesTest.java:193)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

	at java.lang.reflect.Method.invoke(Method.java:601)

	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)

	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)

	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)

	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)

	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)

	at org.apache.isis.core.integtestsupport.IntegrationTestAbstract$IsisTransactionRule$1.evaluate(IntegrationTestAbstract.java:199)

	at org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2$1.evaluate(JUnitRuleMockery2.java:146)

	at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:168)

	at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:168)

	at org.junit.rules.RunRules.evaluate(RunRules.java:20)

	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)

	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)

	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)

	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)

	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)

	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)

	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)

	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)

	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)

	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)

	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)

	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)

	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)

	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

	 

	
		java.lang.NullPointerException
	
		at org.estatio.dom.project.ProjectRoles.on(ProjectRoles.java:147)
	
		at org.estatio.integtests.projects.ProjectRolesTest$OnPartyRemove.invalidBecauseNoReplacement(ProjectRolesTest.java:193)
	
		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	
		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	
		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	
		at java.lang.reflect.Method.invoke(Method.java:601)
	
		at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	
		at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	
		at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	
		at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	
		at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	
		at org.apache.isis.core.integtestsupport.IntegrationTestAbstract$IsisTransactionRule$1.evaluate(IntegrationTestAbstract.java:199)
	
		at org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2$1.evaluate(JUnitRuleMockery2.java:146)
	
		at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:168)
	
		at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:168)
	
		at org.junit.rules.RunRules.evaluate(RunRules.java:20)
	
		at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
	
		at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	
		at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	
		at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	
		at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	
		at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	
		at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	
		at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	
		at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	
		at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	
		at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
	
		at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	
		at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
	
		at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
	
		at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
	
		at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
	
		 
	ava.lang.NullPointerException

	at org.estatio.dom.project.ProjectRoles.on(ProjectRoles.java:147)

	at org.estatio.integtests.projects.ProjectRolesTest$OnPartyRemove.invalidBecauseNoReplacement(ProjectRolesTest.java:193)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

	at java.lang.reflect.Method.invoke(Method.java:601)

	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)

	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)

	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)

	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)

	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)

	at org.apache.isis.core.integtestsupport.IntegrationTestAbstract$IsisTransactionRule$1.evaluate(IntegrationTestAbstract.java:199)

	at org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2$1.evaluate(JUnitRuleMockery2.java:146)

	at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:168)

	at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:168)

	at org.junit.rules.RunRules.evaluate(RunRules.java:20)

	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)

	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)

	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)

	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)

	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)

	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)

	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)

	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)

	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)

	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)

	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)

	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)

	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)

	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

	 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message