-
Bug
-
Resolution: Duplicate
-
P3
-
8u31
-
x86_64
-
windows_7
FULL PRODUCT VERSION :
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft WIndows [Version 6.1.7601]
EXTRA RELEVANT SYSTEM CONFIGURATION :
Http / https connections outside of the corporate network are made through a proxy server.
A DESCRIPTION OF THE PROBLEM :
When launching an applet or running a JNLP page, the JRE takes several actions to connect to the outside world before the application starts running:
1) It may need to load .jar files.
2) It may need to validate that code signing certificates have not been revoked.
In making those connections, it needs to determine the Proxy server to use for each connection. This may involved executing a proxy configuration script.
During execution of the proxy configuration script, the myIpAddress() method is always returning "127.0.0.1" instead of the user's corporate IP address (that is the one reported by ipconfig, like "144.208.119.181"). This may cause the script to return the wrong proxy server (say, "DIRECT" instead of the actual corporate "PROXY=xxxx").
The result of this is:
1) There may be long delays while connection attempts time out (because the sites are not reachable through DIRECT connections.)
2) The application may not start because some .jar files cannot be downloaded.
3) The application may generate warning messages like: "The digital signature for this application was generated with a certificate from a trusted certificate authority, but we are unable to ensure that it was not revoked by that authority."
The general impact of this is that applets and webstart applications may not be usable in corporate enviroments on JDK 1.8u31.
REGRESSION. Last worked in version 8u25
ADDITIONAL REGRESSION INFORMATION:
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Make sure you are on a network that requires outgoing connections to go through a proxy server.
2) Make sure your proxy server is appropriately configured in Java Control Panel to execute a Proxy Configuration file (say file://temp/proxy.pac).
3) Have the logic in the proxy.pac file be something like this:
function FindProxyForURL(url, host) {
myip = myIpAddress();
if (myip == "127.0.0.1") {
return "DIRECT";
}
// Substitute the address of your actual proxy server.
return "PROXY wwwproxy2.int.myorg.com:8080";
}
4) Using Internet Explorer, attempt to connect to the site: http://www.falstad.com/wave2d
5) With JDK 1.8u31, the applet on the page will not start up.
6) In the Java console log, observe that all the network connections specify proxy=DIRECT:
network: Connecting http://www.falstad.com/wave2d/wave2d.jar with proxy=DIRECT
7) Observe that the connection ultimately times out, and a ClassNotFoundException is thrown.
8) Running the same thing with JDK 1.8u25, observe that the applet starts up.
9) In JDK 1.8u31, it appears that the myIpAddress() function is always returning "127.0.01" at this point in applet / webstart startup.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The applet starts running. It uses the user's proxy server for connections.
Logs from JDK 1.8u25 indicate that the proxy server is used for connections to load the .jar file:
network: Connecting http://www.falstad.com/wave2d/wave2d.jar with proxy=HTTP @ wwwproxy2.int.myorg.com:8080/144.208.119.101:8080
ACTUAL -
The applet does not start running. It does not use a proxy server for connections (proxy="DIRECT"). It displays a ClassNotFoundException.
Logs indicate that DIRECT connections are made:
network: Connecting http://www.falstad.com/wave2d/wave2d.jar with proxy=DIRECT
OTHER NOTES:
This is most likely the root cause of the following bug, which should be closed:
https://bugs.openjdk.java.net/browse/JDK-8071893 : Proxy settings ignored during load and validation of applets and webstart apps
Also, in related tests, it appears that once a webstart program is up and running, myIpAddress() does appear to correctly return the actual corporate IP address. This was verified using code like the following:
List<Proxy> proxies = ProxySelector.getDefault().select(new URI(urlString));
proxy = proxies.get(0).toString();
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Java Plug-in 11.31.2.13
Using JRE version 1.8.0_31-b13 Java HotSpot(TM) 64-Bit Server VM
User home directory = C:\Users\maxhearn
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@4772203f
security: Expected Main URL: http://www.falstad.com/wave2d/wave2d.jar
basic: Plugin2ClassLoader.addURL parent called for http://www.falstad.com/wave2d/wave2d.jar
security: Blacklist revocation check is enabled
security: blacklist: created: NEED_LOAD, lastModified: 1422916679903
security: blacklist: hasBeenModifiedSince 0 (we have 1422916679903)
cache: Trying to update in place C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\25\63455299-2bdca619.idx
cache: Upgrade writing to disk for C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\25\63455299-2bdca619
security: blacklist: check contains o02ib62shSdqUeItFgHPgJBXBil8Nh2Z0D/m0eu+6cU=, state now NEED_LOAD
security: blacklist: loadCache
security: blacklist: not found in cache
security: Trusted libraries list check is enabled
security: Trusted libraries list file not found
cache: Create from verifier: JarSigningData{hasOnlySignedEntries=true, hasSingleCodeSource=true, hasMissingSignedEntries=false}
cache: Upgrade of entry done
cache: readIndexFile returning success
network: Cache entry found [url: http://www.falstad.com/wave2d/wave2d.jar, version: null] prevalidated=false/0
cache: Adding MemoryCache entry: http://www.falstad.com/wave2d/wave2d.jar
cache: Resource http://www.falstad.com/wave2d/wave2d.jar has expired.
basic: Loading Java Applet ...
security: blacklist: hasBeenModifiedSince 0 (we have 1422916679903)
cache: Trying to update in place C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\0\2c101040-5e767561.idx
cache: Upgrade writing to disk for C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\0\2c101040-5e767561
security: blacklist: check contains iouPJqzUy2PMIw2ftT2TapRMOz4=, state now IN_MEMORY
security: blacklist: not found in cache
security: Trusted libraries list file not found
cache: Create from verifier: JarSigningData{hasOnlySignedEntries=true, hasSingleCodeSource=true, hasMissingSignedEntries=false}
cache: Upgrade of entry done
cache: readIndexFile returning success
security: blacklist: hasBeenModifiedSince 0 (we have 1422916679903)
cache: Trying to update in place C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\0\38596a40-24cb96d9-1.2-.idx
cache: Upgrade writing to disk for C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\0\38596a40-24cb96d9-1.2-
security: blacklist: check contains QC52clapuj4xCcBh9Pfk8OvUQZDJ0/h/WMrU/iemOg0=, state now IN_MEMORY
security: blacklist: not found in cache
security: Trusted libraries list file not found
cache: Create from verifier: JarSigningData{hasOnlySignedEntries=true, hasSingleCodeSource=true, hasMissingSignedEntries=false}
cache: Upgrade of entry done
cache: readIndexFile returning success
security: blacklist: hasBeenModifiedSince 0 (we have 1422916679903)
cache: Trying to update in place C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\0\3b592940-4272f40d-1.2-.idx
cache: Upgrade writing to disk for C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\0\3b592940-4272f40d-1.2-
security: blacklist: check contains tqULwdgznnXYZMsB1k8QgvTludb2ax15Xf08irAXbas=, state now IN_MEMORY
security: blacklist: not found in cache
security: Trusted libraries list file not found
cache: Create from verifier: JarSigningData{hasOnlySignedEntries=true, hasSingleCodeSource=true, hasMissingSignedEntries=false}
cache: Upgrade of entry done
cache: readIndexFile returning success
security: blacklist: hasBeenModifiedSince 0 (we have 1422916679903)
cache: Trying to update in place C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\0\496733c0-5f58b67e-1.2-.idx
cache: Upgrade writing to disk for C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\0\496733c0-5f58b67e-1.2-
security: blacklist: check contains TteWe37PtZlfpj3cx702H673x9n+RZb6eHqXbqeiypE=, state now IN_MEMORY
. . .
cache: Upgrade of entry done
cache: readIndexFile returning success
security: blacklist: hasBeenModifiedSince 0 (we have 1422916679903)
cache: Trying to update in place C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\63\76bc81ff-6d42eb4f.idx
cache: Upgrade writing to disk for C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\63\76bc81ff-6d42eb4f
security: blacklist: check contains wYCtUYjXBCk01qwPIOisnjzP9W0=, state now IN_MEMORY
security: blacklist: not found in cache
security: Trusted libraries list file not found
cache: Create from verifier: JarSigningData{hasOnlySignedEntries=true, hasSingleCodeSource=true, hasMissingSignedEntries=false}
cache: Upgrade of entry done
cache: readIndexFile returning success
security: blacklist: hasBeenModifiedSince 0 (we have 1422916679903)
cache: Trying to update in place C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\63\ad3723f-79d8ea10-1.2-.idx
cache: Upgrade writing to disk for C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\63\ad3723f-79d8ea10-1.2-
security: blacklist: check contains RvqOUi/rhM4/fIKo9T9tUTnH8xJUoTmpCCTLA5ktzp0=, state now IN_MEMORY
security: blacklist: not found in cache
security: Trusted libraries list file not found
cache: Create from verifier: JarSigningData{hasOnlySignedEntries=true, hasSingleCodeSource=true, hasMissingSignedEntries=false}
cache: Upgrade of entry done
cache: readIndexFile returning success
network: CleanupThread used 30524603 us
java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(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.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivileged(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.connect(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFileInternal(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$800(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@bd3242ec: 1
cache: Resource http://www.falstad.com/wave2d/wave2d.jar has expired.
network: Connecting http://www.falstad.com/wave2d/wave2d.jar with proxy=DIRECT
network: Connecting http://www.falstad.com:80/ with proxy=DIRECT
network: Connecting http://www.falstad.com/wave2d/wave2d.jar with proxy=DIRECT
network: Connecting http://www.falstad.com:80/ with proxy=DIRECT
java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(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.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivileged(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.connect(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFileInternal(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$800(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
network: Cache entry not found [url: http://www.falstad.com/wave2d/Wave2d.class, version: null]
network: Connecting http://www.falstad.com/wave2d/Wave2d.class with proxy=DIRECT
network: Connecting http://www.falstad.com:80/ with proxy=DIRECT
network: Cache entry not found [url: http://www.falstad.com/wave2d/Wave2d/class.class, version: null]
network: Connecting http://www.falstad.com/wave2d/Wave2d/class.class with proxy=DIRECT
network: Connecting http://www.falstad.com:80/ with proxy=DIRECT
java.lang.ClassNotFoundException: Wave2d.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
basic: load: class Wave2d.class not found.
java.lang.ClassNotFoundException: Wave2d.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Ignored exception: java.lang.ClassNotFoundException: Wave2d.class
basic: Dialog type is not candidate for embedding
security: Reset deny session certificate store
security: Reset deny session certificate store
basic: Removed progress listener: sun.plugin.util.ProgressMonitorAdapter@4772203f
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Sample proxy.pac file:
function FindProxyForURL(url, host) {
myip = myIpAddress();
if (myip == "127.0.0.2") {
return "DIRECT";
}
// Substitute the address of your actual proxy server.
return "PROXY wwwproxy2.int.myorg.com:8080";
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
None, as the proxy settings are determined by the user's organization, and the errors occur before the first line of code in the applet or webstart program is executed.
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft WIndows [Version 6.1.7601]
EXTRA RELEVANT SYSTEM CONFIGURATION :
Http / https connections outside of the corporate network are made through a proxy server.
A DESCRIPTION OF THE PROBLEM :
When launching an applet or running a JNLP page, the JRE takes several actions to connect to the outside world before the application starts running:
1) It may need to load .jar files.
2) It may need to validate that code signing certificates have not been revoked.
In making those connections, it needs to determine the Proxy server to use for each connection. This may involved executing a proxy configuration script.
During execution of the proxy configuration script, the myIpAddress() method is always returning "127.0.0.1" instead of the user's corporate IP address (that is the one reported by ipconfig, like "144.208.119.181"). This may cause the script to return the wrong proxy server (say, "DIRECT" instead of the actual corporate "PROXY=xxxx").
The result of this is:
1) There may be long delays while connection attempts time out (because the sites are not reachable through DIRECT connections.)
2) The application may not start because some .jar files cannot be downloaded.
3) The application may generate warning messages like: "The digital signature for this application was generated with a certificate from a trusted certificate authority, but we are unable to ensure that it was not revoked by that authority."
The general impact of this is that applets and webstart applications may not be usable in corporate enviroments on JDK 1.8u31.
REGRESSION. Last worked in version 8u25
ADDITIONAL REGRESSION INFORMATION:
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Make sure you are on a network that requires outgoing connections to go through a proxy server.
2) Make sure your proxy server is appropriately configured in Java Control Panel to execute a Proxy Configuration file (say file://temp/proxy.pac).
3) Have the logic in the proxy.pac file be something like this:
function FindProxyForURL(url, host) {
myip = myIpAddress();
if (myip == "127.0.0.1") {
return "DIRECT";
}
// Substitute the address of your actual proxy server.
return "PROXY wwwproxy2.int.myorg.com:8080";
}
4) Using Internet Explorer, attempt to connect to the site: http://www.falstad.com/wave2d
5) With JDK 1.8u31, the applet on the page will not start up.
6) In the Java console log, observe that all the network connections specify proxy=DIRECT:
network: Connecting http://www.falstad.com/wave2d/wave2d.jar with proxy=DIRECT
7) Observe that the connection ultimately times out, and a ClassNotFoundException is thrown.
8) Running the same thing with JDK 1.8u25, observe that the applet starts up.
9) In JDK 1.8u31, it appears that the myIpAddress() function is always returning "127.0.01" at this point in applet / webstart startup.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The applet starts running. It uses the user's proxy server for connections.
Logs from JDK 1.8u25 indicate that the proxy server is used for connections to load the .jar file:
network: Connecting http://www.falstad.com/wave2d/wave2d.jar with proxy=HTTP @ wwwproxy2.int.myorg.com:8080/144.208.119.101:8080
ACTUAL -
The applet does not start running. It does not use a proxy server for connections (proxy="DIRECT"). It displays a ClassNotFoundException.
Logs indicate that DIRECT connections are made:
network: Connecting http://www.falstad.com/wave2d/wave2d.jar with proxy=DIRECT
OTHER NOTES:
This is most likely the root cause of the following bug, which should be closed:
https://bugs.openjdk.java.net/browse/JDK-8071893 : Proxy settings ignored during load and validation of applets and webstart apps
Also, in related tests, it appears that once a webstart program is up and running, myIpAddress() does appear to correctly return the actual corporate IP address. This was verified using code like the following:
List<Proxy> proxies = ProxySelector.getDefault().select(new URI(urlString));
proxy = proxies.get(0).toString();
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Java Plug-in 11.31.2.13
Using JRE version 1.8.0_31-b13 Java HotSpot(TM) 64-Bit Server VM
User home directory = C:\Users\maxhearn
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@4772203f
security: Expected Main URL: http://www.falstad.com/wave2d/wave2d.jar
basic: Plugin2ClassLoader.addURL parent called for http://www.falstad.com/wave2d/wave2d.jar
security: Blacklist revocation check is enabled
security: blacklist: created: NEED_LOAD, lastModified: 1422916679903
security: blacklist: hasBeenModifiedSince 0 (we have 1422916679903)
cache: Trying to update in place C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\25\63455299-2bdca619.idx
cache: Upgrade writing to disk for C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\25\63455299-2bdca619
security: blacklist: check contains o02ib62shSdqUeItFgHPgJBXBil8Nh2Z0D/m0eu+6cU=, state now NEED_LOAD
security: blacklist: loadCache
security: blacklist: not found in cache
security: Trusted libraries list check is enabled
security: Trusted libraries list file not found
cache: Create from verifier: JarSigningData{hasOnlySignedEntries=true, hasSingleCodeSource=true, hasMissingSignedEntries=false}
cache: Upgrade of entry done
cache: readIndexFile returning success
network: Cache entry found [url: http://www.falstad.com/wave2d/wave2d.jar, version: null] prevalidated=false/0
cache: Adding MemoryCache entry: http://www.falstad.com/wave2d/wave2d.jar
cache: Resource http://www.falstad.com/wave2d/wave2d.jar has expired.
basic: Loading Java Applet ...
security: blacklist: hasBeenModifiedSince 0 (we have 1422916679903)
cache: Trying to update in place C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\0\2c101040-5e767561.idx
cache: Upgrade writing to disk for C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\0\2c101040-5e767561
security: blacklist: check contains iouPJqzUy2PMIw2ftT2TapRMOz4=, state now IN_MEMORY
security: blacklist: not found in cache
security: Trusted libraries list file not found
cache: Create from verifier: JarSigningData{hasOnlySignedEntries=true, hasSingleCodeSource=true, hasMissingSignedEntries=false}
cache: Upgrade of entry done
cache: readIndexFile returning success
security: blacklist: hasBeenModifiedSince 0 (we have 1422916679903)
cache: Trying to update in place C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\0\38596a40-24cb96d9-1.2-.idx
cache: Upgrade writing to disk for C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\0\38596a40-24cb96d9-1.2-
security: blacklist: check contains QC52clapuj4xCcBh9Pfk8OvUQZDJ0/h/WMrU/iemOg0=, state now IN_MEMORY
security: blacklist: not found in cache
security: Trusted libraries list file not found
cache: Create from verifier: JarSigningData{hasOnlySignedEntries=true, hasSingleCodeSource=true, hasMissingSignedEntries=false}
cache: Upgrade of entry done
cache: readIndexFile returning success
security: blacklist: hasBeenModifiedSince 0 (we have 1422916679903)
cache: Trying to update in place C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\0\3b592940-4272f40d-1.2-.idx
cache: Upgrade writing to disk for C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\0\3b592940-4272f40d-1.2-
security: blacklist: check contains tqULwdgznnXYZMsB1k8QgvTludb2ax15Xf08irAXbas=, state now IN_MEMORY
security: blacklist: not found in cache
security: Trusted libraries list file not found
cache: Create from verifier: JarSigningData{hasOnlySignedEntries=true, hasSingleCodeSource=true, hasMissingSignedEntries=false}
cache: Upgrade of entry done
cache: readIndexFile returning success
security: blacklist: hasBeenModifiedSince 0 (we have 1422916679903)
cache: Trying to update in place C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\0\496733c0-5f58b67e-1.2-.idx
cache: Upgrade writing to disk for C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\0\496733c0-5f58b67e-1.2-
security: blacklist: check contains TteWe37PtZlfpj3cx702H673x9n+RZb6eHqXbqeiypE=, state now IN_MEMORY
. . .
cache: Upgrade of entry done
cache: readIndexFile returning success
security: blacklist: hasBeenModifiedSince 0 (we have 1422916679903)
cache: Trying to update in place C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\63\76bc81ff-6d42eb4f.idx
cache: Upgrade writing to disk for C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\63\76bc81ff-6d42eb4f
security: blacklist: check contains wYCtUYjXBCk01qwPIOisnjzP9W0=, state now IN_MEMORY
security: blacklist: not found in cache
security: Trusted libraries list file not found
cache: Create from verifier: JarSigningData{hasOnlySignedEntries=true, hasSingleCodeSource=true, hasMissingSignedEntries=false}
cache: Upgrade of entry done
cache: readIndexFile returning success
security: blacklist: hasBeenModifiedSince 0 (we have 1422916679903)
cache: Trying to update in place C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\63\ad3723f-79d8ea10-1.2-.idx
cache: Upgrade writing to disk for C:\Users\maxhearn\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\63\ad3723f-79d8ea10-1.2-
security: blacklist: check contains RvqOUi/rhM4/fIKo9T9tUTnH8xJUoTmpCCTLA5ktzp0=, state now IN_MEMORY
security: blacklist: not found in cache
security: Trusted libraries list file not found
cache: Create from verifier: JarSigningData{hasOnlySignedEntries=true, hasSingleCodeSource=true, hasMissingSignedEntries=false}
cache: Upgrade of entry done
cache: readIndexFile returning success
network: CleanupThread used 30524603 us
java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(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.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivileged(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.connect(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFileInternal(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$800(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
cache: registerReference: com.sun.deploy.cache.MemoryCache$CachedResourceReference@bd3242ec: 1
cache: Resource http://www.falstad.com/wave2d/wave2d.jar has expired.
network: Connecting http://www.falstad.com/wave2d/wave2d.jar with proxy=DIRECT
network: Connecting http://www.falstad.com:80/ with proxy=DIRECT
network: Connecting http://www.falstad.com/wave2d/wave2d.jar with proxy=DIRECT
network: Connecting http://www.falstad.com:80/ with proxy=DIRECT
java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(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.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivileged(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.connect(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFileInternal(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$800(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
network: Cache entry not found [url: http://www.falstad.com/wave2d/Wave2d.class, version: null]
network: Connecting http://www.falstad.com/wave2d/Wave2d.class with proxy=DIRECT
network: Connecting http://www.falstad.com:80/ with proxy=DIRECT
network: Cache entry not found [url: http://www.falstad.com/wave2d/Wave2d/class.class, version: null]
network: Connecting http://www.falstad.com/wave2d/Wave2d/class.class with proxy=DIRECT
network: Connecting http://www.falstad.com:80/ with proxy=DIRECT
java.lang.ClassNotFoundException: Wave2d.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
basic: load: class Wave2d.class not found.
java.lang.ClassNotFoundException: Wave2d.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Ignored exception: java.lang.ClassNotFoundException: Wave2d.class
basic: Dialog type is not candidate for embedding
security: Reset deny session certificate store
security: Reset deny session certificate store
basic: Removed progress listener: sun.plugin.util.ProgressMonitorAdapter@4772203f
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Sample proxy.pac file:
function FindProxyForURL(url, host) {
myip = myIpAddress();
if (myip == "127.0.0.2") {
return "DIRECT";
}
// Substitute the address of your actual proxy server.
return "PROXY wwwproxy2.int.myorg.com:8080";
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
None, as the proxy settings are determined by the user's organization, and the errors occur before the first line of code in the applet or webstart program is executed.
- duplicates
-
JDK-8071897 JRE 8U25 and 8u31 b32 cannot launch Java Web Start with proxy pac but works fine for 7u67
- Resolved