Jboss Arquillian to tests with Jboss 4.2.3 GA
carloslimasis Jul 27, 2018 4:34 AMHi guys!
I've tried adding the test configuration for my project and I need to use the JBoss 4.2.3 GA in my tests.
In my pom.xml I have:
<dependencyManagement> <dependencies> <dependency> <groupId>org.jboss.arquillian</groupId> <artifactId>arquillian-bom</artifactId> <version>1.4.0.Final</version> <scope>import</scope> <type>pom</type> </dependency> </dependencies> </dependencyManagement>
...
<dependency> <groupId>org.jboss.arquillian.junit</groupId> <artifactId>arquillian-junit-container</artifactId> <scope>test</scope> </dependency>
...
And the profile:
<profiles> <profile> <id>arquillian-jbossas-managed</id> <activation> <activeByDefault>true</activeByDefault> </activation> <dependencies> <dependency> <groupId>org.jboss.spec</groupId> <artifactId>jboss-javaee-6.0</artifactId> <version>1.0.0.Final</version> <type>pom</type> <scope>provided</scope> </dependency> <dependency> <groupId>org.jboss.client</groupId> <artifactId>jbossall-client</artifactId> <version>4.2.3.GA</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.jboss.jbossas</groupId> <artifactId>jboss-server-manager</artifactId> <version>1.0.3.GA</version> </dependency> <dependency> <groupId>org.jboss.arquillian.container</groupId> <artifactId>arquillian-jbossas-managed-4.2</artifactId> <version>1.0.0.CR3</version> </dependency> <dependency> <groupId>org.jboss.arquillian.protocol</groupId> <artifactId>arquillian-protocol-servlet</artifactId> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>unpack</id> <phase>process-test-classes</phase> <goals> <goal>unpack</goal> </goals> <configuration> <artifactItems> <artifactItem> <groupId>org.jboss.jbossas</groupId> <artifactId>jboss-as-dist</artifactId> <version>4.2.3.GA</version> <type>zip</type> <overWrite>false</overWrite> <outputDirectory>target</outputDirectory> </artifactItem> </artifactItems> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles>
And an arquillian.xml too:
<?xml version="1.0" encoding="UTF-8"?> <arquillian xmlns="http://jboss.org/schema/arquillian" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd"> <container qualifier="jbossas-managed" default="true"> <configuration> <!-- If you want to use an existing JBoss AS installation, change the value of this property to that path --> <!-- If you've already set the JBOSS_HOME environment variable, you can remove this configuration block --> <property name="jbossHome">target/jboss-4.2.3.GA</property> </configuration> </container> </arquillian>
Then, when I try to run the tests I have the following error:
Connected to the target VM, address: '127.0.0.1:58687', transport: 'socket' 26/07/2018 11:49:26 org.jboss.arquillian.container.impl.MapObject populate AVISO: Configuration contain properties not supported by the backing object org.jboss.arquillian.container.jbossas.managed_4_2.JBossASConfiguration Unused property entries: {outputToConsole=true} Supported property names: [shutdownTimeoutInSeconds, javaVmArguments, javaHome, partition, jbossHome, bindAddress, urlPkgPrefix, httpPort, startupTimeoutInSeconds, useRmiPortForAliveCheck, profileName, rmiPort] Starting server "default", with command (start timeout is 120 seconds ): C:\Program Files (x86)\Java\jdk1.6.0_45\bin\java -cp C:\Users\carlos.lima\Development\persi\target\jboss-4.2.3.GA\bin\run.jar;C:\Program Files (x86)\Java\jdk1.6.0_45\lib\tools.jar -Xmx512m -XX:MaxPermSize=128m -Djbosstest.udp.ip_ttl=0 -Djava.endorsed.dirs=C:\Users\carlos.lima\Development\persi\target\jboss-4.2.3.GA\lib\endorsed -Djboss.server.log.threshold=DEBUG -Djava.endorsed.dirs=C:\Users\carlos.lima\Development\persi\target\jboss-4.2.3.GA/lib/endorsed/ -Dxb.builder.useUnorderedSequence=true org.jboss.Main -c default -b localhost -g 164d710e8b7 org.jboss.arquillian.container.spi.client.container.LifecycleException: Could not connect to container at org.jboss.arquillian.container.jbossas.managed_4_2.JBossASLocalContainer.start(JBossASLocalContainer.java:116) at org.jboss.arquillian.container.impl.ContainerImpl.start(ContainerImpl.java:199) at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$8.perform(ContainerLifecycleController.java:163) at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$8.perform(ContainerLifecycleController.java:157) at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forContainer(ContainerLifecycleController.java:255) at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startContainer(ContainerLifecycleController.java:156) 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.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96) at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:85) at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57) 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.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:92) at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:143) at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114) at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:77) at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:70) at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forEachSuiteContainer(ContainerLifecycleController.java:221) at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startSuiteContainers(ContainerLifecycleController.java:69) 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.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96) at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:85) at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:143) at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114) at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:86) 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.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96) at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:85) at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:73) 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.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:92) at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:143) at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114) at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeSuite(EventTestRunnerAdaptor.java:75) at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:116) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68) at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) Caused by: java.io.IOException: Cannot run program "C:\Program" (in directory "C:\Users\carlos.lima\Development\persi\target\jboss-4.2.3.GA\bin"): CreateProcess error=2, O sistema não pode encontrar o arquivo especificado at java.lang.ProcessBuilder.start(ProcessBuilder.java:470) at java.lang.Runtime.exec(Runtime.java:593) at java.lang.Runtime.exec(Runtime.java:431) at org.jboss.jbossas.servermanager.ServerController.startServer(ServerController.java:106) at org.jboss.jbossas.servermanager.ServerManager.startServer(ServerManager.java:163) at org.jboss.arquillian.container.jbossas.managed_4_2.JBossASLocalContainer.start(JBossASLocalContainer.java:109) ... 60 more Caused by: java.io.IOException: CreateProcess error=2, O sistema não pode encontrar o arquivo especificado at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(ProcessImpl.java:177) at java.lang.ProcessImpl.start(ProcessImpl.java:28) at java.lang.ProcessBuilder.start(ProcessBuilder.java:452) ... 65 more Test ignored. Disconnected from the target VM, address: '127.0.0.1:58687', transport: 'socket' Process finished with exit code -1
Can someone help me?