jbosstools / jbosstools-quarkus

Quarkus tooling for Eclipse
https://tools.jboss.org
Apache License 2.0
16 stars 20 forks source link

An internal error occurred during: "Execute Debug Command". #152

Closed CptMauli closed 2 years ago

CptMauli commented 2 years ago

I have the lastest Eclipse (2021-09) and the current development version of the quarkus tools (1.4.0.v20210616-2037).

I can start the quarkus application (in debug mode), but its not possible to stop it:

java.lang.reflect.InaccessibleObjectException: Unable to make field private final long java.lang.ProcessImpl.handle accessible: module java.base does not "opens java.lang" to unnamed module @6e9e98b1
    at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
    at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
    at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:177)
    at java.base/java.lang.reflect.Field.setAccessible(Field.java:171)
    at org.jboss.tools.quarkus.core.launch.RuntimeProcessWithJVMAttach.preTerminate(RuntimeProcessWithJVMAttach.java:73)
    at org.jboss.tools.quarkus.core.launch.RuntimeProcessWithJVMAttach.terminate(RuntimeProcessWithJVMAttach.java:56)
    at org.eclipse.debug.internal.core.commands.TerminateCommand.execute(TerminateCommand.java:35)
    at org.eclipse.debug.internal.core.commands.ForEachCommand.doExecute(ForEachCommand.java:36)
    at org.eclipse.debug.core.commands.AbstractDebugCommand$1.run(AbstractDebugCommand.java:215)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

grafik

The Eclipse instance is running on the supplied JRE, and this is also the JRE which is used for the start.

If I change the vm in the eclipse.ini (to zulu 11 in my case) it works fine.

So I think there are two things:

1) the bug itself 2) the launcher should have an option to configre the JRE with which it should be run (just like most other launchers)

jeffmaury commented 2 years ago

You are using Eclipse with a Java 16 VM which is not supported. Java 11 is the supported configuration. Or add the permit flag in eclipse.ini

CptMauli commented 2 years ago

I'm not sure what you mean? That Eclipse on Java 16 is not supported, or that Quarkus on Java 16 is not supported, or that running the Quarkus tools on Java 16 is not supported?

The eclipse is coming with that JRE included, I think it is unreasonable to expect, that a normal user would change that. And as I said, if I change the default JRE in the preferences to Java 11, that error still occurs.

jeffmaury commented 2 years ago

No Quarkus Tools will target Java 16/17 support for next release. We just discovered that Java 16 was packaged with Eclipse. In the meantime, you need to add --illegal-access=permit in eclipse.ini