Skip to content
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

VisualVM Throws Exceptions On Startup (Proxy vs. JavaScript) #548

Closed
jisedlac opened this issue Jan 16, 2024 · 1 comment
Closed

VisualVM Throws Exceptions On Startup (Proxy vs. JavaScript) #548

jisedlac opened this issue Jan 16, 2024 · 1 comment
Assignees
Labels

Comments

@jisedlac
Copy link
Member

Windows 10, VisualVM 2.1.7, fresh installation.

Starting the VisualVM on a network behind a corporate proxy, with a wpad.dat, an exception is reported immediately on startup:

Cannot find secure PAC script engine...

The problem is that a JavaScript engine is needed to process the wpad.dat file. But the engine is only available as a plugin which requires a network access.

The corresponding logfile messages are as follows:

INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy resolver: Windows
INFO [org.netbeans.core.network.proxy.windows.WindowsNetworkProxy]: Windows system proxy resolver: auto - PAC (http://wpad/wpad.dat)
INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy reloading succeeded.
INFO [org.netbeans.ui.metrics.laf]: USG_LOOK_AND_FEEL
WARNING [org.netbeans.core.network.proxy.ProxyAutoConfig]: There was a catastrophic error with the PAC script downloaded from http://wpad/wpad.dat. Will use dummy instead. Error was : 
org.netbeans.core.network.proxy.pac.PacParsingException: Cannot find secure PAC script engine.
Allowed engines: GraalVM:js,Graal.js,Nashorn
Found engines:
Will not resolve proxy configuration.
Brand ALLOWED_PAC_ENGINES key in org.netbeans.core.network.proxy.pac.impl.Bundle to configure.

	at org.netbeans.core.network.proxy.pac.impl.NbPacScriptEvaluator.getScriptEngine(NbPacScriptEvaluator.java:281)
	at org.netbeans.core.network.proxy.pac.impl.NbPacScriptEvaluator.<init>(NbPacScriptEvaluator.java:199)
	at org.netbeans.core.network.proxy.pac.impl.NbPacScriptEvaluatorFactory.createPacScriptEvaluator(NbPacScriptEvaluatorFactory.java:45)
[catch] at org.netbeans.core.network.proxy.ProxyAutoConfig.initEngine(ProxyAutoConfig.java:111)
	at org.netbeans.core.network.proxy.ProxyAutoConfig$1.run(ProxyAutoConfig.java:82)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy - mode: auto
INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy - pac url: http://wpad/wpad.dat
INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy TEST - http host: 
INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy TEST - http port: 0

@thurka
Copy link
Member

thurka commented Jan 27, 2024

Solved by bundling nashorn library with VisualVM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants