Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 245116 - PAC file execution fails on JRE8 (Nashorn)
PAC file execution fails on JRE8 (Nashorn)
Status: NEW
Product: platform
Classification: Unclassified
Component: Proxy
8.0
PC Windows 7
: P3 with 4 votes (vote)
: 8.1
Assigned To: Libor Fischmeistr
issues@platform
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-18 07:16 UTC by phansson
Modified: 2014-07-19 04:04 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description phansson 2014-06-18 07:16:28 UTC
To reproduce:

1. Have your proxy settings such that a PAC file is used for proxy selection.
2. Make sure to use JRE8/JDK8.
3. The PAC script *must* make use of the isInNet() JavaScript helper function.

In this scenario NetBeans is unable to execute the JavaScript. It fails with:

    "While invoking FindProxyForURL(socket://dlc.sun.com.edgesuite.net:80, dlc.sun.com.edgesuite.net thrown javax.script.ScriptException: 
    TypeError: [RegExp /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/] is not a function in <eval> at line number 20

Note that you'll only see the error if you enable logging at level FINE or above. The current implementation is such that it will silently fail on PAC script execution errors.


I eventually gave up on the NetBeans current PAC file evaluation setup and did my own. You can find it here: https://bitbucket.org/phansson/netbeansproxy2. It also fixes several other problems with the current ProxySelector in NetBeans.
Comment 1 elotter 2014-06-29 13:03:49 UTC
This seems like an excellent addition to the platform - we have ourselves experienced many problems with proxy auto-detection for our application deployed behind corporate firewalls - looking forward to integration of this with the platform to have these enhancements everywhere.
Comment 2 Libor Fischmeistr 2014-07-17 07:01:00 UTC
phansson, thank you very much for your report and much more for the fix.

Unfortunately I think it is not right time to fix this bug to 8.0.1. It should be done into some major release. That's the reason why I'm decreasing priority to P3 despite I think it's more P2.
Comment 3 elotter 2014-07-19 04:04:00 UTC
It would have been great if this could arrive in an earlier release, as it will solve a tremendous support problem for us. The alternative is to temporarily incorporate phansson's solution into our code, and remove it when the Platform catches up.

When is a next official release containing this expected?


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo