Closed Bug 95930 Opened 23 years ago Closed 23 years ago

LiveConnect does not work when calling a java (applet) function from javajcript which connects to server

Categories

(Core Graveyard :: Java: OJI, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

CLOSED DUPLICATE of bug 46518

People

(Reporter: silicon, Assigned: xiaobin.lu)

References

()

Details

Attachments

(3 files)

Calling from javascript a java function which then connects to the server 
(same codebase/url/ip as applet) to get the data. The function should return
then the data.
This works (tested) in ns4x and ie4+ on win32 os. In Mozilla 0.9.3 with jdk
1.3.1 it does not work and returns a unknown host exception. With jdk 1.4 beta
mozilla will crash.
Please conntact me if you need more information.
oji
Assignee: av → edburns
Component: Plug-ins → OJI
QA Contact: shrir → pmac
Using WINNT and 23 August 2001 trunk I see

test1: ch.spacelord.httpclient.usermngt.HTTPUSer@31303f

test2: ch.spacelord.httpclient.usermngt.HTTPUSer@4623af

No Crash or freeze.  Does this mean it works on WinNT?

I'll ask QA to test it out on Win2K.
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
My results:

WinNT 4 SP4, JDK1.3.1 and 1.4beta, 0.9.3 build and Aug23 trunk build,
Win2K 5.00.2195, JDK1.3.1, 0.9.3 build and Aug23 trunk build

test1 always works, test2 always returns null and       
"java.lang.reflect.InvocationTargetException:        
java.security.AccessControlException: access denied        
(java.net.SocketPermission technetos.ch resolve)" in Java Console.

In NS4.7x and IE5 both tests work well.

just tested on winnt4 (22 August 2001 trunk && 24 August 2001 trunk) and on mac
with build 0.9.3. it did not worked. will do additional testing at home  (dont
have more time at work) on the weekend and send you better information about
that bug (with java source).
Same Error message on my side both with: 

Win2000 5.00.2195, JDK1.3.1, 0.9.3 build and
WinNT SP6, JDK1.3.1, 0.9.3 build

test1: ch.spacelord.httpclient.usermngt.HTTPUSer@56f122
test2: returns null!!

Java Console output:

java.lang.reflect.InvocationTargetException: 
java.security.AccessControlException: access denied (java.net.SocketPermission 
technetos.ch resolve)
	at java.security.AccessControlContext.checkPermission(Unknown Source)
	at java.security.AccessController.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkConnect(Unknown Source)
	at sun.plugin.protocol.jdk12.http.HttpURLConnection.connectStep1
(Unknown Source)
	at sun.plugin.protocol.jdk12.http.HttpURLConnection.connect(Unknown 
Source)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown 
Source)
	at ch.technetos.util.client.DefaultURLConnector.communicate
(DefaultURLConnector.java:46)
	at ch.spacelord.httpclient.usermngt.HTTPUser.<init>(HTTPUser.java:37)
	at java.lang.reflect.Constructor.newInstance(Native Method)
	at ch.spacelord.httpclient.SpaceLordAppForJSFactory.create
(SpaceLordAppForJSFactory.java:54)
	at ch.spacelord.httpclient.WebClientEngine.create
(WebClientEngine.java:74)
	at java.lang.reflect.Method.invoke(Native Method)
	at sun.plugin.liveconnect.PrivilegedCallMethodAction.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.plugin.liveconnect.SecureInvocation.CallMethod(Unknown Source)


just finished;-) new test site available at:
http://technetos.ch/technetos/bugzilla.html

old stuff still available at (removed the alert box)
http://technetos.ch/technetos/mozilla.html

a detailed description of the bug is in the javadoc (BugzillaRemoteWebClient.class)
at:
http://technetos.ch/technetos/javadoc/index.html

java source is available as attachment or in the
http://technetos.ch/technetos/OjiLiveConnectTest.jar file.

I hope this helps to fix it ;-)
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
Attached file BugzillaUser source
Xiaobin, can you please look at this?

Assignee: edburns → xiaobin.lu
Dup of 46518, will integrate the fix in next release of JRE.

*** This bug has been marked as a duplicate of 46518 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → DUPLICATE
works in win32 environment with jdk 1.4 beta 2
Status: RESOLVED → VERIFIED
Thanks, reporter!
closing bug
Status: VERIFIED → CLOSED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: