harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Zhou (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example
Date Mon, 10 Nov 2008 07:58:44 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646194#action_12646194
] 

Kevin Zhou commented on HARMONY-6009:
-------------------------------------

Hi Tim,
I conducted this test on the latest HARMONY, but failed to recreate the same defect.
According to the above trace, I investigated the codes in the PropertyChangeSupport.doFirePropertyChagne(PropertyChangeSupport.java:263)
.
The reported NPE should be caused due to the NULL value of one of the global proprety change
listeners which are stored in an array list —— globalListeners.
The new property change listeners are added through 2 methods [1][2], both of them exclude
the NULL listeners.
Instead of NPE, I encounted another exception [3]. This is caused since HARMONY's SWING doesn't
have some classes, such as FileNameExtensionFilter, which is newly included since JAVA6.
After adding javax.swing.filechooser.FileNameExtensionFilter and javaxSwing.RowSorter classes
into HARMONY's swing.jar, then HARMONY works well on the test scenario.

May be there something wrong with this? May you please transfer the SwingSet2.jar in case
I took the wrong one.

Thank you!
Kevin Zhou.

[1] public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
[2] public synchronized void addPropertyChangeListener(String propertyName, PropertyChangeListener
listener)
[3] ClassNotFoundException
java.lang.NoClassDefFoundError: javax/swing/filechooser/FileNameExtensionFilter
        at java.lang.VMClassRegistry.initializeClass(VMClassRegistry.java)
        at java.lang.Class.forName(Class.java:147)
        at java.lang.Class.forName(Class.java:90)
        at SwingSet2.loadDemo(SwingSet2.java:776)
        at SwingSet2.loadDemos(SwingSet2.java:106)
        at SwingSet2$DemoLoadThread.run(SwingSet2.java:1370)
Caused by: java.lang.ClassNotFoundException: javax.swing.filechooser.FileNameExtensionFilter
        at java.net.URLClassLoader.findClass(URLClassLoader.java:894)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:489)
        at java.lang.ClassLoader$SystemClassLoader.loadClass(ClassLoader.java:871)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
        at java.lang.VMClassRegistry.initializeClass(VMClassRegistry.java)
        ... 5 more

> [classlib][beans] NPE launching swingset2 example
> -------------------------------------------------
>
>                 Key: HARMONY-6009
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6009
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Win32
> Harmony r715566
>            Reporter: Tim Ellison
>
> harmony thorws a NullPointerException when launching swingset2 example
> hdk\jdk\jre\bin\java.exe -jar c:\apachecon\swingset\SwingSet2.jar
> Uncaught exception in main:
> java.lang.reflect.InvocationTargetException
>         at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
>         at java.lang.reflect.Method.invoke(Method.java:317)
>         at org.apache.harmony.vm.JarRunner.main(JarRunner.java:89)
> Caused by: java.lang.NullPointerException
>         at java.beans.PropertyChangeSupport.doFirePropertyChange(PropertyChangeSupport.java:263)
>         at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:54)
>         at java.awt.Component.firePropertyChangeImpl(Component.java:1669)
>         at java.awt.Component.firePropertyChange(Component.java:1683)
>         at javax.swing.JComponent.setBorder(JComponent.java:747)
>         at javax.swing.LookAndFeel.uninstallBorder(LookAndFeel.java:163)
>         at javax.swing.plaf.basic.BasicInternalFrameUI.uninstallDefaults(BasicInternalFrameUI.java:790)
>         at javax.swing.plaf.basic.BasicInternalFrameUI.uninstallUI(BasicInternalFrameUI.java:560)
>         at javax.swing.plaf.metal.MetalInternalFrameUI.uninstallUI(MetalInternalFrameUI.java:105)
>         at javax.swing.JComponent.setUI(JComponent.java:1294)
>         at javax.swing.JInternalFrame.setUI(JInternalFrame.java:539)
>         at javax.swing.JInternalFrame.updateUI(JInternalFrame.java:558)
>         at javax.swing.SwingUtilities.updateComponentTreeUILevel(SwingUtilities.java:374)
>         at javax.swing.SwingUtilities.updateComponentTreeUILevel(SwingUtilities.java:386)
>         at javax.swing.SwingUtilities.updateComponentTreeUILevel(SwingUtilities.java:386)
>         at javax.swing.SwingUtilities.updateComponentTreeUI(SwingUtilities.java:365)
>         at SwingSet2.setDemo(SwingSet2.java:726)
>         at SwingSet2.preloadFirstDemo(SwingSet2.java:684)
>         at SwingSet2.<init>(SwingSet2.java:225)
>         at SwingSet2.main(SwingSet2.java:248)
>         at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
>         ... 2 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message