Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IExplorerAppletContext getJSObject throws NullPointerException

0 views
Skip to first unread message

Jason Simpson

unread,
Sep 3, 2003, 5:05:46 PM9/3/03
to
Hi folks,
Web searches show only 2 other people with this issue, one with no
response and the other claiming it's fixed in a different java
version, but I see it in a later java version....

Sun's IExplorerAppletContext's getJSObject() method throws a
NullPointerException.
Stack is:

java.lang.NullPointerException
at sun.plugin.viewer.context.IExplorerAppletContext.getJSObject(IExplorerAppletContext.java:132)
at sun.plugin.AppletViewer.getDocumentBase(AppletViewer.java:957)
at sun.plugin.AppletViewer.getCodeBase(AppletViewer.java:1019)
at sun.plugin.AppletViewer.appletInit(AppletViewer.java:548)
at sun.plugin.viewer.LifeCycleManager.initAppletPanel(LifeCycleManager.java:171)
at sun.plugin.viewer.IExplorerPluginObject$Initer.run(IExplorerPluginObject.java:169)

Looking at sun's implementation we see:

public synchronized netscape.javascript.JSObject getJSObject() {
JSObject jsObj = getJSObject(handle);
jsObj.setIExplorerAppletContext(this);
return jsObj;
}

Line 132 is the call to setIExplorerAppletContext(this);
"handle" is a member int initialized to 0 and presumably should be set
in setAppletContextHandle(int)

So it looks like the getJSObject(int) method, which has a native
implementation, is returning a null object and no one bothers to check
if this object is null.

Is this a bug or are there any issues I should know about?

Sorry, I don't have the applet code itself. This is all I have.

0 new messages