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 156386 - Java Swing in Python sample cannot run NPE
Summary: Java Swing in Python sample cannot run NPE
Status: RESOLVED WONTFIX
Alias: None
Product: usersguide
Classification: Unclassified
Component: Python (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P4 blocker (vote)
Assignee: amitksaha
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-06 23:48 UTC by tonybeckham
Modified: 2009-07-07 11:55 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tonybeckham 2009-01-06 23:48:26 UTC
The python sample Java Swing app in Jython cannot be run due to NPE.

Initializing
Traceback (most recent call last):
  File "/Users/Tony/NetBeansProjects/JySwing/src/JySwing.py", line 88, in <module>
    frame.draw()
  File "/Users/Tony/NetBeansProjects/JySwing/src/JySwing.py", line 55, in draw
    self.frame = swing.JFrame("Hello Swing from Python", visible=1 )
        at org.python.core.PyObject.__tojava__(PyObject.java:257)
        at org.python.core.PyInteger.__tojava__(PyInteger.java:152)
        at org.python.core.Py.tojava(Py.java:471)
        at org.python.core.PyBeanProperty._doset(PyBeanProperty.java:61)
        at org.python.core.PyObject.__set__(PyObject.java:3659)
        at org.python.core.PyObject.object___setattr__(PyObject.java:3719)
        at org.python.core.PyObject.object___setattr__(PyObject.java:3708)
        at org.python.core.PyObject$object___setattr___exposer.__call__(Unknown Source)
        at org.python.core.PyObjectDerived.__setattr__(PyObjectDerived.java:1026)

java.lang.NullPointerException: java.lang.NullPointerException


System:
Build 528
Product Version: NetBeans IDE Dev (Build 20090106142255)
Java: 1.5.0_16; Java HotSpot(TM) Client VM 1.5.0_16-133
System: Mac OS X version 10.5.5 running on i386; MacRoman; en_US (nb)
Comment 1 amitksaha 2009-06-27 09:32:01 UTC
It works fine for me on Linux with JDK 1.5 and a latest build of NetBeans. Can you please verify again ?
Comment 2 twleung 2009-06-29 18:41:05 UTC
I was able to reproduce this on my machine.  Mac OS 10.5.7, JDK 1.6 
Comment 3 amitksaha 2009-06-30 06:56:53 UTC
Thank You Ted for verifying. Linux and Solaris works fine. If anyone could test Windows, then I could classify it as a
MacOSX Bug. 
Comment 4 amitksaha 2009-07-07 11:55:58 UTC
Seems to be a MacOSX Issue. I do not have a Mac at my disposal, hence I can't look into it.