You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2008/11/05 16:39:44 UTC

[jira] Created: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example

[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.


Re: [jira] Commented: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example

Posted by Oliver Deakin <ol...@googlemail.com>.
I have committed this fix at repo revision r775105.

Regards,
Oliver


Oliver Deakin wrote:
> Hi,
>
> I've just hit this very same defect and can recreate it 2 out of 3 
> runs. I've tested the patch [1] and this fixes the SwingSet case. It 
> looks like it is indeed the lack of synchronization on ArrayList that 
> causes the problem. Looking at the ArrayList code there are lines 
> where we do things like:
>
>  array[firstIndex++] = null;
>
> so it is quite possible that we could hit a timing hole between 
> nullifying the entry and updating the index giving us the 
> NullPointerException in this JIRA. If noone has any objections Ill 
> apply the patch soon.
>
> Regards,
> Oliver
>
> [1]
> Index: PropertyChangeSupport.java
> ===================================================================
> --- PropertyChangeSupport.java    (revision 774748)
> +++ PropertyChangeSupport.java    (working copy)
> @@ -256,8 +256,11 @@
>         }
>
>         // Collect up the global listeners
> -        PropertyChangeListener[] gListeners = globalListeners
> -                .toArray(new PropertyChangeListener[0]);
> +        PropertyChangeListener[] gListeners;
> +        synchronized(this) {
> +            gListeners = globalListeners.toArray(new 
> PropertyChangeListener[0]);
> +        }
> +
>         // Fire the events for global listeners
>         for (int i = 0; i < gListeners.length; i++) {
>             gListeners[i].propertyChange(event);
>
>
> Tim Ellison wrote:
>> Kevin Zhou wrote:
>>  
>>> The globalListeners can only be modified by synchronized
>>> "addPropertyChangeListener" and "removePropertyChangeListener".
>>> In addition, these listeners may also be serialized or deserialized by
>>> some applications via "writeObject" and "readObject" methods.
>>> But all of the above methods has excluded the null value from
>>> globalListeners.
>>>     
>>
>> Yep.
>>
>>  
>>> In addition, since this defect can not be reproduced at my site. Thus I
>>> don't think it can be given a null in Beans code.
>>> If any code can add a null value, this should also occurs on my site.
>>>     
>>
>> I'll try to recreate it too.  While it was reliably reproducible for me,
>> I've since rebuilt and can't reproduce it now ;-/
>>
>>  
>>> Assume one scenario as follows:
>>> If one thread calls doFirePropertyChange method, successfully acquires
>>> an array of all the global listeners and stops at line263; another
>>> thread calls removePropertyChangeListener; the 1st thread start to call
>>> propertyChange method, but one of listeners in the acquired array is
>>> null, then it throws NPE. (This may also happen when calling
>>> addPropertyChangeListener method.)
>>> Do you think this could happen on our code?
>>>     
>>
>> I don't think this can happen.
>>
>> When the globalListeners list is copied into the gListeners array (lines
>> 259/260) then any removals from globalListeners will not affect 
>> gListeners.
>>
>> In theory, since ArrayList is not synchronized, we could be unlucky and
>> get a remove() during the toArray() that causes problems.
>>
>> I wouldn't want to synchronize the whole doFirePropertyChange() method,
>> since the propertyChange() callback may take some indeterminate time to
>> execute and we don't want to lock the list for long.  We could
>> synchronize(this) for the .toArray() call.
>>
>> Regards,
>> Tim
>>
>>   
>

-- 
Oliver Deakin
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


Re: [jira] Commented: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example

Posted by Oliver Deakin <ol...@googlemail.com>.
Hi,

I've just hit this very same defect and can recreate it 2 out of 3 runs. 
I've tested the patch [1] and this fixes the SwingSet case. It looks 
like it is indeed the lack of synchronization on ArrayList that causes 
the problem. Looking at the ArrayList code there are lines where we do 
things like:

  array[firstIndex++] = null;

so it is quite possible that we could hit a timing hole between 
nullifying the entry and updating the index giving us the 
NullPointerException in this JIRA. If noone has any objections Ill apply 
the patch soon.

Regards,
Oliver

[1]
Index: PropertyChangeSupport.java
===================================================================
--- PropertyChangeSupport.java    (revision 774748)
+++ PropertyChangeSupport.java    (working copy)
@@ -256,8 +256,11 @@
         }
 
         // Collect up the global listeners
-        PropertyChangeListener[] gListeners = globalListeners
-                .toArray(new PropertyChangeListener[0]);
+        PropertyChangeListener[] gListeners;
+        synchronized(this) {
+            gListeners = globalListeners.toArray(new 
PropertyChangeListener[0]);
+        }
+
         // Fire the events for global listeners
         for (int i = 0; i < gListeners.length; i++) {
             gListeners[i].propertyChange(event);


Tim Ellison wrote:
> Kevin Zhou wrote:
>   
>> The globalListeners can only be modified by synchronized
>> "addPropertyChangeListener" and "removePropertyChangeListener".
>> In addition, these listeners may also be serialized or deserialized by
>> some applications via "writeObject" and "readObject" methods.
>> But all of the above methods has excluded the null value from
>> globalListeners.
>>     
>
> Yep.
>
>   
>> In addition, since this defect can not be reproduced at my site. Thus I
>> don't think it can be given a null in Beans code.
>> If any code can add a null value, this should also occurs on my site.
>>     
>
> I'll try to recreate it too.  While it was reliably reproducible for me,
> I've since rebuilt and can't reproduce it now ;-/
>
>   
>> Assume one scenario as follows:
>> If one thread calls doFirePropertyChange method, successfully acquires
>> an array of all the global listeners and stops at line263; another
>> thread calls removePropertyChangeListener; the 1st thread start to call
>> propertyChange method, but one of listeners in the acquired array is
>> null, then it throws NPE. (This may also happen when calling
>> addPropertyChangeListener method.)
>> Do you think this could happen on our code?
>>     
>
> I don't think this can happen.
>
> When the globalListeners list is copied into the gListeners array (lines
> 259/260) then any removals from globalListeners will not affect gListeners.
>
> In theory, since ArrayList is not synchronized, we could be unlucky and
> get a remove() during the toArray() that causes problems.
>
> I wouldn't want to synchronize the whole doFirePropertyChange() method,
> since the propertyChange() callback may take some indeterminate time to
> execute and we don't want to lock the list for long.  We could
> synchronize(this) for the .toArray() call.
>
> Regards,
> Tim
>
>   

-- 
Oliver Deakin
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


Re: [jira] Commented: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example

Posted by Tim Ellison <t....@gmail.com>.
Kevin Zhou wrote:
> The globalListeners can only be modified by synchronized
> "addPropertyChangeListener" and "removePropertyChangeListener".
> In addition, these listeners may also be serialized or deserialized by
> some applications via "writeObject" and "readObject" methods.
> But all of the above methods has excluded the null value from
> globalListeners.

Yep.

> In addition, since this defect can not be reproduced at my site. Thus I
> don't think it can be given a null in Beans code.
> If any code can add a null value, this should also occurs on my site.

I'll try to recreate it too.  While it was reliably reproducible for me,
I've since rebuilt and can't reproduce it now ;-/

> Assume one scenario as follows:
> If one thread calls doFirePropertyChange method, successfully acquires
> an array of all the global listeners and stops at line263; another
> thread calls removePropertyChangeListener; the 1st thread start to call
> propertyChange method, but one of listeners in the acquired array is
> null, then it throws NPE. (This may also happen when calling
> addPropertyChangeListener method.)
> Do you think this could happen on our code?

I don't think this can happen.

When the globalListeners list is copied into the gListeners array (lines
259/260) then any removals from globalListeners will not affect gListeners.

In theory, since ArrayList is not synchronized, we could be unlucky and
get a remove() during the toArray() that causes problems.

I wouldn't want to synchronize the whole doFirePropertyChange() method,
since the propertyChange() callback may take some indeterminate time to
execute and we don't want to lock the list for long.  We could
synchronize(this) for the .toArray() call.

Regards,
Tim

Re: [jira] Commented: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example

Posted by Kevin Zhou <zh...@gmail.com>.
Tim Ellison wrote:
> Kevin Zhou wrote:
>   
>> Tim Ellison wrote:
>>     
>>> Hi Kevin,
>>>
>>> Kevin Zhou wrote:
>>>  
>>>       
>>>> I think this defect may be a thread-safe problem.
>>>> I read HARMONY's PropertyChangeSupport code and found that:
>>>> It employs ArrayList to store the property change listeners which is not
>>>> thread-safe.
>>>> This defect occurs in a private doFirePropertyChange method.
>>>> This method may asynchronously use the list of
>>>> PropertyChangeListener, which
>>>> contains a null value when modification (add or remove) of the list
>>>> has not
>>>> finished.
>>>>     
>>>>         
>>> Yes, I put in some trace code and there is a null stored in the
>>> globalListeners list which causes the NPE.
>>>
>>> However, I don't see where that null could have been stored.  Can you
>>> suggest what part of the code has stored the null in there?  Every add
>>> to the list first checks for null.  I'll take a look and see if I can
>>> catch it in the test.
>>>
>>> I won't apply your 'check-for-null' patch since I think that just masks
>>> the underlying problem.
>>>
>>> Regards,
>>> Tim
>>>
>>>   
>>>       
>> Hi Tim,
>> This patch doesn't only check-for-null.
>> It also changes the private doFirePropertyChange method to synchronized
>> method. This may resolve the asynchronous operation on globalListeners
>> list.
>>     
>
> Yes, I saw that. How will that help?
>
>   
>> I will try to find what part of the code has stored the null.
>> Due to license cares, I think it difficult to find the setting-null code
>> which may be inside SwingSet2.jar.
>>     
>
> But the globalListeners is a private variable, so the only way it can be
> given a null element is if the code successfully calls a method that
> adds a null, or we let the private List escape.  I don't see either of
> those in the Beans code, do you?  Clearly I'm missing something for this
> to happen.
>
> Regards,
> Tim
>
>   
Hi Tim,

The globalListeners can only be modified by synchronized 
"addPropertyChangeListener" and "removePropertyChangeListener".
In addition, these listeners may also be serialized or deserialized by 
some applications via "writeObject" and "readObject" methods.
But all of the above methods has excluded the null value from 
globalListeners.
In addition, since this defect can not be reproduced at my site. Thus I 
don't think it can be given a null in Beans code.
If any code can add a null value, this should also occurs on my site.

Assume one scenario as follows:
If one thread calls doFirePropertyChange method, successfully acquires 
an array of all the global listeners and stops at line263; another 
thread calls removePropertyChangeListener; the 1st thread start to call 
propertyChange method, but one of listeners in the acquired array is 
null, then it throws NPE. (This may also happen when calling 
addPropertyChangeListener method.)
Do you think this could happen on our code?
Thanks :)

Re: [jira] Commented: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example

Posted by Tim Ellison <t....@gmail.com>.

Kevin Zhou wrote:
> Tim Ellison wrote:
>> Hi Kevin,
>>
>> Kevin Zhou wrote:
>>  
>>> I think this defect may be a thread-safe problem.
>>> I read HARMONY's PropertyChangeSupport code and found that:
>>> It employs ArrayList to store the property change listeners which is not
>>> thread-safe.
>>> This defect occurs in a private doFirePropertyChange method.
>>> This method may asynchronously use the list of
>>> PropertyChangeListener, which
>>> contains a null value when modification (add or remove) of the list
>>> has not
>>> finished.
>>>     
>>
>> Yes, I put in some trace code and there is a null stored in the
>> globalListeners list which causes the NPE.
>>
>> However, I don't see where that null could have been stored.  Can you
>> suggest what part of the code has stored the null in there?  Every add
>> to the list first checks for null.  I'll take a look and see if I can
>> catch it in the test.
>>
>> I won't apply your 'check-for-null' patch since I think that just masks
>> the underlying problem.
>>
>> Regards,
>> Tim
>>
>>   
> Hi Tim,
> This patch doesn't only check-for-null.
> It also changes the private doFirePropertyChange method to synchronized
> method. This may resolve the asynchronous operation on globalListeners
> list.

Yes, I saw that. How will that help?

> I will try to find what part of the code has stored the null.
> Due to license cares, I think it difficult to find the setting-null code
> which may be inside SwingSet2.jar.

But the globalListeners is a private variable, so the only way it can be
given a null element is if the code successfully calls a method that
adds a null, or we let the private List escape.  I don't see either of
those in the Beans code, do you?  Clearly I'm missing something for this
to happen.

Regards,
Tim

Re: [jira] Commented: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example

Posted by Kevin Zhou <zh...@gmail.com>.
Tim Ellison wrote:
> Hi Kevin,
>
> Kevin Zhou wrote:
>   
>> I think this defect may be a thread-safe problem.
>> I read HARMONY's PropertyChangeSupport code and found that:
>> It employs ArrayList to store the property change listeners which is not
>> thread-safe.
>> This defect occurs in a private doFirePropertyChange method.
>> This method may asynchronously use the list of PropertyChangeListener, which
>> contains a null value when modification (add or remove) of the list has not
>> finished.
>>     
>
> Yes, I put in some trace code and there is a null stored in the
> globalListeners list which causes the NPE.
>
> However, I don't see where that null could have been stored.  Can you
> suggest what part of the code has stored the null in there?  Every add
> to the list first checks for null.  I'll take a look and see if I can
> catch it in the test.
>
> I won't apply your 'check-for-null' patch since I think that just masks
> the underlying problem.
>
> Regards,
> Tim
>
>   
Hi Tim,
This patch doesn't only check-for-null.
It also changes the private doFirePropertyChange method to synchronized 
method. This may resolve the asynchronous operation on globalListeners list.
I will try to find what part of the code has stored the null.
Due to license cares, I think it difficult to find the setting-null code 
which may be inside SwingSet2.jar.
Will manage to handle this.
Kevin Zhou

Re: [jira] Commented: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example

Posted by Tim Ellison <t....@gmail.com>.
Hi Kevin,

Kevin Zhou wrote:
> I think this defect may be a thread-safe problem.
> I read HARMONY's PropertyChangeSupport code and found that:
> It employs ArrayList to store the property change listeners which is not
> thread-safe.
> This defect occurs in a private doFirePropertyChange method.
> This method may asynchronously use the list of PropertyChangeListener, which
> contains a null value when modification (add or remove) of the list has not
> finished.

Yes, I put in some trace code and there is a null stored in the
globalListeners list which causes the NPE.

However, I don't see where that null could have been stored.  Can you
suggest what part of the code has stored the null in there?  Every add
to the list first checks for null.  I'll take a look and see if I can
catch it in the test.

I won't apply your 'check-for-null' patch since I think that just masks
the underlying problem.

Regards,
Tim

Re: [jira] Commented: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example

Posted by Kevin Zhou <zh...@gmail.com>.
I think this defect may be a thread-safe problem.
I read HARMONY's PropertyChangeSupport code and found that:
It employs ArrayList to store the property change listeners which is not
thread-safe.
This defect occurs in a private doFirePropertyChange method.
This method may asynchronously use the list of PropertyChangeListener, which
contains a null value when modification (add or remove) of the list has not
finished.


On Wed, Nov 19, 2008 at 11:06 AM, Regis Xu (JIRA) <ji...@apache.org> wrote:

>
>    [
> https://issues.apache.org/jira/browse/HARMONY-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12648900#action_12648900]
>
> Regis Xu commented on HARMONY-6009:
> -----------------------------------
>
> I can't recreate it neither, both on M7 and M8, may be caused by different
> environment?
>
> > [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.
>
>

[jira] Commented: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example

Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12648897#action_12648897 ] 

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

Thanks for you notice. 
I have tried HDK M7 (681495) and M8 (713673) to run this on several machines, but still fail to recreate this.
I'll try to provide a temporary fix that may be valid to your special case.



> [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.


[jira] Commented: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example

Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Commented: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example

Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12648913#action_12648913 ] 

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

Hi Tim, 
Since I can not reproduce this defect on my site, I just provide a potential fix for this.
Could you please help to try this patch to check whether it is valid to your environment?



> [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
>         Attachments: HARMONY-6009.diff
>
>
> 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.


[jira] Commented: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12648634#action_12648634 ] 

Tim Ellison commented on HARMONY-6009:
--------------------------------------

Sorry, I can't send you the SwingSet JAR since it is part of a licensed works.  I used the version from Sun 1.5.0 jdk1.5.0_16 in demo\jfc\SwingSet2
Hope that helps.


> [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.


[jira] Closed: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example

Posted by "Oliver Deakin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Deakin closed HARMONY-6009.
----------------------------------


Closing...

> [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
>            Assignee: Oliver Deakin
>             Fix For: 5.0M10
>
>         Attachments: HARMONY-6009.diff
>
>
> 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.


[jira] Commented: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example

Posted by "Regis Xu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12648900#action_12648900 ] 

Regis Xu commented on HARMONY-6009:
-----------------------------------

I can't recreate it neither, both on M7 and M8, may be caused by different environment?

> [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.


[jira] Resolved: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example

Posted by "Oliver Deakin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Deakin resolved HARMONY-6009.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0M10

I've applied the fix described on the mailing list  ("Re: [jira] Commented: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example" thread) at repo revision r775105. Please check that fixes the failure for you Tim, thanks.

> [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
>            Assignee: Oliver Deakin
>             Fix For: 5.0M10
>
>         Attachments: HARMONY-6009.diff
>
>
> 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.


[jira] Assigned: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example

Posted by "Oliver Deakin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Deakin reassigned HARMONY-6009:
--------------------------------------

    Assignee: Oliver Deakin

> [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
>            Assignee: Oliver Deakin
>         Attachments: HARMONY-6009.diff
>
>
> 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.


[jira] Updated: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example

Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Zhou updated HARMONY-6009:
--------------------------------

    Attachment: HARMONY-6009.diff

Would you please help to try this patch?


> [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
>         Attachments: HARMONY-6009.diff
>
>
> 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.


[jira] Commented: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645271#action_12645271 ] 

Tim Ellison commented on HARMONY-6009:
--------------------------------------

Same bug exists in M7.

> [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.