Test fails when JBoss has been started in eclipse
si.ret Jan 31, 2011 4:17 PMHello together,
I have written simple tests using Arquillian/JUnit. I'm using a remote JBoss configuration. When I start JBoss manually everthing works fine. But when I start JBoss via JBoss Tools within eclipse the test fails.
Trace:
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 4.454 sec <<< FAILURE! de.rettenmeier.javaee.BookServiceTest Time elapsed: 0 sec <<< ERROR! org.jboss.arquillian.impl.event.FiredEventException: org.jboss.arquillian.spi.DeploymentException: Failed to deploy test.war at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:68) at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115) at org.jboss.arquillian.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:96) at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:162) at org.jboss.arquillian.junit.Arquillian$3$1.evaluate(Arquillian.java:186) at org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297) at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:182) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:127) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:146) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97) 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.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103) at $Proxy0.invoke(Unknown Source) at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:145) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:87) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69) Caused by: org.jboss.arquillian.spi.DeploymentException: Failed to deploy test.war at org.jboss.arquillian.container.jbossas.remote_6.JBossASRemoteContainer.deploy(JBossASRemoteContainer.java:169) at org.jboss.arquillian.impl.handler.ContainerDeployer.callback(ContainerDeployer.java:62) at org.jboss.arquillian.impl.handler.ContainerDeployer.callback(ContainerDeployer.java:50) at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63) ... 20 more Caused by: java.lang.RuntimeException: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): DEPLOYMENTS MISSING DEPENDENCIES: Deployment "jboss.j2ee:jar=test.war,name=BookService,service=EJB3_endpoint" is missing the following dependencies: Dependency "jboss.j2ee:jar=test.war,name=BookService,service=EJB3" (should be in state "Installed", but is actually in state "**ERROR**") Deployment "jboss.web.deployment:war=/test" is missing the following dependencies: Dependency "vfs:///Applications/jboss-6.0.0.Final/server/default/deploy/test.war_WeldBootstrapBean" (should be in state "Start", but is actually in state "Create") Deployment "vfs:///Applications/jboss-6.0.0.Final/server/default/deploy/test.war_WeldBootstrapBean" is missing the following dependencies: Dependency "jboss.j2ee:jar=test.war,name=BookService,service=EJB3" (should be in state "PreInstall", but is actually in state "**ERROR**") DEPLOYMENTS IN ERROR: Deployment "jboss.j2ee:jar=test.war,name=BookService,service=EJB3" is in error due to the following reason(s): **ERROR**, org.jboss.ejb3.common.registrar.spi.DuplicateBindException: Cannot install org.jboss.ejb3.proxy.impl.factory.session.stateless.StatelessSessionLocalProxyFactory@56702d3c under name "ProxyFactory/test/BookService/BookService/local" as there is already an existing object there: org.jboss.ejb3.proxy.impl.factory.session.stateless.StatelessSessionLocalProxyFactory@453521ec at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:320) at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.start(StreamingDeploymentTarget.java:197) at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.start(DeploymentProgressImpl.java:232) at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.run(DeploymentProgressImpl.java:89) at org.jboss.arquillian.container.jbossas.remote_6.JBossASRemoteContainer.deploy(JBossASRemoteContainer.java:154) ... 23 more Caused by: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): DEPLOYMENTS MISSING DEPENDENCIES: Deployment "jboss.j2ee:jar=test.war,name=BookService,service=EJB3_endpoint" is missing the following dependencies: Dependency "jboss.j2ee:jar=test.war,name=BookService,service=EJB3" (should be in state "Installed", but is actually in state "**ERROR**") Deployment "jboss.web.deployment:war=/test" is missing the following dependencies: Dependency "vfs:///Applications/jboss-6.0.0.Final/server/default/deploy/test.war_WeldBootstrapBean" (should be in state "Start", but is actually in state "Create") Deployment "vfs:///Applications/jboss-6.0.0.Final/server/default/deploy/test.war_WeldBootstrapBean" is missing the following dependencies: Dependency "jboss.j2ee:jar=test.war,name=BookService,service=EJB3" (should be in state "PreInstall", but is actually in state "**ERROR**") DEPLOYMENTS IN ERROR: Deployment "jboss.j2ee:jar=test.war,name=BookService,service=EJB3" is in error due to the following reason(s): **ERROR**, org.jboss.ejb3.common.registrar.spi.DuplicateBindException: Cannot install org.jboss.ejb3.proxy.impl.factory.session.stateless.StatelessSessionLocalProxyFactory@56702d3c under name "ProxyFactory/test/BookService/BookService/local" as there is already an existing object there: org.jboss.ejb3.proxy.impl.factory.session.stateless.StatelessSessionLocalProxyFactory@453521ec at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1370) at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1316) at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:968) at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:82) at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.checkComplete(ProfileControllerContext.java:138) at org.jboss.profileservice.plugins.deploy.actions.DeploymentStartAction.doPrepare(DeploymentStartAction.java:104) at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:101) at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) at org.jboss.profileservice.plugins.deploy.AbstractDeployHandler.startDeployments(AbstractDeployHandler.java:168) at org.jboss.profileservice.management.upload.remoting.DeployHandlerDelegate.startDeployments(DeployHandlerDelegate.java:74) at org.jboss.profileservice.management.upload.remoting.DeployHandler.invoke(DeployHandler.java:156) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:898) at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:791) at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:744) at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:548) at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234) at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:216) at org.jboss.remoting.Client.invoke(Client.java:1961) at org.jboss.remoting.Client.invoke(Client.java:804) at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:312) ... 27 more de.rettenmeier.javaee.BookServiceTest Time elapsed: 0.003 sec <<< ERROR! org.jboss.arquillian.impl.event.FiredEventException: org.jboss.arquillian.spi.DeploymentException: Could not undeploy test.war at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:68) at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115) at org.jboss.arquillian.impl.EventTestRunnerAdaptor.afterClass(EventTestRunnerAdaptor.java:108) at org.jboss.arquillian.junit.Arquillian$3$2.evaluate(Arquillian.java:190) at org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297) at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:182) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:127) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:146) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97) 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.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103) at $Proxy0.invoke(Unknown Source) at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:145) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:87) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69) Caused by: org.jboss.arquillian.spi.DeploymentException: Could not undeploy test.war at org.jboss.arquillian.container.jbossas.remote_6.JBossASRemoteContainer.undeploy(JBossASRemoteContainer.java:213) at org.jboss.arquillian.container.jbossas.remote_6.JBossASRemoteContainer.undeploy(JBossASRemoteContainer.java:193) at org.jboss.arquillian.impl.handler.ContainerUndeployer.callback(ContainerUndeployer.java:61) at org.jboss.arquillian.impl.handler.ContainerUndeployer.callback(ContainerUndeployer.java:47) at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63) ... 19 more Caused by: java.lang.IllegalArgumentException: cannot remove element from list at sun.net.httpserver.ContextList.remove(ContextList.java:63) at sun.net.httpserver.ServerImpl.removeContext(ServerImpl.java:194) at sun.net.httpserver.HttpServerImpl.removeContext(HttpServerImpl.java:64) at org.jboss.arquillian.container.jbossas.remote_6.JBossASRemoteContainer.undeploy(JBossASRemoteContainer.java:209) ... 23 more
Thanks in advance
Simon