2 Replies Latest reply on Jan 26, 2010 9:15 AM by Ales Justin

    Fluctuating uninstall

    Carlo de Wolf Master

      I'm encountering a pendulous bug in the naming deployers [1]. Whenever I run the tests I get a failure about 50% of the time.

      On a glance it looks like a race condition, but there are no multiple threads involved.

      I fail to see where some non-deterministic behavior is causing an non-repeatable result.

       

      The failure encountered is:

      org.jboss.deployers.spi.DeploymentException: Error deploying: jboss.naming:application=testApp,module=moduleA,component=component1
          at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
          at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:125)
          at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
          at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
          at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1448)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1166)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1187)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1219)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1107)
          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)
          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:823)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:783)
          at org.jboss.deployers.plugins.main.MainDeployerImpl.deploy(MainDeployerImpl.java:549)
          at org.jboss.reloaded.naming.deployers.test.simple.NameReferencesTestCase.testModuleName(NameReferencesTestCase.java:96)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
          at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
          at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
          at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
          at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
          at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
          at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
          at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
          at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
          at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
          at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
          at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
          at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
          at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
          at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
          at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
          at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
      Caused by: java.lang.IllegalStateException: jboss.naming:application=testApp,module=moduleA,component=component1 is already installed.
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:716)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
          at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)
          ... 45 more

       

      [1] http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/reloaded/trunk/naming-deployers/