Bean Navigator throws exception

I am getting an exception thrown when I select a bean in the navigator tree in the method editor. The exception happens when I click on the node for my bean. I’ve pasted in the stack trace below. Any Ideas about this? My other beans work. But this one fails. Does this problem originate from my bean or from a bug in the navigator.

Many Thanks,
Sean

Servoy & OS Version:
Version R2 2.2.2-build 334
Java version 1.5.0_06-b05 (Windows XP)

Stack Trace:
java.lang.NullPointerException
java.lang.NullPointerException
at org.mozilla.javascript.ScriptableObject.getTopLevelScope(ScriptableOb
ject.java:1376)
at org.mozilla.javascript.ScriptableObject.getClassPrototype(ScriptableO
bject.java:1350)
at org.mozilla.javascript.ScriptableObject.getFunctionPrototype(Scriptab
leObject.java:1329)
at org.mozilla.javascript.JavaMembers.reflectField(JavaMembers.java:363)

at org.mozilla.javascript.JavaMembers.reflect(JavaMembers.java:448)
at org.mozilla.javascript.JavaMembers.(JavaMembers.java:86)
at com.servoy.j2db.develop.debugger.d$b.(Unknown Source)
at com.servoy.j2db.develop.debugger.d.a(Unknown Source)
at com.servoy.j2db.develop.debugger.d.a(Unknown Source)
at com.servoy.j2db.develop.debugger.d.valueChanged(Unknown Source)
at javax.swing.JTree.fireValueChanged(Unknown Source)
at javax.swing.JTree$TreeSelectionRedirector.valueChanged(Unknown Source
)
at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(Unknown S
ource)
at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(Unknown S
ource)
at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(Unknown
Source)
at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(Unknown S
ource)
at javax.swing.JTree.setSelectionPath(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(Unknown Source)

at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelectionImpl(Unknow
n Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(Unknown So
urce)
at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(Unknown Sourc
e)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
size of debugwindow java.awt.Point[x=571,y=304]
size of SelectBeanDialog java.awt.Point[x=896,y=59]
java.lang.NullPointerException
java.lang.NullPointerException
at org.mozilla.javascript.ScriptableObject.getTopLevelScope(ScriptableOb
ject.java:1376)
at org.mozilla.javascript.ScriptableObject.getClassPrototype(ScriptableO
bject.java:1350)
at org.mozilla.javascript.ScriptableObject.getFunctionPrototype(Scriptab
leObject.java:1329)
at org.mozilla.javascript.JavaMembers.reflectField(JavaMembers.java:363)

at org.mozilla.javascript.JavaMembers.reflect(JavaMembers.java:448)
at org.mozilla.javascript.JavaMembers.(JavaMembers.java:86)
at com.servoy.j2db.develop.debugger.d$b.(Unknown Source)
at com.servoy.j2db.develop.debugger.d.a(Unknown Source)
at com.servoy.j2db.develop.debugger.d.a(Unknown Source)
at com.servoy.j2db.develop.debugger.d.valueChanged(Unknown Source)
at javax.swing.JTree.fireValueChanged(Unknown Source)
at javax.swing.JTree$TreeSelectionRedirector.valueChanged(Unknown Source
)
at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(Unknown S
ource)
at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(Unknown S
ource)
at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(Unknown
Source)
at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(Unknown S
ource)
at javax.swing.JTree.setSelectionPath(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(Unknown Source)

at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelectionImpl(Unknow
n Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(Unknown So
urce)
at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(Unknown Sourc
e)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Sean, I think this comes from your plugin.

You wrote that the rest of your plugins work like expected so…

I only have such an error when I did something wrong in the scriptobject

IT2B:

Yes but this is not a “Plugin”.

This is a java “bean”. It does NOT, nor should not, implement the IScriptObject interface. It is a subclass of a swing component, has a no-arguments constructor and javabeans convention mehod signatures.

It can be programatically instantiated through the javascript environment using:

var bean = new Packages.org.myOrganization.MyBean();

This causes no problems and the bean can then be programatically added to a JPanel bean on a form. It displays and runs as normal.

I’m guessing that servoy dynamically wraps bean classes as mozilla ScriptablObjects. My question would then be, what could it be about my class that is causing this to fail somewhere. The exception does not originate from any of my classes, the call stack has none of my methods.

Servoy guys, any help??

Thanks,
Sean