user2358826
user2358826

Reputation: 231

net.adoptopenjdk.icedteaweb.shaded.mozilla.javascript.EcmaError: ReferenceError: "java" is not defined. (internal#105)

When trying to invoke a JNLP application with OpenWebStart, I get this stack trace of errors.

net.adoptopenjdk.icedteaweb.shaded.mozilla.javascript.EcmaError: ReferenceError: "java" is not defined. (internal#105)
    at net.adoptopenjdk.icedteaweb.shaded.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3557)
    at net.adoptopenjdk.icedteaweb.shaded.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3535)
    at net.adoptopenjdk.icedteaweb.shaded.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3620)
    at net.adoptopenjdk.icedteaweb.shaded.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1652)
    at net.adoptopenjdk.icedteaweb.shaded.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3413)
    at script.dnsResolve(internal:105)
    at script.getResolvedIp(http://uhic.ca.edu/toodeepregression3.pac:569)
    at script.FindProxyForURL(http://uhic.ca.edu/toodeepregression3.pac:62)

The script at line 569 is.. internalResolvedIp = dnsResolve(host)

    if (
            host
            ) {
        // If the user has typed an IP address in the address bar, take it
        // as it is.
        var isIpV4Address = /^(\d+.){3}\d+$/;
        var isIpV6Address = /^\[(.*)\]$/;

        if (
                isIpV4Address.test(host)
                ) {
            internalResolvedIp = host;
        } else {
            var matches = host.match(isIpV6Address);

            if (
                    matches && matches.length === 2
                    ) {
                // Get the address between the square brackets
                internalResolvedIp = matches[1];
            } else if (
                    isDnsResolvingAllowed
                    ) {
                ****internalResolvedIp = dnsResolve(host);****
            }
        }
    }

I am not sure what this error is. I have looked at the OpenWebStart logs as well. I have searched far and wide in the internet world but I barely get any hits for this error.

Upvotes: 2

Views: 192

Answers (1)

user18156276
user18156276

Reputation: 11

You have clearly hit the Bug, I am trying to resolve in OWS for my Team as well. We have been stuck with this issue for 9 months ever since OWS rolled out. I can explain you what I discovered so far. Infact I sent my sanitized pac-proy to OWS team to identify the issue but they sent it back to me . So here is the issue. OWS has a javascript file in its source code. When you call dnsResolve in your pac-proxy, it invokes the provider of dnsResolve and that implementation is in OWS source code. Now the dnsResolve call java.net.* package classes internally. This requires Rhino and Java interface to have been stabilized at run time. OWS is not able to create that interface connection so when javascript tries to call java through the Rhino interface , it can not find java classes since it can not recognize that interface and so comes back to say java not found. I and my Team are still analyzing the wireshark logs of error to figure out how we could put a fix into OWS or understand how OWS ,Java and Rhino can be successfully talk to each other in the security sandbox container inside which OWS runs. I could not give u a solution but a better understanding as to where you would like to put your efforts to make it work for u.

Upvotes: 1

Related Questions