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 230257 - NPE at core.network.proxy.ProxyAutoConfig.evalPAC due to Nashorn
Summary: NPE at core.network.proxy.ProxyAutoConfig.evalPAC due to Nashorn
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.4
Hardware: PC Windows 7 x64
: P2 normal (vote)
Assignee: Petr Hejl
URL:
Keywords: JDK_8
Depends on:
Blocks:
 
Reported: 2013-05-25 11:49 UTC by sreimers
Modified: 2013-08-21 10:05 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 200911


Attachments
stacktrace (2.17 KB, text/plain)
2013-05-25 11:49 UTC, sreimers
Details
Test diff (1.31 KB, application/octet-stream)
2013-05-28 14:06 UTC, Libor Fischmeistr
Details
stacktrace (2.17 KB, text/plain)
2013-06-18 17:07 UTC, Exceptions Reporter
Details
stacktrace (2.17 KB, text/plain)
2013-06-19 15:40 UTC, peppertech
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sreimers 2013-05-25 11:49:25 UTC
Build: NetBeans IDE Dev (Build 201305232300)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.0-b33, Java(TM) SE Runtime Environment, 1.8.0-ea-b91
OS: Windows 7

User Comments:
sreimers: Starting NetBeans withuser dir from last build




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.core.network.proxy.ProxyAutoConfig.evalPAC(ProxyAutoConfig.java:203)
   at org.netbeans.core.network.proxy.ProxyAutoConfig.initEngine(ProxyAutoConfig.java:131)
   at org.netbeans.core.network.proxy.ProxyAutoConfig.access$000(ProxyAutoConfig.java:65)
   at org.netbeans.core.network.proxy.ProxyAutoConfig$1.run(ProxyAutoConfig.java:104)
   at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
   at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042)
Comment 1 sreimers 2013-05-25 11:49:27 UTC
Created attachment 134891 [details]
stacktrace
Comment 2 Libor Fischmeistr 2013-05-26 07:20:23 UTC
Can I ask you to attach full IDE log? http://wiki.netbeans.org/FaqLogMessagesFile

Thanks
Comment 3 Libor Fischmeistr 2013-05-27 08:56:35 UTC
It's caused by Java 8 bug. On supported Java 7 it works fine.
Comment 4 Libor Fischmeistr 2013-05-27 12:23:37 UTC
It's not problem of Java 8 but of NetBeans. But also it isn't problem of proxy (core.main) but probably of nashorn (libs.nashorn). The ScriptEngineManager.getEngineByName() method returns null for "JavaScript".
Comment 5 Libor Fischmeistr 2013-05-28 14:04:11 UTC
Jarda, reassigning to you.

ScriptEngineManager.getEngineByName() returns null on Java 8, when ide cluster is enabled (due to nashorn).
Comment 6 Libor Fischmeistr 2013-05-28 14:06:08 UTC
Created attachment 135008 [details]
Test diff

Possible test. Must be run from command line:

ant -f core.network/build.xml -Dtest.includes=org/netbeans/core/network/proxy/ProxyAutoConfigTest.java -Dtest.type=unit -Dcontinue.after.failing.tests=true test-single -Dpermit.jdk8.builds=true

JAVA_HOME must be set up to JDK 8.
Comment 7 Jaroslav Tulach 2013-06-04 06:49:06 UTC
Have not we discussed the solution already? Was not it proposed to change libs.nashorn to remove META-INF/services/javax.script.ScriptEngine registration?
Comment 8 Jiri Rechtacek 2013-06-04 07:43:11 UTC
(In reply to comment #7)
> Have not we discussed the solution already? Was not it proposed to change
> libs.nashorn to remove META-INF/services/javax.script.ScriptEngine
> registration?

We did it but it didn't help.
Comment 9 Exceptions Reporter 2013-06-13 07:25:37 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=200911
Comment 10 Exceptions Reporter 2013-06-18 17:07:55 UTC
Created attachment 135990 [details]
stacktrace

initial start up of new install.  Install was from .zip file
Comment 11 peppertech 2013-06-19 15:40:58 UTC
Created attachment 136041 [details]
stacktrace

this is showing up at IDE startup.  It displays before the splash screen goes away.
Comment 12 Jaroslav Tulach 2013-07-09 14:29:46 UTC
I don't see the exception, I see:

     [exec] INFO [org.netbeans.core.network.proxy.kde.KdeNetworkProxy]: KDE system proxy resolver: manual (proxy type: 1)
     [exec] INFO [org.netbeans.core.network.proxy.kde.KdeNetworkProxy]: KDE system proxy resolver: http proxy (http://www-proxy 80)
     [exec] INFO [org.netbeans.core.network.proxy.kde.KdeNetworkProxy]: KDE system proxy resolver: https proxy (http://www-proxy 80)
     [exec] INFO [org.netbeans.core.network.proxy.kde.KdeNetworkProxy]: KDE system proxy resolver: socks proxy (http://www-proxy 80)
     [exec] INFO [org.netbeans.core.network.proxy.kde.KdeNetworkProxy]: KDE system proxy resolver: no proxy (localhost,127.0.0.1)
     [exec] INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy reloading succeeded.
     [exec] INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy - mode: manual
     [exec] INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy - http host: http://www-proxy
     [exec] INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy - http port: 80
     [exec] INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy - https host: http://www-proxy
     [exec] INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy - https port: 80
     [exec] INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy - socks host: http://www-proxy
     [exec] INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy - socks port: 80
     [exec] INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy - no prohy hosts: localhost|127.0.0.1
     [exec] INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy TEST - http host: http://www-proxy
     [exec] INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy TEST - http port: 80
Comment 13 Jaroslav Tulach 2013-07-09 14:36:34 UTC
Got the exception by switching to autoconfig.
Comment 14 Jaroslav Tulach 2013-07-09 15:28:31 UTC
If I remove META-INF/services from libs.nashorn, NbInstaller.shouldDelegateClasspathResource still finds that libs.nashorn module masks jdk.nashorn.** packages and refuses to delegate to boot classpath.

Probably simplest solution is to repackage NetBeans copy of nashorn until we can rely on JDK one.
Comment 15 Jaroslav Tulach 2013-07-09 15:34:55 UTC
When we keep our current version (rev. 02f810c26ff9, am I right?) of patched nashorn, the failure happens when StructureLoader.java:81 tries to load

jdk/nashorn/internal/objects/Global.clazz

resource and cannot find it. Is not our copy of nashorn patched too much?
Comment 16 Exceptions Reporter 2013-08-19 11:01:03 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=200911
Comment 17 Jiri Rechtacek 2013-08-19 11:26:39 UTC
(In reply to Exceptions Reporter from comment #16)
> This bug already has 10 duplicates 
> see http://statistics.netbeans.org/exceptions/detail.do?id=200911

It will block using proxies in IDE for many users who are running on JDK 8 => I guess it should be tracked as P2 at least.
Comment 18 Petr Hejl 2013-08-21 10:05:41 UTC
Should be fixed web-main 117cc9fa61bb. Please verify.