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 79227 - Wrong setting of class name in dialog "Choose Bean" causes exceptions
Summary: Wrong setting of class name in dialog "Choose Bean" causes exceptions
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: REGRESSION
Depends on: 211176
Blocks:
  Show dependency tree
 
Reported: 2006-06-27 15:40 UTC by Jana Maleckova
Modified: 2012-04-16 22:48 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
79227 (2.32 KB, application/octet-stream)
2006-06-27 15:45 UTC, Jana Maleckova
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jana Maleckova 2006-06-27 15:40:06 UTC
Development 200606261800 of NetBeans dev (6.0)
JDK 1.6.0, VM b84

Description:
============
Create project with jFrame. Then Click on button "Choose Bean" which is on
Palette in section Beans. If you set wrong class name and confirm it then a lot
of exception will occure.


StackTrace:
===========
java.lang.IllegalStateException: Can't overwrite cause
	at java.lang.Throwable.initCause(Throwable.java:320)
	at org.openide.ErrorManager$AnnException.findOrCreate(ErrorManager.java:838)
	at org.openide.ErrorManager$DelegatingErrorManager.annotate(ErrorManager.java:623)
	at org.openide.ErrorManager.annotate(ErrorManager.java:423)
Comment 1 Jana Maleckova 2006-06-27 15:45:21 UTC
Created attachment 31422 [details]
79227
Comment 2 Jan Stola 2006-07-28 11:01:51 UTC
It seems to be a problem of ErrorManager. It is not able to annotate
ClassNotFoundException. It calls initCause() on CNFE, but CNFE refuses
such a call. See also issue 79015 and revision 1.5 of Exceptions class for
a similar problem.
Comment 3 Marian Mirilovic 2006-07-28 12:09:39 UTC
Yarda, 
please look at this.
Comment 4 Jaroslav Tulach 2006-08-07 07:44:41 UTC
Checking in src/org/openide/ErrorManager.java;
/shared/data/ccvs/repository/openide/util/src/org/openide/ErrorManager.java,v  
<--  ErrorManager.java
new revision: 1.10; previous revision: 1.9
done
Checking in test/unit/src/org/openide/ErrorManagerDelegatesToLoggingTest.java;
/shared/data/ccvs/repository/openide/util/test/unit/src/org/openide/ErrorManagerDelegatesToLoggingTest.java,v  
<--  ErrorManagerDelegatesToLoggingTest.java
new revision: 1.5; previous revision: 1.4
Comment 5 Jan Stola 2006-08-07 14:08:11 UTC
The behaviour is different by now, but the ErrorManager still seems to have 
problem with annotations of CNFE. The mentioned use case leads to the CNFE that 
is processed in MetaComponentCreator.showClassLoadingErrorMessage().
The exception is annotated and then displayed using USER and INFORMATIONAL
levels. Unfortunately a dialog corresponding to EXCEPTION level is displayed
and the message shown in the dialog is not the one used in annotation.
Comment 6 Jaroslav Tulach 2006-08-07 14:55:51 UTC
Ok, I'll check it tomorrow, but do you guys know that you should replace usage 
of ErrorManager with Logger as described at:
http://www.netbeans.org/download/dev/javadoc/org-openide-util/org/openide/util/doc-files/logging.html
Comment 7 Jaroslav Tulach 2006-08-08 10:37:50 UTC
Right, the USER mode did not worked for ClassNotFoundException. Fixed. However 
think about the usage of Logging, please.

/shared/data/ccvs/repository/core/test/unit/src/org/netbeans/core/NbErrorManagerTest.java,v  
<--  NbErrorManagerTest.java
new revision: 1.13; previous revision: 1.12
done
Checking in openide/util/src/org/openide/ErrorManager.java;
/shared/data/ccvs/repository/openide/util/src/org/openide/ErrorManager.java,v  
<--  ErrorManager.java
new revision: 1.11; previous revision: 1.10
Comment 8 Jana Maleckova 2006-10-30 13:17:14 UTC
verified on
NetBeans IDE Dev (Build 200610261800)
1.6.0-rc; Java HotSpot(TM) Client VM 1.6.0-rc-b99
Windows XP version 5.1 running on x86
cs_CZ (nb); Cp1250

it's OK