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 37026 - InvocationTargetException in Java debugger
Summary: InvocationTargetException in Java debugger
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 3.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Maros Sandor
URL:
Keywords:
: 39621 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-11-04 15:38 UTC by Milan Kubec
Modified: 2004-02-05 13:16 UTC (History)
1 user (show)

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 Milan Kubec 2003-11-04 15:38:05 UTC
Description: 


Name: vsR10112			Date: 10/30/2003


Steps to reproduce:
1. Open example for J2EE debugger.
2. Deploy aplication.
3. Add breakpoint to business method of EJB.
4. Start debugger.
5. Wait while debugger stop on line with breakpoint.
6. Add Watch to "calendar" variable.
7. Expand calendar node in watces window and add fixed watch to
serialVersionUID.
8. Click on "Display As->Octal" popup menu item.


Result: About 20 information dialogs appear one by one. If I try to
delete this watch following exception occurs:

Annotation: Invalid value. The property Value could not be set. Reason:
null
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor208.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at
org.openide.nodes.PropertySupport$Reflection.getValue(PropertySupport.java:187)
	at
org.openide.explorer.propertysheet.PropertyPanel$SimpleModel.getValue(PropertyPanel.java:1467)
	at
org.openide.explorer.propertysheet.PropertyPanel.updateEditor(PropertyPanel.java:686)
	at
org.openide.explorer.propertysheet.PropertyPanel.<init>(PropertyPanel.java:284)
	at
org.openide.explorer.propertysheet.PropertyPanel.<init>(PropertyPanel.java:290)
	at
org.openide.explorer.propertysheet.PropertySheetTab.fillProperties(PropertySheetTab.java:290)
	at
org.openide.explorer.propertysheet.PropertySheetTab.createPane(PropertySheetTab.java:238)
	at
org.openide.explorer.propertysheet.PropertySheetTab.ensurePaneCreated(PropertySheetTab.java:193)
	at
org.openide.explorer.propertysheet.PropertySheet.setCurrentPage(PropertySheet.java:385)
	at
org.openide.explorer.propertysheet.PropertySheet$1.stateChanged(PropertySheet.java:149)
	at javax.swing.JTabbedPane.fireStateChanged(JTabbedPane.java:287)
	at
javax.swing.JTabbedPane$ModelListener.stateChanged(JTabbedPane.java:219)
	at
javax.swing.DefaultSingleSelectionModel.fireStateChanged(DefaultSingleSelectionModel.java:116)
	at
javax.swing.DefaultSingleSelectionModel.setSelectedIndex(DefaultSingleSelectionModel.java:50)
	at
javax.swing.JTabbedPane.setSelectedIndexImpl(JTabbedPane.java:468)
	at javax.swing.JTabbedPane.setSelectedIndex(JTabbedPane.java:461)
	at javax.swing.JTabbedPane.insertTab(JTabbedPane.java:573)
	at javax.swing.JTabbedPane.addTab(JTabbedPane.java:607)
	at
org.openide.explorer.propertysheet.PropertySheet.createPages(PropertySheet.java:599)
	at
org.openide.explorer.propertysheet.PropertySheet.setCurrentNode(PropertySheet.java:646)
	at
org.openide.explorer.propertysheet.PropertySheet.access$900(PropertySheet.java:54)
	at
org.openide.explorer.propertysheet.PropertySheet$3.run(PropertySheet.java:298)
	at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
Caused by: java.lang.NumberFormatException: For input string:
"-8125100834729963327"
	at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
	at java.lang.Integer.parseInt(Integer.java:438)
	at java.lang.Integer.parseInt(Integer.java:476)
	at
org.netbeans.modules.debugger.support.java.JavaVariablesFilter.resolve(JavaVariablesFilter.java:168)
	at
org.netbeans.modules.debugger.support.java.JavaVariablesFilter.getDisplayName(JavaVariablesFilter.java:64)
	at
org.netbeans.modules.debugger.support.java.nodes.JavaVariableNode.getVariableAsText(JavaVariableNode.java:436)
[catch] ... 32 more
==>
java.lang.NumberFormatException: For input string: "-8125100834729963327"
	at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
	at java.lang.Integer.parseInt(Integer.java:438)
	at java.lang.Integer.parseInt(Integer.java:476)
	at
org.netbeans.modules.debugger.support.java.JavaVariablesFilter.resolve(JavaVariablesFilter.java:168)
	at
org.netbeans.modules.debugger.support.java.JavaVariablesFilter.getDisplayName(JavaVariablesFilter.java:64)
	at
org.netbeans.modules.debugger.support.java.nodes.JavaVariableNode.getVariableAsText(JavaVariableNode.java:436)
	at sun.reflect.GeneratedMethodAccessor208.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at
org.openide.nodes.PropertySupport$Reflection.getValue(PropertySupport.java:187)
	at
org.openide.explorer.propertysheet.PropertyPanel$SimpleModel.getValue(PropertyPanel.java:1467)
	at
org.openide.explorer.propertysheet.PropertyPanel.updateEditor(PropertyPanel.java:686)
	at
org.openide.explorer.propertysheet.PropertyPanel.<init>(PropertyPanel.java:284)
	at
org.openide.explorer.propertysheet.PropertyPanel.<init>(PropertyPanel.java:290)
	at
org.openide.explorer.propertysheet.PropertySheetTab.fillProperties(PropertySheetTab.java:290)
	at
org.openide.explorer.propertysheet.PropertySheetTab.createPane(PropertySheetTab.java:238)
	at
org.openide.explorer.propertysheet.PropertySheetTab.ensurePaneCreated(PropertySheetTab.java:193)
	at
org.openide.explorer.propertysheet.PropertySheet.setCurrentPage(PropertySheet.java:385)
	at
org.openide.explorer.propertysheet.PropertySheet$1.stateChanged(PropertySheet.java:149)
	at javax.swing.JTabbedPane.fireStateChanged(JTabbedPane.java:287)
	at
javax.swing.JTabbedPane$ModelListener.stateChanged(JTabbedPane.java:219)
	at
javax.swing.DefaultSingleSelectionModel.fireStateChanged(DefaultSingleSelectionModel.java:116)
	at
javax.swing.DefaultSingleSelectionModel.setSelectedIndex(DefaultSingleSelectionModel.java:50)
	at
javax.swing.JTabbedPane.setSelectedIndexImpl(JTabbedPane.java:468)
	at javax.swing.JTabbedPane.setSelectedIndex(JTabbedPane.java:461)
	at javax.swing.JTabbedPane.insertTab(JTabbedPane.java:573)
	at javax.swing.JTabbedPane.addTab(JTabbedPane.java:607)
	at
org.openide.explorer.propertysheet.PropertySheet.createPages(PropertySheet.java:599)
	at
org.openide.explorer.propertysheet.PropertySheet.setCurrentNode(PropertySheet.java:646)
	at
org.openide.explorer.propertysheet.PropertySheet.access$900(PropertySheet.java:54)
[catch] at
org.openide.explorer.propertysheet.PropertySheet$3.run(PropertySheet.java:298)
	at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)



Well reproduced with Arrow M4 build.
======================================================================

Suggested Fix: 
xxx@xxxx 2003-11-03

The code to reformat as octal should not use Integer.parseInt(), but
Long.parseLong().


Public Summary: 
InvocationTargetException in Java debugger

Evaluation: 

xxx@xxxx 2003-11-03

The root cause is that you can't display long values as octal.  The
InvocationTargetException was caused by a NumberFormatException which
was thrown by Integer.parseInt() because the value is too large to fit
into an int.

This is a problem also in nevada.  Adding a call record.

A comment.
Comment 1 Milan Kubec 2003-11-04 15:49:53 UTC
Reproduction scenario doesn't have to be so complex, just have some
really 'long' number (copy serialVersionUID) as watch and let it
display as one of 'Octal', 'Hexadecimal', 'Binary' and you get that
message. The problem is that debugger is unusable until user does
restart of IDE. The message is poped up by any click on debugger window.
Comment 2 Maros Sandor 2003-11-06 11:06:37 UTC
/cvs/debuggercore/src/org/netbeans/modules/debugger/support/java/JavaV
ariablesFilter.java,v  <--  JavaVariablesFilter.java
new revision: 1.11; previous revision: 1.10
Comment 3 Milan Kubec 2003-11-14 10:31:13 UTC
Verified.
Comment 4 Maros Sandor 2004-02-05 13:16:32 UTC
*** Issue 39621 has been marked as a duplicate of this issue. ***