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.
I get this error while making the "getting started" manual. I just followed the instructions an had no errors before. Then, when i was in the form editor picking the swing component "label" the "java.lang.NoClassDefFoundError" Message occured each time i click at "JLabel1" in the JFrame to see the properties. I think that not all properties are loaded, it stops with "font". Sorry I´m a beginner, just startig with netbeans. JDK 1.4.1 / Mac OSX 10.2.4 / Netbeans 3.4.1 java.lang.NoClassDefFoundError Thank you for your help. Benno *********** Exception occurred ************ at Wed Mar 19 15:03:02 CET 2003 java.lang.NoClassDefFoundError at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl. java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAcce ssorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at java.lang.Class.newInstance0(Class.java:306) at java.lang.Class.newInstance(Class.java:259) at java.beans.Introspector.instantiate(Introspector.java:1289) at java.beans.PropertyEditorManager.findEditor(PropertyEditorManager.java:104) at org.netbeans.modules.form.FormPropertyEditorManager.findEditorClasses(FormPropert yEditorManager.java:104) at org.netbeans.modules.form.FormPropertyEditorManager.findEditor(FormPropertyEditorM anager.java:36) at org.netbeans.modules.form.FormProperty.findDefaultEditor(FormProperty.java:807) at org.netbeans.modules.form.FormProperty.getCurrentEditor(FormProperty.java:514) at org.netbeans.modules.form.FormPropertyEditor.<init>(FormPropertyEditor.java:51) at org.netbeans.modules.form.FormProperty.getPropertyEditor(FormProperty.java:499) at org.openide.explorer.propertysheet.PropertyPanel.updateEditor(PropertyPanel.java:633) at org.openide.explorer.propertysheet.PropertyPanel.<init>(PropertyPanel.java:288) at org.openide.explorer.propertysheet.PropertyPanel.<init>(PropertyPanel.java:294) at org.openide.explorer.propertysheet.PropertySheetTab.fillProperties(PropertySheetTab.ja va:286) at org.openide.explorer.propertysheet.PropertySheetTab.createPane(PropertySheetTab.jav a:237) at org.openide.explorer.propertysheet.PropertySheetTab.ensurePaneCreated(PropertyShe etTab.java:193) at org.openide.explorer.propertysheet.PropertySheet.setCurrentPage(PropertySheet.java:3 33) at org.openide.explorer.propertysheet.PropertySheet$1.stateChanged(PropertySheet.java: 142) at javax.swing.JTabbedPane.fireStateChanged(JTabbedPane.java:287) at javax.swing.JTabbedPane$ModelListener.stateChanged(JTabbedPane.java:219) at javax.swing.DefaultSingleSelectionModel.fireStateChanged(DefaultSingleSelectionMod el.java:116) at javax.swing.DefaultSingleSelectionModel.setSelectedIndex(DefaultSingleSelectionMod el.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.setCurrentNode(PropertySheet.java:5 11) at org.openide.explorer.propertysheet.PropertySheet.access$700(PropertySheet.java:53) at org.openide.explorer.propertysheet.PropertySheet$DelayedUpdater.actionPerformed(Pr opertySheet.java:247) at javax.swing.Timer.fireActionPerformed(Timer.java:271) at javax.swing.Timer$DoPostEvent.run(Timer.java:201) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178) at java.awt.EventQueue.dispatchEvent(EventQueue.java:448) [catch] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java: 230) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:183 ) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
Created attachment 9461 [details] ide.log
The problem starts when static initializer of NetBeans FontEditor fails. There is the following exception: java.lang.ExceptionInInitializerError at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at java.lang.Class.newInstance0(Class.java:306) at java.lang.Class.newInstance(Class.java:259) at java.beans.Introspector.instantiate(Introspector.java:1289) at java.beans.PropertyEditorManager.findEditor(PropertyEditorManager.java:104) ... caused by: java.lang.NullPointerException at sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphicsEnvironment.java:327) at sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphicsEnvironment.java:359) at org.netbeans.beaninfo.editors.FontEditor.<clinit>(FontEditor.java:46) ... I don't know if it is or is not a bug in Mac JDK, anyway reassigning to core where FontEditor belongs.
NPE comes from JDK code. Tomas Hurka knows more about MacOS X. java.lang.NullPointerException at sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphicsEnvironment.java:327)
It seems to be bitmap font-related issue. Do you have some any extra fonts installed? Do you have classic environment installed? It does happen on some computers, but others (like mine) are fine.
Thank a lot... It works now. I just threw away some of my fonts and now it works fine. btw. classic ist installed, but not running. Benno
verified
*** Issue 35353 has been marked as a duplicate of this issue. ***
*** Issue 36238 has been marked as a duplicate of this issue. ***
My machine is used for graphic design also. Removing fonts is not a solution for me.
Well, I'm afraid there's nothing we can do about this - Apple needs to do something about this in their JDK. Presumably they are using the sun AWT classes under their Java license, but they didn't notice this problem. I've modified FontEditor to catch the exception and provide a warning explaining the problem, but the font editor will not be usable (because the exception occurs trying to get the list of available fonts), and its custom editor will be disabled. I've filed bug 3432566 with Apple's bug reporting tool - anyone who wants to track it should be able to do so on their web site. I'm marking this issue fixed - the exception is no longer thrown because of the workaround - a proper fix for the problem will need to come from Apple. Checking in FontEditor.java; /cvs/core/src/org/netbeans/beaninfo/editors/FontEditor.java,v <-- FontEditor.j ava new revision: 1.33; previous revision: 1.32 done Checking in Bundle.properties; /cvs/core/src/org/netbeans/beaninfo/editors/Bundle.properties,v <-- Bundle.pro perties new revision: 1.66; previous revision: 1.65 done Processing log script arguments... Mailing the commit message to cvs@core.netbeans.org (from tboudreau@netbeans.org
I got the following response to my bug report from Apple, and have asked them to update this issue when it is fixed or if another workaround is available. Since they already had this issue in their database, I've updated the warning that will be displayed with the bug id included in this email. The response: Please include the line below in follow-up emails for this request. Follow-up: 2931710 Bug ID#3432566-Java call to get font names throws NPE if bitmap fonts installed Hi Tim, Thank you for your bug report. This is a known issue that is currently being investigated by engineering. This issue has been filed in our bug database under the original Bug ID#3121780. Please know that we will notify you when there is a resolution to this reported issue. If you have any additional questions related to this bug, please send us an email at devbugs@apple.com, referencing Bug ID#3121780. Thank you for submitting this bug report. We truly appreciate your assistance in helping us discover and isolate bugs. Best Regards, Stoney Gamble Apple Developer Connection Send follow-ups to devbugs@apple.com
*** Issue 38879 has been marked as a duplicate of this issue. ***
Petr Felenda, can you verify this issue?
I am not able reproduce it in dev build 200402241900, jdk1.4.1_01 on OSX 10.2.8. Marking this issue as verified.