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 239715 - Can't debug: com.sun.tools.jdi.ConnectorImpl$IntegerArgumentImpl cannot be cast to com.sun.jdi.connect.Connector$Argument
Summary: Can't debug: com.sun.tools.jdi.ConnectorImpl$IntegerArgumentImpl cannot be ca...
Status: RESOLVED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 7.4
Hardware: PC Linux
: P2 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-20 23:11 UTC by mclaborn
Modified: 2014-01-03 02:50 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 mclaborn 2013-12-20 23:11:02 UTC
Product Version = NetBeans IDE 7.4 (Build 201310111528)
Operating System = Linux version 3.2.0-57-generic running on amd64
Java; VM; Vendor = 1.7.0_45
Runtime = Java HotSpot(TM) 64-Bit Server VM 24.45-b08

Trying to debug a farily complex project.  The debug tool bar shows the red Stop icon as if something was running, as does the ProjectName (debug) output window, but nothing ever happens after that. No output from the program, no variables windows, etc.

The following error appears in the IDE log.

SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.netbeans.modules.debugger.jpda.ant.JPDAStart$1
java.lang.ClassCastException: com.sun.tools.jdi.ConnectorImpl$IntegerArgumentImpl cannot be cast to com.sun.jdi.connect.Connector$Argument
	at org.netbeans.api.debugger.jpda.ListeningDICookie.getPortNumber(ListeningDICookie.java:201)
	at org.netbeans.modules.debugger.jpda.ui.DebuggerOutput.propertyChange(DebuggerOutput.java:227)
	at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:328)
	at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.firePropertyChange(JPDADebuggerImpl.java:2059)
	at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.setState(JPDADebuggerImpl.java:2043)
	at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.setStarting(JPDADebuggerImpl.java:1186)
	at org.netbeans.modules.debugger.jpda.actions.StartActionProvider.postAction(StartActionProvider.java:152)
	at org.netbeans.spi.debugger.ActionsProvider$ContextAware.postAction(ActionsProvider.java:257)
	at org.netbeans.api.debugger.ActionsManager.postAction(ActionsManager.java:241)
	at org.netbeans.api.debugger.DebuggerManager.startDebugging(DebuggerManager.java:395)
	at org.netbeans.api.debugger.jpda.JPDADebugger.startListeningAndGetEngines(JPDADebugger.java:268)
	at org.netbeans.modules.debugger.jpda.ant.JPDAStart$1.run(JPDAStart.java:521)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042)
Comment 1 Martin Entlicher 2014-01-02 15:26:59 UTC
This should not happen.
com.sun.tools.jdi.ConnectorImpl.IntegerArgumentImpl implements com.sun.jdi.connect.Connector.IntegerArgument
And Connector.IntegerArgument extends Connector.Argument. Therefore it's valid to cast it to Connector.Argument.

I've removed the unnecessary extra cast to (Argument) and use IntegerArgument when available. Hope that helps.

changeset:   269976:1fc2569f976e
http://hg.netbeans.org/core-main/rev/1fc2569f976e
Comment 2 Quality Engineering 2014-01-03 02:50:58 UTC
Integrated into 'main-silver', will be available in build *201401030002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/1fc2569f976e
User: mentlicher@netbeans.org
Log: #239715: Remove the extra cast to (Argument) and use an IntegerArgument when available.