NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Cannot debug maven junit test cases

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
vra5107



Joined: 15 Mar 2011
Posts: 49

PostPosted: Tue Mar 15, 2011 5:36 pm    Post subject: Cannot debug maven junit test cases Reply with quote

Hi

I am using Netbeans 6.9.1. I have imported existing maven project into Netbeans. Once I created the test I get an exception. Could some body help me understand why this error is popping up.

Thanks
Venkat


Code:
Have no file for C:\Program Files\Java\jdk1.6.0_23\jre\lib\modules\jdk.boot.jar
C:\Users\xe6aakki\.netbeans\6.9\var\cache\executor-snippets\junit-debug.xml:92: java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.6.0_23\bin\java.exe" (in directory "C:\Users\xe6aakki\Documents\NetBeansProjects\PolicyAdminSystem\trunk\src\externalServices\aaa-integration-service"): CreateProcess error=87, The parameter is incorrect
        at org.apache.tools.ant.taskdefs.Java.fork(Java.java:798)
        at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:214)
        at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
        at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        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.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        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.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        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.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
        at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:281)
        at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539)
        at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:154)
Caused by: java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.6.0_23\bin\java.exe" (in directory "C:\Users\xe6aakki\Documents\NetBeansProjects\PolicyAdminSystem\trunk\src\externalServices\aaa-integration-service"): CreateProcess error=87, The parameter is incorrect
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
        at java.lang.Runtime.exec(Runtime.java:593)
        at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:827)
        at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:445)
        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:459)
        at org.apache.tools.ant.taskdefs.Java.fork(Java.java:791)
        ... 35 more
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:453)
        ... 40 more
Java Result: -1
debug-test:
BUILD SUCCESSFUL (total time: 19 seconds)
Back to top
vra5107



Joined: 15 Mar 2011
Posts: 49

PostPosted: Wed Mar 16, 2011 2:30 am    Post subject: Reply with quote

Any help is appreciated. I am stranded. Cannot debug test files.
Back to top
vra5107



Joined: 15 Mar 2011
Posts: 49

PostPosted: Thu Mar 17, 2011 5:49 pm    Post subject: Reply with quote

Ok

I was able to resolve the issue and my debugger is working fine now. I wanted to share it here as I could not find it anywhere on the internet.

All I had to do was to move the java installation into C root directory.

Don't never install anything the dang program files directory in Windows 7. It will haunt you to death.

Another thing that was causing trouble was the URL length. So had to move my source from NetbeansProjects directory to C root.


Cheerios
Venkat

PS: Don't ever ever never ever install anything into the Program Files directory on Windows 7.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo