Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
None
Description
The following two errors are commonly being reported when running allTests on an EC2 VM: -
09:45:35,360 ERROR [org.jboss.as.controller.AbstractControllerService] (Controller Boot Thread) Error booting the container: java.lang.NullPointerException
at org.jboss.as.controller.AbstractControllerService.finishBoot(AbstractControllerService.java:177) [jboss-as-controller-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:169) [jboss-as-controller-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:133) [jboss-as-controller-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]
09:45:35,355 ERROR [org.jboss.arquillian.protocol.jmx.JMXTestRunner] (RMI TCP Connection(14)-127.0.0.1) Failed: org.jboss.as.test.embedded.parse.ParseAndMarshalModelsTestCase.testHostXml: java.lang.IllegalStateException: Container is down
at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:508) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:307) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at org.jboss.as.test.embedded.parse.ParseAndMarshalModelsTestCase.createController(ParseAndMarshalModelsTestCase.java:536) [bogus.jar:]
at org.jboss.as.test.embedded.parse.ParseAndMarshalModelsTestCase.loadHostModel(ParseAndMarshalModelsTestCase.java:379) [bogus.jar:]
at org.jboss.as.test.embedded.parse.ParseAndMarshalModelsTestCase.testHostXml(ParseAndMarshalModelsTestCase.java:226) [bogus.jar:]
That is the order the messages are logged, however if you check the timestamps you will see they were actually logged in the opposite order.
The test case makes use of a latch to ensure that start has been called on the ControllerService, however the start method uses a different thread to handle the boot so although start has been called the boot process may not have begun once start completes.
The test then fails with the SECOND message and testsuite cleanup begins stopping the service which sets the controller to null.
The boot thread is continuing to try and boot and hence gets the NPE as it attempts to access the controller after it has been stopped.