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 236704 - Proxy autoconfig fails on JDK 1.8
Summary: Proxy autoconfig fails on JDK 1.8
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: JDK Problems (show other bugs)
Version: 8.0
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Antonin Nebuzelsky
URL:
Keywords: JDK_8
: 236305 236933 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-10-03 14:44 UTC by Stanislav Aubrecht
Modified: 2013-11-21 13:32 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Proposed patch to fix this issue (1.40 KB, patch)
2013-10-09 11:15 UTC, Tomas Hurka
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stanislav Aubrecht 2013-10-03 14:44:39 UTC
The IDE throws an exception when running on JDK 1.8 update 51:



java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    jdk/nashorn/internal/scripts/Script$engine.runScript(Ljdk/nashorn/internal/runtime/ScriptFunction;Ljava/lang/Object;)Ljava/lang/Object; @17: invokestatic
  Reason:
    Type 'jdk/nashorn/internal/scripts/JO1P0' (current frame, stack[0]) is not assignable to 'jdk/nashorn/internal/runtime/ScriptObject'
  Current Frame:
    bci: @17
    flags: { }
    locals: { 'jdk/nashorn/internal/runtime/ScriptFunction', 'java/lang/Object', 'jdk/nashorn/internal/runtime/ScriptObject' }
    stack: { 'jdk/nashorn/internal/scripts/JO1P0' }
  Bytecode:
    0000000: 2ab6 0018 4dbb 001a 5903 b800 1e2c b700
    0000010: 21b8 0027 4d2c bb00 a559 b200 a704 32c0
    0000020: 00a9 2cb7 00ac ba00 b000 002c ba00 b300
    0000030: 004e 2cba 00b6 0000 59ba 00b9 0000 5f2b
    0000040: 12bb bb00 bd59 05b8 001e b700 c059 04b8
    0000050: 00c6 b500 c959 03b8 00c6 b500 cc59 04b8
    0000060: 00c6 b500 cf59 bb00 a559 b200 a706 32c0
    0000070: 00a9 2cb7 00ac b500 e159 b800 e4b6 00e8
    0000080: ba00 eb00 004e 2cba 00b6 0000 59ba 00b9
    0000090: 0000 5f2b 12ed bb00 bd59 05b8 001e b700
    00000a0: c059 04b8 00c6 b500 c959 03b8 00c6 b500
    00000b0: cc59 04b8 00c6 b500 cf59 bb00 a559 b200
    00000c0: a707 32c0 00a9 2cb7 00ac b500 e159 b800
    00000d0: e4b6 00e8 ba00 eb00 004e 2cba 00b6 0000
    00000e0: 59ba 00b9 0000 5f2b 12fc bb00 bd59 05b8
    00000f0: 001e b700 c059 04b8 00c6 b500 c959 03b8
    0000100: 00c6 b500 cc59 04b8 00c6 b500 cf59 bb00
    0000110: a559 b200 a710 0632 c000 a92c b700 acb5
    0000120: 00e1 59b8 00e4 b600 e8ba 00eb 0000 4e2d
    0000130: b0                                     

	at java.lang.Class.getDeclaredFields0(Native Method)
	at java.lang.Class.privateGetDeclaredFields(Class.java:2528)
	at java.lang.Class.getDeclaredField(Class.java:2022)
	at jdk.nashorn.internal.codegen.Compiler$2.run(Compiler.java:417)
	at jdk.nashorn.internal.codegen.Compiler$2.run(Compiler.java:413)
	at java.security.AccessController.doPrivileged(Native Method)
	at jdk.nashorn.internal.codegen.Compiler.install(Compiler.java:413)
	at jdk.nashorn.internal.codegen.Compiler.install(Compiler.java:447)
	at jdk.nashorn.internal.runtime.Context.compile(Context.java:891)
	at jdk.nashorn.internal.runtime.Context.compileScript(Context.java:847)
	at jdk.nashorn.internal.runtime.Context.compileScript(Context.java:391)
	at jdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:595)
	at jdk.nashorn.api.scripting.NashornScriptEngine.createNashornGlobal(NashornScriptEngine.java:444)
	at jdk.nashorn.api.scripting.NashornScriptEngine.<init>(NashornScriptEngine.java:181)
	at jdk.nashorn.api.scripting.NashornScriptEngine.<init>(NashornScriptEngine.java:152)
	at jdk.nashorn.api.scripting.NashornScriptEngineFactory.getScriptEngine(NashornScriptEngineFactory.java:141)
	at jdk.nashorn.api.scripting.NashornScriptEngineFactory.getScriptEngine(NashornScriptEngineFactory.java:111)
	at javax.script.ScriptEngineManager.getEngineByName(ScriptEngineManager.java:233)
	at org.netbeans.core.network.proxy.ProxyAutoConfig.evalPAC(ProxyAutoConfig.java:201)
	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)
Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
	at org.openide.util.RequestProcessor.post(RequestProcessor.java:424)
	at org.netbeans.core.network.proxy.ProxyAutoConfig.<init>(ProxyAutoConfig.java:100)
	at org.netbeans.core.network.proxy.ProxyAutoConfig.get(ProxyAutoConfig.java:82)
	at org.netbeans.core.network.proxy.NetworkProxyReloader.reloadNetworkProxy(NetworkProxyReloader.java:107)
	at org.netbeans.core.network.proxy.NbProxySelector.<init>(NbProxySelector.java:80)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:414)
	at java.lang.Class.newInstance(Class.java:432)
	at org.openide.util.lookup.implspi.SharedClassObjectBridge.newInstance(SharedClassObjectBridge.java:64)
	at org.openide.util.lookup.MetaInfServicesLookup$P.getInstance(MetaInfServicesLookup.java:509)
	at org.openide.util.lookup.AbstractLookup.lookup(AbstractLookup.java:422)
	at org.openide.util.lookup.ProxyLookup.lookup(ProxyLookup.java:222)
	at org.netbeans.core.CoreBridgeImpl.doRegisterPropertyEditors(CoreBridgeImpl.java:209)
	at org.netbeans.core.CoreBridgeImpl.registerPropertyEditors(CoreBridgeImpl.java:173)
	at org.netbeans.core.startup.Main.start(Main.java:310)
	at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:123)
[catch] at java.lang.Thread.run(Thread.java:724)
Comment 1 Stanislav Aubrecht 2013-10-03 14:45:07 UTC
Product Version: NetBeans IDE Dev (Build 20131002-81b450a5adc4)
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b51
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b109
System: Mac OS X version 10.8.5 running on x86_64; UTF-8; en_US (nb)
Comment 2 Jiri Rechtacek 2013-10-03 17:35:42 UTC
Is it related to fixing the issue 230257?
Comment 3 Tomas Hurka 2013-10-07 14:06:36 UTC
(In reply to Stanislav Aubrecht from comment #0)
> The IDE throws an exception when running on JDK 1.8 update 51:
According to comment #1, it fails with JDK 8 build 109.
Comment 4 Petr Cyhelsky 2013-10-09 10:57:08 UTC
*** Bug 236933 has been marked as a duplicate of this bug. ***
Comment 5 Petr Cyhelsky 2013-10-09 10:59:37 UTC
The root cause of this issue also causes loss of functionality in profiler.
Comment 6 Tomas Hurka 2013-10-09 11:07:48 UTC
Some of the nashorn classes are loaded from different jar than lib/ext/nashorn.jar

[Loaded jdk.nashorn.internal.runtime.PropertyAccess from jar:file:/tmp/netbeans/ide/modules/ext/nashorn-02f810c26ff9-patched.jar!/]
[Loaded jdk.nashorn.internal.runtime.PropertyListener from jar:file:/tmp/netbeans/ide/modules/ext/nashorn-02f810c26ff9-patched.jar!/]
[Loaded jdk.nashorn.internal.runtime.PropertyListenerManager from jar:file:/tmp/netbeans/ide/modules/ext/nashorn-02f810c26ff9-patched.jar!/]
[Loaded jdk.nashorn.internal.runtime.ScriptObject from jar:file:/tmp/netbeans/ide/modules/ext/nashorn-02f810c26ff9-patched.jar!/]
[Loaded jdk.nashorn.internal.ir.visitor.NodeVisitor from jar:file:/tmp/netbeans/ide/modules/ext/nashorn-02f810c26ff9-patched.jar!/]
[Loaded jdk.nashorn.internal.codegen.Compiler$2 from jar:file:/tmp/netbeans/ide/modules/ext/nashorn-02f810c26ff9-patched.jar!/]
[Loaded jdk.nashorn.internal.codegen.Compiler from jar:file:/tmp/netbeans/ide/modules/ext/nashorn-02f810c26ff9-patched.jar!/]
[Loaded jdk.nashorn.internal.runtime.Context from jar:file:/tmp/netbeans/ide/modules/ext/nashorn-02f810c26ff9-patched.jar!/]
[Loaded jdk.nashorn.api.scripting.NashornScriptEngine from jar:file:/tmp/netbeans/ide/modules/ext/nashorn-02f810c26ff9-patched.jar!/]

This is a regression in JDK caused by JDK-8024619 <https://bugs.openjdk.java.net/browse/JDK-8024619>. JDK8-b107 works fine, JDK8-b108 does not work.
Comment 7 Tomas Hurka 2013-10-09 11:15:34 UTC
Created attachment 140939 [details]
Proposed patch to fix this issue

Proposed patch for JDK, which fixes the issue in NetBeans. The test case from issue JDK-8024619 still works with this patch.
Comment 8 Libor Fischmeistr 2013-11-07 13:07:33 UTC
*** Bug 236305 has been marked as a duplicate of this bug. ***
Comment 9 Antonin Nebuzelsky 2013-11-21 13:32:06 UTC
The JDK bug should be fixed as of b115.

Worth verifying.