1 Reply Latest reply on Sep 21, 2017 3:48 PM by David Martin

    Caused by: java.io.IOException: Cannot run program "C:\Program" (in directory "C:\jboss_5.2\jboss-eap-5.2\bin"): CreateProcess error=267, The directory name is invalid

    David Martin Newbie

      Hello,

       

      I'm trying to run the Greeter.java test example using the JBoss AS 5.1 Managed container.  When I try to run the JUnit test from eclipse, this is the full error message that I get:

       

      org.jboss.arquillian.container.spi.client.container.LifecycleException: Could not start remote container

      at org.jboss.arquillian.container.jbossas.managed_5_1.JBossASLocalContainer.start(JBossASLocalContainer.java:115)

      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:62)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)

      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:62)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)

      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:62)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)

      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:62)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)

      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:62)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)

      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.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)

      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)

      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)

      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)

      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

      Caused by: java.io.IOException: Cannot run program "C:\Program" (in directory "C:\jboss_5.2\jboss-eap-5.2\bin"): CreateProcess error=267, The directory name is invalid

      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)

      at java.lang.Runtime.exec(Runtime.java:620)

      at java.lang.Runtime.exec(Runtime.java:450)

      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_5_1.JBossASLocalContainer.start(JBossASLocalContainer.java:110)

      ... 61 more

      Caused by: java.io.IOException: CreateProcess error=267, The directory name is invalid

      at java.lang.ProcessImpl.create(Native Method)

      at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)

      at java.lang.ProcessImpl.start(ProcessImpl.java:137)

      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)

      ... 66 more

       

      In Eclipse, this is what I have in my console:

       

      Starting server "default", with command (start timeout is 120 seconds ):

      C:\Program Files\Java\jdk1.8.0_102\bin\java -cp C:\jboss_5.2\jboss-eap-5.2\bin\run.jar;C:\Program Files\Java\jdk1.8.0_102\lib\tools.jar -Xmx512m -XX:MaxPermSize=128m -Xverify:none -XX:+UseFastAccessorMethods -Djbosstest.udp.ip_ttl=0 -Djava.endorsed.dirs=C:\jboss_5.2\jboss-eap-5.2\lib\endorsed -Djboss.server.log.threshold=DEBUG -Djava.endorsed.dirs=C:\jboss_5.2\jboss-eap-5.2/lib/endorsed/ -Dxb.builder.useUnorderedSequence=true org.jboss.Main -c default -b localhost -g 15ea5d0ae54

       

      This is my arquillian.xml configuration file:

       

      <?xml version="1.0"?>

      <arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

          xmlns="http://jboss.org/schema/arquillian"

          xsi:schemaLocation="http://jboss.org/schema/arquillian http://www.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">C://jboss_5.2//jboss-eap-5.2//</property>

                  <property name="javaVmArguments">-Xmx512m -XX:MaxPermSize=128m -Xverify:none -XX:+UseFastAccessorMethods</property>

                  <!-- Use these javaVmArguments instead to wait for the debugger to connect -->

                  <!--

                  <property name="javaVmArguments">-Xmx512m -XX:MaxPermSize=128m -Xverify:none -XX:+UseFastAccessorMethods

                      -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y

                  </property>

                  -->

              </configuration>

              </container>  

       

          <extension qualifier="seam2">

                 <!-- This way you can override Seam version which you have defined in pom.xml -->

                 <property name="seamVersion">2.2.1.Final</property>

           </extension>

        

      </arquillian>

       

      I know that my POM dependencies are all correct (after many hours of replacing incorrect versions, etc.) since I am able to run the GreeterTest when using the JBoss AS 5.1 Remote container.

       

      Any ideas on what I may be doing wrong for the Managed container?

       

      Thanks and I appreciate any help that you can send my way.