Problem with myIpAddress() in PAC-file environment
Hakan Carlsson
hc.handelsbanken at gmail.com
Mon Feb 1 14:22:22 UTC 2016
Hi List,
After upgrading to java8, we experienced some problem regarding use of PAC
file for the java applications, i.e having the proxy config using e
PAC-file.
>From what I can see, the function myIpAddress() is calling the
CrossDomainXML class to try to get a crossdomain.xml file. This will in our
case make the myIpAddress() function recursivly call FindProxyForURL(url,
host) and things starts going wrong...
Stacktrace:
at
jdk.nashorn.internal.scripts.Script$Recompilation$520$22701AA$\^eval\_.FindProxyForURLCommon(<eval>:155)^M
at
*jdk.nashorn.internal.scripts.Script$Recompilation$519$24436AA$\^eval\_.FindProxyForURL(<eval>:155)^M*
at
jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:640)^M
at
jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:229)^M
at
jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:387)^M
at
jdk.nashorn.api.scripting.ScriptObjectMirror.callMember(ScriptObjectMirror.java:192)^M
at
jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:381)^M
at
jdk.nashorn.api.scripting.NashornScriptEngine.invokeFunction(NashornScriptEngine.java:187)^M
at com.sun.deploy.net.proxy.SunAutoProxyHandler.jsGetProxyInfo(Unknown
Source)^M
at com.sun.deploy.net.proxy.SunAutoProxyHandler.access$100(Unknown
Source)^M
at com.sun.deploy.net.proxy.SunAutoProxyHandler$2.run(Unknown Source)^M
at com.sun.deploy.net.proxy.SunAutoProxyHandler$2.run(Unknown Source)^M
at java.security.AccessController.doPrivileged(Native Method)^M
at com.sun.deploy.net.proxy.SunAutoProxyHandler.jsGetProxyInfo(Unknown
Source)^M
at com.sun.deploy.net.proxy.SunAutoProxyHandler.getProxyInfo(Unknown
Source)^M
at com.sun.deploy.net.proxy.DynamicProxyManager.getProxyList(Unknown
Source)^M
at com.sun.deploy.net.proxy.DeployProxySelector.select(Unknown Source)^M
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown
Source)^M
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)^M
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)^M
at java.security.AccessController.doPrivileged(Native Method)^M
at java.security.AccessController.doPrivileged(Unknown Source)^M
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown
Source)^M
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)^M
at com.sun.deploy.net.CrossDomainXML$3.run(Unknown Source)^M
at java.security.AccessController.doPrivileged(Native Method)^M
at com.sun.deploy.net.CrossDomainXML.privilegedConnect(Unknown Source)^M
at com.sun.deploy.net.CrossDomainXML.check(Unknown Source)^M
at *com.sun.deploy.net.CrossDomainXML.check(Unknown Source)^M*
at
com.sun.javaws.security.JavaWebStartSecurity.checkConnectHelper(Unknown
Source)^M
at com.sun.javaws.security.JavaWebStartSecurity.checkConnect(Unknown
Source)^M
at java.net.InetAddress.getLocalHost(Unknown Source)^M
at *com.sun.deploy.net.proxy.pac.PACFunctionsImpl.myIpAddress*(Unknown
Source)^M
at com.sun.deploy.net.proxy.SunAutoProxyHandler$5.get(Unknown Source)^M
at com.sun.deploy.net.proxy.SunAutoProxyHandler$5.get(Unknown Source)^M
at
jdk.nashorn.internal.scripts.Script$Recompilation$517$22701AA$\^eval\_.FindProxyForURLCommon(<eval>:155)^M
at
jdk.nashorn.internal.scripts.Script$Recompilation$516$24436AA$\^eval\_.FindProxyForURL(<eval>:155)^M
at
jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:640)^M
at
jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:229)^M
Any idea how to avoid the recursion? we really need to get the IP of the
client with myIpAddress()
/Hakan
More information about the nashorn-dev
mailing list