JDK-4894482 : Tiger PIT: Incorrect socks setting will cause JPI/JWS fail to launch Java app
  • Type: Bug
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2003-07-22
  • Updated: 2003-08-07
  • Resolved: 2003-08-07
Related Reports
Duplicate :  
Description
Build: Tiger M2-PIT-B2
j2re-1_5_0-fcs-bin-b99-windows-i586-20_jul_2003.exe

The fix for 4492921 socks proxy is working. This is a new minor bug introduced from the fix. 

Step to reproduce:
- On Windows 2000, in Internet Explorer setting, connection tab, LAN setting:
  check 'use a proxy sever...'. uncheck 'Bypass proxy server...'.
- Then click 'Advanced' button. uncheck 'Use the same proxy server for all
  protocols'.
- In Socks proxy setting, enter any host or port value. Say, 
  comanche.sfbay.sun.com, port is 1080. This setting is ok but the real port on
  comanche is not open.
- Click ok and close internet properties setting.
- Enable Java Console.
- Now start IE and load any applet.
- The applet could not be loaded. If you check the Console message, you will
  have the following exception log:

load: class testvmoptions.class not found.
java.lang.ClassNotFoundException: testvmoptions.class
        at sun.applet.AppletClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.applet.AppletClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.applet.AppletClassLoader.loadCode(Unknown Source)
        at sun.applet.AppletPanel.createApplet(Unknown Source)
        at sun.plugin.AppletViewer.createApplet(Unknown Source)
        at sun.applet.AppletPanel.runLoader(Unknown Source)
        at sun.applet.AppletPanel.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Connection refused: connect
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at sun.net.NetworkClient.doConnect(Unknown Source)
        at sun.plugin.net.protocol.http.HttpClient.doConnect(Unknown Source)
        at sun.net.www.http.HttpClient.openServer(Unknown Source)
        at sun.net.www.http.HttpClient$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.net.www.http.HttpClient.privilegedOpenServer(Unknown Source)
        at sun.net.www.http.HttpClient.openServer(Unknown Source)
        at sun.net.www.http.HttpClient.<init>(Unknown Source)
        at sun.net.www.http.HttpClient.<init>(Unknown Source)
        at sun.plugin.net.protocol.http.HttpClient.<init>(Unknown Source)
        at sun.plugin.net.protocol.http.HttpClient.New(Unknown Source)
        at sun.plugin.net.protocol.http.HttpURLConnection.privBlock(Unknown Source)
        at sun.plugin.net.protocol.http.HttpURLConnection$PrivilegedBlockAction.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.plugin.net.protocol.http.HttpURLConnection.connect(Unknown Source)
        at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
        at java.net.HttpURLConnection.getResponseCode(Unknown Source)
        at sun.applet.AppletClassLoader.getBytes(Unknown Source)
        at sun.applet.AppletClassLoader.access$100(Unknown Source)
        at sun.applet.AppletClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        ... 10 more


The same exception will occur when you load JWS application.

JVM is getting connection refused exception is correct. However, this should not
block loading of applet or application. Further more, in IE property setting, I
checked the button 'bypass proxy for local address', I still get this exception.

Justification: JVM should not solely rely on socks proxy setting.
###@###.### 2003-07-22

Comments
EVALUATION This bug has been there for a long time. I am going to take a look at it after the new HTTP client API is ready. It may fix the problem here. ###@###.### 2003-08-06 If you set your Socks server and port. Java Plug-in will set socksProxyHost and socksProxyPort so that java.net.Socket class can use to determin the socks server to use. Based on "http://forum.java.sun.com/thread.jsp?thread=356836&forum=11&message=1640848", if the user sets the socks server and host, the current J2SE socks implementation will make all the connection to your web server as socks-proxied. This has been tracked as bug 4097826 targeting to Tiger release. So it is a known issue. ###@###.### 2003-08-07
07-08-2003