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 32142 - java.lang.NoClassDefFoundError in Mac OSX Version
Summary: java.lang.NoClassDefFoundError in Mac OSX Version
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Property Editors (show other bugs)
Version: 3.x
Hardware: Macintosh Mac OS X
: P2 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords: JDK_SPECIFIC
: 35353 36238 38879 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-03-19 14:30 UTC by benno
Modified: 2008-12-22 20:44 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
ide.log (265.88 KB, text/plain)
2003-03-19 14:36 UTC, benno
Details

Note You need to log in before you can comment on or make changes to this bug.
Description benno 2003-03-19 14:30:48 UTC
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)
Comment 1 benno 2003-03-19 14:36:13 UTC
Created attachment 9461 [details]
ide.log
Comment 2 Tomas Pavek 2003-03-19 15:10:34 UTC
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.
Comment 3 _ ttran 2003-03-21 15:35:36 UTC
NPE comes from JDK code.  Tomas Hurka knows more about MacOS X.

java.lang.NullPointerException
	at
sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphicsEnvironment.java:327)
Comment 4 Tomas Hurka 2003-03-24 14:15:38 UTC
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. 
Comment 5 benno 2003-03-24 15:10:40 UTC
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
Comment 6 Marian Mirilovic 2003-04-03 16:47:24 UTC
verified
Comment 7 Tomas Pavek 2003-08-11 15:48:21 UTC
*** Issue 35353 has been marked as a duplicate of this issue. ***
Comment 8 Tomas Pavek 2003-09-23 09:21:46 UTC
*** Issue 36238 has been marked as a duplicate of this issue. ***
Comment 9 dvanvickle 2003-09-23 16:34:32 UTC
My machine is used for graphic design also.  Removing fonts is not a
solution for me.
Comment 10 _ tboudreau 2003-09-24 01:28:07 UTC
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
Comment 11 _ tboudreau 2003-09-26 09:09:31 UTC
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
Comment 12 Tomas Pavek 2004-01-16 08:51:25 UTC
*** Issue 38879 has been marked as a duplicate of this issue. ***
Comment 13 pzajac 2004-02-25 15:00:45 UTC
Petr Felenda,
can you verify this issue?
Comment 14 pfelenda 2004-02-25 17:08:46 UTC
I am not able reproduce it in dev build 200402241900, jdk1.4.1_01 on
OSX 10.2.8.
Marking this issue as verified.