Running a SeamTest when multiple projects are open in the Eclipse workspace fails
---------------------------------------------------------------------------------
Key: JBSEAM-4656
URL:
https://jira.jboss.org/browse/JBSEAM-4656
Project: Seam
Issue Type: Bug
Components: Test Harness
Affects Versions: 2.2.0.GA
Environment: XP, JBoss 5.1.0 GA, Seam 2.2.0 GA, JBoss Tools 3.1.0 GA
Reporter: Shu-Wei Tan
My eclipse workspace contains 2 JBoss Tools generated Seam projects:
- Project1.war
- Project1.ear
- Project1.ejb
- Project1.test
- Project2.war
- Project2.ear
- Project2.ejb
- Project2.test
Project2.ear depends on both Project1.ejb and Project2.ejb.
Project2.test contains a SeamTest test case. When running that test case, I get an
exception saying TimerServiceDispatcher already deployed. This is because jboss-seam.jar
seems to be picked up twice by the bootstrap process, once from Project1.ear and once from
Project2.ear.
If I close the Project1.ear project in Eclipse then rerun the test, it works.
Here's the exception (the actual project name is different from my simplified example
above):
ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to
Real:
name=vfsjar:file:/E:/gbahn/SeamProjects/General/General-ear/EarContent/jboss-seam.jar!/
state=PostClassLoader mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error deploying jboss-seam.jar: Error
creating ejb container TimerServiceDispatcher: Container
jboss.j2ee:jar=jboss-seam.jar,name=TimerServiceDispatcher,service=EJB3,VMID=5822310e5111fa1a:7ef46a7d:128f1d23da7:-8000
+ is already registered
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:158)
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:88)
at
org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
at
org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at
org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:853)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:794)
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:498)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:506)
at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:127)
at org.jboss.embedded.Bootstrap.deployResourceBases(Bootstrap.java:289)
at
org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:19)
at
org.jboss.seam.mock.AbstractSeamTest.startJbossEmbeddedIfNecessary(AbstractSeamTest.java:1024)
at org.jboss.seam.mock.AbstractSeamTest.startSeam(AbstractSeamTest.java:915)
at org.jboss.seam.mock.SeamTest.startSeam(SeamTest.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:607)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:417)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:154)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:88)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:284)
at org.testng.SuiteRunner.run(SuiteRunner.java:204)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:877)
at org.testng.TestNG.runSuitesLocally(TestNG.java:842)
at org.testng.TestNG.run(TestNG.java:751)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)
Caused by: org.jboss.deployers.spi.DeploymentException: Error creating ejb container
TimerServiceDispatcher: Container
jboss.j2ee:jar=jboss-seam.jar,name=TimerServiceDispatcher,service=EJB3,VMID=5822310e5111fa1a:7ef46a7d:128f1d23da7:-8000
+ is already registered
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:540)
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:486)
at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:468)
at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:434)
at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:376)
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:145)
... 36 more
Caused by: java.lang.IllegalStateException: Container
jboss.j2ee:jar=jboss-seam.jar,name=TimerServiceDispatcher,service=EJB3,VMID=5822310e5111fa1a:7ef46a7d:128f1d23da7:-8000
+ is already registered
at org.jboss.ejb3.Ejb3Registry.register(Ejb3Registry.java:128)
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:536)
... 41 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira