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

UndeclaredThrowableException #68

Open
OrangeDog opened this issue Aug 6, 2019 · 4 comments
Open

UndeclaredThrowableException #68

OrangeDog opened this issue Aug 6, 2019 · 4 comments

Comments

@OrangeDog
Copy link

Tried to connect to a local JVM with 1.0.1, openjdk-8-jdk.

Welcome to JMX terminal. Type "help" for available commands.
$>open 17057
#UndeclaredThrowableException:
$>
@OrangeDog
Copy link
Author

I think the underlying issue is process permissions, but the error message isn't very helpful.

@pushkarajthorat
Copy link

you saved my time

@matschaffer
Copy link

Me too :) I ran with -v verbose which made the problem quite clear: Caused by: java.io.IOException: well-known file /tmp/.java_pid41 is not secure: file should be owned by the current user (which is 0) but is owned by 1000

@ecerulm
Copy link

ecerulm commented May 24, 2024

You can try

java --add-exports jdk.jconsole/sun.tools.jconsole=ALL-UNNAMED -jar jmxterm-1.0.4-uber.jar -v verbose

the -v verbose will give you a complete stacktracer rather than just the exception name like pointed out by @matschaffer.

In my case the the underlying exception was Caused by: java.lang.IllegalAccessException: class org.cyclopsgroup.jmxterm.utils.WeakCastUtils$2 cannot access class sun.tools.jconsole.LocalVirtualMachine (in module jdk.jconsole) because module jdk.jconsole does not export sun.tools.jconsole to unnamed module @7b3e2a8 which is solved by adding the --add-exports jdk.jconsole/sun.tools.jconsole=ALL-UNNAMED to the jvm options (so it must be passed before the -jar flag)

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

No branches or pull requests

4 participants