This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 177174 - Ant JPDA debugger fails to start with NPE
Summary: Ant JPDA debugger fails to start with NPE
Status: CLOSED DUPLICATE of bug 176042
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 6.x
Hardware: PC Linux
: P1 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-19 02:41 UTC by qbeukes
Modified: 2010-05-06 08:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description qbeukes 2009-11-19 02:41:18 UTC
When I try and debug an ant project, I get the following:

/home/quintin/.netbeans/dev/var/cache/executor-snippets/debug.xml:72: 
java.lang.NullPointerException
        at org.netbeans.modules.debugger.jpda.ant.JPDAStart.execute(JPDAStart.java:222)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        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:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:278)
        at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:498)
        at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
BUILD FAILED (total time: 0 seconds)


All my installations do this. I tried removing the cached debug.xml ant script, tried a new userdir. Nothing helps. 

Workaround:
1. Open project properties
2. Under the run page enter the following options for "VM Options":
  -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y
3. Confirm the properties window (press OK)
4. Run your project. It will now wait for a debugger connection
5. On the Debug menu, select Attach Debugger
6. Select the following values for each field:
  Debugger: Java Debugger (JPDA)
  Connector: SocketAttach
  Host: localhost
  Port: 8000
  Timeout: 2000
7. Click OK. 

The debugger should now attach to the process, and the process will start running.
Comment 1 qbeukes 2009-11-19 02:46:46 UTC
Re. the workaround I mentioned. It will keep doing that for every run, so create a new run profile with these options called "Debug", and run that profile everytime you wish to debug.
Comment 2 Martin Entlicher 2009-11-19 05:21:43 UTC
Already fixed, please take a newer build.

*** This bug has been marked as a duplicate of bug 176042 ***
Comment 3 Marian Mirilovic 2010-05-06 08:02:49 UTC
verified duplicate