Git Product home page Git Product logo

Comments (4)

hyproman avatar hyproman commented on June 14, 2024 2

Same behavior on 10.0.1:

java version "10.0.1" 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)

from jmxterm.

jfharden avatar jfharden commented on June 14, 2024

And in 12, and 14ea:


[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test (default-test) on project jmxterm: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.: NullPointerException -> [Help 1]

...

bash-4.2# java -version
openjdk version "12.0.2" 2019-07-16
OpenJDK Runtime Environment (build 12.0.2+10)
OpenJDK 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)
bash-4.2# java -version
openjdk version "14-ea" 2020-03-17
OpenJDK Runtime Environment (build 14-ea+14-570)
OpenJDK 64-Bit Server VM (build 14-ea+14-570, mixed mode, sharing)

from jmxterm.

SandroGrzicic avatar SandroGrzicic commented on June 14, 2024

After making a local build with upgraded dependencies, setting "source" and "target" of maven-compiler-plugin in the POM to "13", building on AdoptOpenJDK 13 works fine, and running it under the same JDK 13 works and the console can be used, however when trying to "open" (connect to) a process I get the following Unable to detect the run-time image error which I cannot resolve:

Listing available beans...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.cyclopsgroup.jmxterm.utils.WeakCastUtils$2 (file:jmxterm-1.0.1-uber.jar) to method sun.tools.jconsole.LocalVirtualMachine.getAllVirtualMachines()
WARNING: Please consider reporting this to the maintainers of org.cyclopsgroup.jmxterm.utils.WeakCastUtils$2
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
	at com.sun.proxy.$Proxy7.startManagementAgent(Unknown Source)
	at org.cyclopsgroup.jmxterm.jdk6.Jdk6JavaProcess.startManagementAgent(Jdk6JavaProcess.java:39)
	at org.cyclopsgroup.jmxterm.SyntaxUtils.getUrl(SyntaxUtils.java:51)
	at org.cyclopsgroup.jmxterm.boot.CliMain.execute(CliMain.java:127)
	at org.cyclopsgroup.jmxterm.boot.CliMain.main(CliMain.java:41)
Caused by: com.sun.tools.attach.AttachOperationFailedException: java.lang.InternalError: Unable to detect the run-time image
	at jdk.attach/sun.tools.attach.VirtualMachineImpl.execute(VirtualMachineImpl.java:224)
	at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.executeCommand(HotSpotVirtualMachine.java:309)
	at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.executeJCmd(HotSpotVirtualMachine.java:291)
	at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.startLocalManagementAgent(HotSpotVirtualMachine.java:250)
	at jdk.jconsole/sun.tools.jconsole.LocalVirtualMachine.loadManagementAgent(LocalVirtualMachine.java:237)
	at jdk.jconsole/sun.tools.jconsole.LocalVirtualMachine.startManagementAgent(LocalVirtualMachine.java:96)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at org.cyclopsgroup.jmxterm.utils.WeakCastUtils$1.invoke(WeakCastUtils.java:53)
	... 5 more

The error appears to come from here:

https://github.com/AdoptOpenJDK/openjdk-jdk/blob/master/src/java.base/share/classes/jdk/internal/module/SystemModuleFinders.java#L210

However, executing java.lang.module.ModuleFinder.ofSystem() (which calls SystemModuleFinders.ofSystem) in a separate Java program on the same JDK works fine.

Version:

openjdk version "13" 2019-09-17
OpenJDK Runtime Environment AdoptOpenJDK (build 13+33)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 13+33, mixed mode, sharing)

from jmxterm.

nyg avatar nyg commented on June 14, 2024

If you want a quick fix, you can check this StackOverflow question and answers: https://stackoverflow.com/q/75239006.

However, using --add-exports means dropping support for Java 8 (unless jmxterm defines multiple build profiles) and more importantly can't be used with the new release option of javac (the jdk.jconsole module is not part of the public API).

from jmxterm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.