testng-team / testng-googlecode

DEPRECATED: Automatically exported from code.google.com/p/testng
0 stars 0 forks source link

TestNG CreateProcess error=87 #81

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Trying to run a seam TestNG unit-test with testNg plugin inside jboss tools

1. project is generated with jboss tools seam plugin
2. creation of a unit test Debug Configuration in eclipse
3. adding -Dsun.lang.ClassLoader.allowArraySyntax=true/false to the VM
arguments (with both true or false happens the same)
4. adding the library jaxb-api.jar to the testng configuration classpath
5. trying to execute a test (that worked with eclipse galileo SR1, and
test-ng eclipse plugin 5.10).

Is expected to run the unit test but instead appears an eclipse error 

Versions are the following:
- eclipse galileo SR2 (3.5.2)
- jboss tools 3.1
- testng 5.12
- seam 2.2.1.CR1
- OS Windows Server 2008 
- jdk1.5.0_22 and jdk1.6.0_19

see the Stack Trace below:

java.io.IOException: Cannot run program "C:\Archivos de
programa\Java\jdk1.6.0_14\bin\javaw.exe" (in directory
"C:\.apps\c.auth2.Apps\App01\idp\idp.basico\idp.basico-test"):
CreateProcess error=87, El parámetro no es correcto
    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:810)
    at org.eclipse.jdt.launching.AbstractVMRunner.exec(AbstractVMRunner.java:70)
    at
org.eclipse.jdt.internal.launching.StandardVMRunner.run(StandardVMRunner.java:31
7)
    at
org.testng.eclipse.launch.TestNGLaunchConfigurationDelegate.launch(TestNGLaunchC
onfigurationDelegate.java:74)
    at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.j
ava:853)
    at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.j
ava:703)
    at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:86
6)
    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, El parámetro no es
correcto
    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

Original issue reported on code.google.com by and...@gmail.com on 20 Apr 2010 at 9:53

GoogleCodeExporter commented 9 years ago
In my opinion classpath is too long.

A workaround is to create a "pathing jar". This is a jar containing only a 
Mainfest.mf file, whose Class-Path specifies the disk paths of your long list 
of jars, etc. Now just add this pathing jar to your command line classpath.
See:
http://stackoverflow.com/questions/201816/how-to-set-a-long-java-classpath-in-ms
dos-windows

Original comment by jiri.k...@post.cz on 21 Dec 2010 at 8:10