-
Bug
-
Resolution: Fixed
-
P2
-
9
-
b166
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8179140 | 10 | Robert Field | P2 | Resolved | Fixed | b06 |
Reported by Trisha Gee of JetBrains on Twitter --
https://twitter.com/trisha_gee/status/848993344990703618
Trisha Gee @trisha_gee
I just got a VERY unfriendly error message when trying to add a module to JShell for a JAR that doesn't exist.
------- reproducing here -------
jshell> /env -add-modules nonexistant
| Setting new options and restoring state.
Apr 03, 2017 9:29:10 PM jdk.jshell.execution.FailOverExecutionControlProvider generate
WARNING: FailOverExecutionControlProvider: Failure failover -- 0 = jdi:hostname(127.0.0.1) -- java.lang.InternalError: Failed remote listen: java.util.concurrent.CancellationException @ com.sun.jdi.SocketListen (defaults: timeout=, port=, localAddress=) -- {timeout=timeout=5000, port=port=, localAddress=localAddress=127.0.0.1}
Apr 03, 2017 9:29:10 PM jdk.jshell.execution.FailOverExecutionControlProvider generate
WARNING: FailOverExecutionControlProvider: Failure failover -- 1 = jdi:launch(true) -- java.lang.InternalError: Failed remote launch: java.util.concurrent.ExecutionException: com.sun.jdi.connect.VMStartException: VM initialization failed for: /w/x/dev/build/linux-x86_64-normal-server-release/images/jdk/bin/java --add-modules nonexistant -Xdebug -Xrunjdwp:transport=dt_socket,address=rgfield-fedora:46076,suspend=y jdk.jshell.execution.RemoteExecutionControl 48030 @ com.sun.jdi.CommandLineLaunch (defaults: home=/w/x/dev/build/linux-x86_64-normal-server-release/images/jdk, options=, main=, suspend=true, quote=", vmexec=java) -- {home=home=/w/x/dev/build/linux-x86_64-normal-server-release/images/jdk, options=options=--add-modules nonexistant, main=main=jdk.jshell.execution.RemoteExecutionControl 48030, suspend=suspend=true, quote=quote=", vmexec=vmexec=java}
Apr 03, 2017 9:29:10 PM jdk.jshell.execution.FailOverExecutionControlProvider generate
WARNING: FailOverExecutionControlProvider: Failure failover -- 2 = jdi -- java.lang.InternalError: Failed remote listen: java.util.concurrent.CancellationException @ com.sun.jdi.SocketListen (defaults: timeout=, port=, localAddress=) -- {timeout=timeout=5000, port=port=, localAddress=localAddress=}
Apr 03, 2017 9:29:10 PM jdk.jshell.execution.FailOverExecutionControlProvider generate
SEVERE: FailOverExecutionControlProvider: Terminating, failovers exhausted
Exception in thread "main" java.lang.IllegalStateException: Launching JShell execution engine threw: Failed remote listen: java.util.concurrent.CancellationException @ com.sun.jdi.SocketListen (defaults: timeout=, port=, localAddress=) -- {timeout=timeout=5000, port=port=, localAddress=localAddress=127.0.0.1}
at jdk.jshell/jdk.jshell.JShell.<init>(JShell.java:139)
at jdk.jshell/jdk.jshell.JShell$Builder.build(JShell.java:405)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.resetState(JShellTool.java:1013)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.doReload(JShellTool.java:2633)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.cmdEnv(JShellTool.java:2629)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.lambda$new$42(JShellTool.java:1625)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.processCommand(JShellTool.java:1198)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.run(JShellTool.java:1140)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.start(JShellTool.java:909)
at jdk.jshell/jdk.internal.jshell.tool.JShellToolBuilder.run(JShellToolBuilder.java:239)
at jdk.jshell/jdk.internal.jshell.tool.JShellToolProvider.main(JShellToolProvider.java:119)
Caused by: java.lang.InternalError: Failed remote listen: java.util.concurrent.CancellationException @ com.sun.jdi.SocketListen (defaults: timeout=, port=, localAddress=) -- {timeout=timeout=5000, port=port=, localAddress=localAddress=127.0.0.1}
at jdk.jshell/jdk.jshell.execution.JdiInitiator.reportLaunchFail(JdiInitiator.java:261)
at jdk.jshell/jdk.jshell.execution.JdiInitiator.listenTarget(JdiInitiator.java:176)
at jdk.jshell/jdk.jshell.execution.JdiInitiator.<init>(JdiInitiator.java:109)
at jdk.jshell/jdk.jshell.execution.JdiDefaultExecutionControl.create(JdiDefaultExecutionControl.java:103)
at jdk.jshell/jdk.jshell.execution.JdiExecutionControlProvider.generate(JdiExecutionControlProvider.java:147)
at jdk.jshell/jdk.jshell.spi.ExecutionControl.generate(ExecutionControl.java:179)
at jdk.jshell/jdk.jshell.spi.ExecutionControl.generate(ExecutionControl.java:296)
at jdk.jshell/jdk.jshell.execution.FailOverExecutionControlProvider.generate(FailOverExecutionControlProvider.java:103)
at jdk.jshell/jdk.jshell.spi.ExecutionControl.generate(ExecutionControl.java:179)
at jdk.jshell/jdk.jshell.spi.ExecutionControl.generate(ExecutionControl.java:296)
at jdk.jshell/jdk.jshell.JShell.<init>(JShell.java:136)
... 10 more
Caused by: java.util.concurrent.CancellationException
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:121)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:205)
at jdk.jshell/jdk.jshell.execution.JdiInitiator.timedVirtualMachineCreation(JdiInitiator.java:205)
at jdk.jshell/jdk.jshell.execution.JdiInitiator.listenTarget(JdiInitiator.java:169)
... 19 more
(jshell exits back to OS shell)
https://twitter.com/trisha_gee/status/848993344990703618
Trisha Gee @trisha_gee
I just got a VERY unfriendly error message when trying to add a module to JShell for a JAR that doesn't exist.
------- reproducing here -------
jshell> /env -add-modules nonexistant
| Setting new options and restoring state.
Apr 03, 2017 9:29:10 PM jdk.jshell.execution.FailOverExecutionControlProvider generate
WARNING: FailOverExecutionControlProvider: Failure failover -- 0 = jdi:hostname(127.0.0.1) -- java.lang.InternalError: Failed remote listen: java.util.concurrent.CancellationException @ com.sun.jdi.SocketListen (defaults: timeout=, port=, localAddress=) -- {timeout=timeout=5000, port=port=, localAddress=localAddress=127.0.0.1}
Apr 03, 2017 9:29:10 PM jdk.jshell.execution.FailOverExecutionControlProvider generate
WARNING: FailOverExecutionControlProvider: Failure failover -- 1 = jdi:launch(true) -- java.lang.InternalError: Failed remote launch: java.util.concurrent.ExecutionException: com.sun.jdi.connect.VMStartException: VM initialization failed for: /w/x/dev/build/linux-x86_64-normal-server-release/images/jdk/bin/java --add-modules nonexistant -Xdebug -Xrunjdwp:transport=dt_socket,address=rgfield-fedora:46076,suspend=y jdk.jshell.execution.RemoteExecutionControl 48030 @ com.sun.jdi.CommandLineLaunch (defaults: home=/w/x/dev/build/linux-x86_64-normal-server-release/images/jdk, options=, main=, suspend=true, quote=", vmexec=java) -- {home=home=/w/x/dev/build/linux-x86_64-normal-server-release/images/jdk, options=options=--add-modules nonexistant, main=main=jdk.jshell.execution.RemoteExecutionControl 48030, suspend=suspend=true, quote=quote=", vmexec=vmexec=java}
Apr 03, 2017 9:29:10 PM jdk.jshell.execution.FailOverExecutionControlProvider generate
WARNING: FailOverExecutionControlProvider: Failure failover -- 2 = jdi -- java.lang.InternalError: Failed remote listen: java.util.concurrent.CancellationException @ com.sun.jdi.SocketListen (defaults: timeout=, port=, localAddress=) -- {timeout=timeout=5000, port=port=, localAddress=localAddress=}
Apr 03, 2017 9:29:10 PM jdk.jshell.execution.FailOverExecutionControlProvider generate
SEVERE: FailOverExecutionControlProvider: Terminating, failovers exhausted
Exception in thread "main" java.lang.IllegalStateException: Launching JShell execution engine threw: Failed remote listen: java.util.concurrent.CancellationException @ com.sun.jdi.SocketListen (defaults: timeout=, port=, localAddress=) -- {timeout=timeout=5000, port=port=, localAddress=localAddress=127.0.0.1}
at jdk.jshell/jdk.jshell.JShell.<init>(JShell.java:139)
at jdk.jshell/jdk.jshell.JShell$Builder.build(JShell.java:405)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.resetState(JShellTool.java:1013)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.doReload(JShellTool.java:2633)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.cmdEnv(JShellTool.java:2629)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.lambda$new$42(JShellTool.java:1625)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.processCommand(JShellTool.java:1198)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.run(JShellTool.java:1140)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.start(JShellTool.java:909)
at jdk.jshell/jdk.internal.jshell.tool.JShellToolBuilder.run(JShellToolBuilder.java:239)
at jdk.jshell/jdk.internal.jshell.tool.JShellToolProvider.main(JShellToolProvider.java:119)
Caused by: java.lang.InternalError: Failed remote listen: java.util.concurrent.CancellationException @ com.sun.jdi.SocketListen (defaults: timeout=, port=, localAddress=) -- {timeout=timeout=5000, port=port=, localAddress=localAddress=127.0.0.1}
at jdk.jshell/jdk.jshell.execution.JdiInitiator.reportLaunchFail(JdiInitiator.java:261)
at jdk.jshell/jdk.jshell.execution.JdiInitiator.listenTarget(JdiInitiator.java:176)
at jdk.jshell/jdk.jshell.execution.JdiInitiator.<init>(JdiInitiator.java:109)
at jdk.jshell/jdk.jshell.execution.JdiDefaultExecutionControl.create(JdiDefaultExecutionControl.java:103)
at jdk.jshell/jdk.jshell.execution.JdiExecutionControlProvider.generate(JdiExecutionControlProvider.java:147)
at jdk.jshell/jdk.jshell.spi.ExecutionControl.generate(ExecutionControl.java:179)
at jdk.jshell/jdk.jshell.spi.ExecutionControl.generate(ExecutionControl.java:296)
at jdk.jshell/jdk.jshell.execution.FailOverExecutionControlProvider.generate(FailOverExecutionControlProvider.java:103)
at jdk.jshell/jdk.jshell.spi.ExecutionControl.generate(ExecutionControl.java:179)
at jdk.jshell/jdk.jshell.spi.ExecutionControl.generate(ExecutionControl.java:296)
at jdk.jshell/jdk.jshell.JShell.<init>(JShell.java:136)
... 10 more
Caused by: java.util.concurrent.CancellationException
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:121)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:205)
at jdk.jshell/jdk.jshell.execution.JdiInitiator.timedVirtualMachineCreation(JdiInitiator.java:205)
at jdk.jshell/jdk.jshell.execution.JdiInitiator.listenTarget(JdiInitiator.java:169)
... 19 more
(jshell exits back to OS shell)
- backported by
-
JDK-8179140 jshell tool: crash with ugly message on attempt to add non-existant module path
-
- Resolved
-