-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
automatic configuration evaluation error #61
Comments
This library has changed from Rhino to Nashorn with version 1.0.5 for a smaller footprint only: I by myself have other problems with PAC script parsing, which may have to do with the same problem: Please see [issue #50 in closed issues]. Closed not because the base problem with PAC script parsing has been solved, but because of a better exception handling. The base problem results from a non-parsable PAC script which I was not able to get from customer to analyze this by myself. It may be their script is correct, but Nashorn engine in 1.0.5 is not willing to parse it as desired. I definitely vote for a change back to Rhino, since you were able to drill this problem down to the inconsistent JavaScript parsing behavior of Nashorn. Thank you very much. Appreciate it! Guido |
Hi all,
should we make that configurable?
Default is ?
Cheers,
Markus
From: gschnepp <[email protected]>
Reply-To: MarkusBernhardt/proxy-vole <[email protected]>
Date: Monday, 12 November 2018 at 12:04
To: MarkusBernhardt/proxy-vole <[email protected]>
Cc: Subscribed <[email protected]>
Subject: Re: [MarkusBernhardt/proxy-vole] automatic configuration evaluation error (#61)
This library has changed from Rhino to Nashorn with version 1.0.5 for a smaller footprint:
- Fixed issue #40: Using delight-nashorn-sandbox to avoid dependency on rhino
I by myself have other problems with PAC script parsing, which may have to do with the same problem: Please see issue #50 in closed issues. Closed not because the base problem with PAC script parsing has been solved, but because of a better exception handling. The base problem results from a non-parsable PAC script which I was not able to get from customer to analyze this by myself. It may be, that their script is correct, but Nashorn engine in 1.0.5 is not willing to parse it correctly.
I definitely vote for change back to Rhino, since you were able to drill this problem down to the inconsistent JavaScript parsing behavior of Nashorn. Thank you very much. Appreciate it!
Guido
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
How would you make that configurable since the decision of what java_delight_*-library is to be used is hardcoded in the POM? May be I just don't know how to achieve configurability here. But Nashorn engine is deprecated or will be marked deprecated by Oracle shortly as announced months ago. So proxy-vole needs another Javascript engine the long run in any case. Oracle's favorite scripting engine is Graal-VM now, a very different approach. Since Rhino was part of proxy-vole up to 1.0.4 without many problems I vote for a hard way back. |
Actually, PAC script failing with nashorn is a bit longer than in previous post. // Nashorn scripting engine fails to parse this script with
If I make small change in script, for example delete one of else if ... return block or change |
@gschnepp Maven supports optional dependencies . |
@bergmannm: Changing your script may be OK for you, but using proxy-vole out in the wild requires to work with different/unknown Javascript sources from all over the world (in my case). And proxy pac script writers in any arbitrary bigger company are not under my control, unfortunately. Guido |
Hi,
I'm getting errors when evaluating PAC script.
Caused by: jdk.nashorn.internal.runtime.ParserException: :8:2 Expected an operand but found else
else return "PROXY proxy:3128";
^
at jdk.nashorn.internal.parser.AbstractParser.error(AbstractParser.java:294)
at jdk.nashorn.internal.parser.AbstractParser.error(AbstractParser.java:279)
It's caused by semicolons before else , nashorn scripting engine doesn't like that.
` function FindProxyForURL(url, host)
{
if (shExpMatch(host, "deploy.abc.eu") ||
shExpMatch(host, "asp.abc.eu")
)
Rhino scripting engine ( https://mvnrepository.com/artifact/org.mozilla/rhino/1.7.10 ) can evaluate this script correctly, what do you think about using it instead of nashorn ?
The text was updated successfully, but these errors were encountered: