5 Replies Latest reply on Jan 18, 2010 9:07 AM by rmbittmann

    Newbie - Problem Running TestNG on a JBoss Tools created Action.

      Hi,

       

      Probably another newbie question.

       

      I am using the following environment:

      Eclipse 3.5.1, JBoss Tools 3.1.0.M4, TestNG 5.11.0.28, jdk1.6.0_17, JBoss AS 5.1.0GA-jdk6, Seam 2.2.0.GA, JBoss 4.2.2GA & MySQL 5.1.37

       

      After successfuly creating a project using: New -> Seam Web Project and adding an action and an entity to it, I am trying to test it using the TestNG plugin.

       

      I am going to the test project (testSeam1-test) finding the automatically created action test (TestAction1Test.java) right clicking on it and selecting: Run As -> TestNG Test. I get immediatly an error:

      Exception occurred executing command line.
      Cannot run program "C:\Java\jdk1.6.0_17\bin\javaw.exe" (in directory "C:\Workspace\testSeam1-test"): CreateProcess error=87, The parameter is incorrect.

       

      The stack and session details are below.

       

      I did not make any changes to the project other than its generation. I tried to google this problem without success.

       

      I will appreciate your help in figuring out what when wrong.

       

      Thanks,

      Rani.


      The stack for the failure is:

      java.io.IOException: Cannot run program "C:\Java\jdk1.6.0_17\bin\javaw.exe" (in directory "C:\Workspace\testSeam1-test"): CreateProcess error=87, The parameter is incorrect
          at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
          at java.lang.Runtime.exec(Runtime.java:593)
          at org.eclipse.debug.core.DebugPlugin.exec(DebugPlugin.java:805)
          at org.eclipse.jdt.launching.AbstractVMRunner.exec(AbstractVMRunner.java:70)
          at org.eclipse.jdt.internal.launching.StandardVMRunner.run(StandardVMRunner.java:317)
          at org.testng.eclipse.launch.TestNGLaunchConfigurationDelegate.launch(TestNGLaunchConfigurationDelegate.java:74)
          at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
          at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
          at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:866)
          at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1069)
          at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
      Caused by: java.io.IOException: CreateProcess error=87, The parameter is incorrect
          at java.lang.ProcessImpl.create(Native Method)
          at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
          at java.lang.ProcessImpl.start(ProcessImpl.java:30)
          at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
          ... 10 more

       

      And the session data is:

      eclipse.buildId=M20090917-0800
      java.version=1.6.0_17
      java.vendor=Sun Microsystems Inc.
      BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
      Framework arguments:  -product org.eclipse.epp.package.jee.product
      Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product

       

       

       

       

        • 1. Re: Newbie - Problem Running TestNG on a JBoss Tools created Action.
          maxandersen

          I believe that error is caused by either a syntax error or a command line that is too long. (I assume you are running windows)

           

          Any chance you got a path with non-ascii characters in it or that the path to the workspace is *really* long ?

          • 2. Re: Newbie - Problem Running TestNG on a JBoss Tools created Action.

            Hi,

             

            Thank you for taking the time and looking at the problem.

             

            You are correct, I am using Windows. The workspace path is: C:\Workspace, so I guess this is not the problem. As you suggested I am suspicious at the command line, but being the newbie that I am, I could not figure out where to look for it. Your help in directing me to the right log files will be much appreciated.

             

            Best regards,

            Rani.

            • 3. Re: Newbie - Problem Running TestNG on a JBoss Tools created Action.
              maxandersen

              When you launch testng it should show up in the Debug perspective in the view showing the various launches.

               

              If you expand the launch related to testng and right click the process node and select Properties you should be able to see the full command line that the testng plugin is using for its launch.

               

              Anything suspicious in there ?

               

              You should be able to copy/paste that command line and run it in a shell.

              • 4. Re: Newbie - Problem Running TestNG on a JBoss Tools created Action.

                Hi,

                 

                With the help of Max Andersen (thank you for finding the time to help) I found the problem. It was the JBoss AS path. I installed it in the My Documents folder. This folder expands to multiple other folders and caused the temporary deployment files to have such a deep path that they became inaccessible in Windows XP. I moved the JBoss AS to C: and this problem was solved.

                 

                Lesson learned: Do not install stuff in My Documents!

                 

                I still have issues with running TestNG in this simple example, but for clarity I will open another thread.

                 

                Thanks,

                Rani.

                • 5. Re: Newbie - Problem Running TestNG on a JBoss Tools created Action.

                  Hi,

                   

                  Just to clear all the problems I had with the default installations above. After fixing the JBoss AS path TestNG kept failing with the errors listed below.

                   

                  Googeling the problem I found the following posting from Chris Lowe in Googel's Exadel Flamingo User discussion recommending:

                   

                  "Are you using JDK 6?  The EJB3 bootstrap has problems due to changes in the
                  default value for a hidden system property called
                  sun.lang.ClassLoader.allowArraySyntax - in JDK5 it was true and in JDK6 it
                  was false.  Add this to your JVM arguments:

                  -Dsun.lang.ClassLoader.allowArraySyntax=true

                  In Eclipse:

                  Window -> Preferences...

                  Java / Installed JREs

                  Select jdk1.6.0_10 (or whatever build you're using) and choose edit. Add the
                  above definition to the Default VM Arguments."

                   

                  Doing that fixed the problem and now everything runs (until it doesn't... ).

                   

                  Thanks,

                  Rani.

                   

                  *** CONTEXTS MISSING DEPENDENCIES: Name -&gt; Dependency{Required State:Actual State}

                   

                  UserTransactionBinding -> UserTransaction{Configured:**ERROR**}

                   

                  UserTransactionBinding2 -> UserTransaction{Configured:**ERROR**}

                   


                  *** CONTEXTS IN ERROR: Name -> Error

                   

                  SARDeployer -&gt; java.lang.ClassNotFoundException: [Ljava.lang.Class;

                   

                  ServiceDeploymentDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;

                   

                  ServiceClassLoaderDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;

                   

                  BeanDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;

                   

                  ServiceDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;

                   

                  BeanMetaDataDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;

                   

                  UserTransaction -> java.lang.RuntimeException: Unable to locate the transaction manager

                   

                  KernelDeploymentDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;