Community

ClassPool bootstrap refactoring

reply from Kabir Khan in JBoss Microcontainer Development - View the full discussion

I have modified JBoss AOP and my local bootstrap/aop.xml to understand the new classpool setup.  AS boots up properly with this and all the aop AS testsuite passes apart from ScopedWovenDependencyTestCase and NotWovenScopedDependencyTestCase. I have reproduced the problem I see for those in kernel with the following test

 

 

   public void testInstallAndUninstallDependencyWithExtraState() throws Throwable
   {
      getKernel().getController().addState(ControllerState.newState(), ControllerState.INSTALLED);
      installAndUninstallDependencyWithExtraState();

      //context2 goes in scoped controller and depends on context1
      ControllerContext context2 = assertInstall(offSetNumber(1), "Name2", ControllerState.INSTANTIATED);
      //context1 goes in main controller
      ControllerContext context1 = assertInstall(offSetNumber(0), "Name1", ControllerState.INSTALLED);
      context1 = assertContext("Name1");
      context2 = assertContext("Name2");


      assertUninstall("Name1"); //Gives error
      assertContext("Name2", ControllerState.INSTANTIATED);
      assertUninstall("Name2");
      assertNotInstalled("Name1");
      assertNotInstalled("Name2");
   }
 

 

The error is

1357 WARN  [AbstractKernelController] Error uninstalling from Installed: name=Name2 state=Installed

java.lang.NullPointerException

at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1632)

at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1476)

at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1541)

at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1476)

at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:760)

at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:673)

at org.jboss.test.kernel.dependency.support.TestUtil.uninstall(TestUtil.java:110)

at org.jboss.test.kernel.dependency.support.ScopedTestUtil.uninstall(ScopedTestUtil.java:81)

at org.jboss.test.kernel.dependency.test.OldAbstractKernelDependencyTest.uninstall(OldAbstractKernelDependencyTest.java:118)

at org.jboss.test.kernel.dependency.test.OldAbstractKernelDependencyTest.assertUninstall(OldAbstractKernelDependencyTest.java:151)

at org.jboss.test.kernel.dependency.test.ExtraStateTestCase.testInstallAndUninstallDependencyWithExtraState(ExtraStateTestCase.java:95)

It is getting confused somewhere about the ControllerStateModel.ControllerStateWrappers

Reply to this message by going to Community

Start a new discussion in JBoss Microcontainer Development at Community