Closed Bug 61599 Opened 24 years ago Closed 23 years ago

calls to JSObject.getWindow throw an exception

Categories

(Core Graveyard :: Java: OJI, defect, P3)

x86
Windows 98

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: CarlBruecken, Assigned: joe.chou)

References

Details

Attachments

(1 file)

calling JSObject.getWindow results in a java.lang.NullPointerException.

Here is a partial stack trace that results from pressing a button which has a
listenerer that actually makes the call

java.lang.NullPointerException

	at java.io.Writer.write(Unknown Source)

	at java.io.PrintStream.write(Unknown Source)

	at java.io.PrintStream.print(Unknown Source)

	at java.io.PrintStream.println(Unknown Source)

	at NavApplet$ToolbarListener.actionPerformed(NavApplet.java:3672)

	at javax.swing.AbstractButton.fireActionPerformed(Unknown S
*** Bug 61601 has been marked as a duplicate of this bug. ***
Since the exception involves an applet, I believe OJI is the proper component to 
look at this bug. However, no one will be able to investigate it without a 
testcase or a URL to go to. 


Carl, is there a URL we can access that demonstrates the bug? Or would you be 
able to attach a reduced testcase (see "Create a new attachment" above)? 


Thanks - 
Assignee: rogerl → edburns
Component: Live Connect → OJI
QA Contact: pschwartau → shrir
This actually applies to the above comment -- not sure why it didn't appear the
first time

I've figured out if the '<body>' tag is missing in the html,
LiveConnect(Java/JS) does not work.  You can verify with this test case by
removing the body tag from test_lc.html.  split.html is the parent frameset.
The applet is just a huge button.

Here is an additional problem that I found.  When the button is pressed a call
the javascript function in the test_lc.html page.  That function then after
showing the alert to show that LiveConnect is working then tries to reset the
right frame with a different html document - right2.html.  This does not work.

Also,  The button seems to work every other try.
Here is the exception that is thrown when it does not work:

netscape.javascript.JSException
    at java.lang.reflect.Constructor.newInstance(Native Method)
    at sun.plugin.liveconnect.PrivilegedConstructObjectAction.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.plugin.liveconnect.SecureInvocation.ConstructObject(Unknown Source)

Note I am running Netscape 6 on Win 98

Thanks

-Carl
Reporter are you using Mozilla or Netscape? if your using Netscape please
download a latest Mozilla nightly and see if its having the same problem.
I have tried my tests with mozilla.  The button when pressed will now show an
alert every time.  This is not the case in netscape.

However, when the script tries to load a new page into the right frame with-
parent.right.document.location.href = "right2.html", there is still no response.
So this test works in neither netscape nor mozilla
Marking NEW so someone will look at it.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Jeff, can you please look at this?

Thanks,

Ed
Assignee: edburns → jeff.dyer
Carl, the attachment seems not being packed correctly. Can't get the zip. Did
you choose the right type for the attachment?
Reassigning to Joe
Assignee: jeff.dyer → joe.chou
It seems that bug 75588 may be related to this bug.  Bug 75588 is reporting a 
slightly different exception related to the JSObject.getwindow(this) call in 
the applet.

Trace from JAVA console: debug level = 5
----------------------------------------

netscape.javascript.JSException: JSObject.getWindow() requires mayscript 
attribute on this Applet

	at java.lang.reflect.Constructor.newInstance(Native Method)

	at sun.plugin.liveconnect.PrivilegedConstructObjectAction.run(Unknown 
Source)

	at java.security.AccessController.doPrivileged(Native Method)

	at sun.plugin.liveconnect.SecureInvocation.ConstructObject(Unknown 
Source)
Shrir:
   Please verify with the trunk load, I have tested it and it works fine now.
Adding Xiaobin
Fixed!
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
qa->pmac
QA Contact: shrir → pmac
Verified on windows 98 (branch build: 2001-10-09-10-0.9.4)
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: