This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 245116 - PAC file execution fails on JRE8 (Nashorn)
Summary: PAC file execution fails on JRE8 (Nashorn)
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Proxy (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal with 4 votes (vote)
Assignee: Libor Fischmeistr
Depends on:
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
Exception Reporter:


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://, 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: 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?