ajermakovics / jvm-mon

Console-based JVM monitoring tool
https://ajermakovics.github.io/jvm-mon/
Other
1.48k stars 117 forks source link

IndexOutOfBoundsException: Index: 0, Size: 0 #19

Closed andrejmaya closed 7 years ago

andrejmaya commented 7 years ago

Dear ajermakovics,

I get a "IndexOutOfBoundsException: Index: 0, Size: 0" on running jvm-mon-0.3/bin/jvm-mon.

./jvm-mon-0.3/bin/jvm-mon OpenJDK 64-Bit Server VM warning: You have loaded library /tmp/java-monitoring/jvm-mon-0.3/libj2v8_linux_x86_64.so which might have disabled stack guard. The VM will try to fix the stack guard now. It's highly recommended that you fix the library with 'execstack -c ', or link it with '-z noexecstack'. Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at JvmMon.(JvmMon.java:46) at JvmMon.main(JvmMon.java:27)

My Env

cat /etc/*-release PRETTY_NAME="Debian GNU/Linux 8 (jessie)" NAME="Debian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)" ID=debian

java -version openjdk version "1.8.0_121" OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-1~bpo8+1-b13) OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)

echo $JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64

Could you help?

best regards

andrejmaya commented 7 years ago

I started it as root. That was the issue. When I start it as nonroot user, the tool is working fine.

ajermakovics commented 7 years ago

Thanks for the info! It'll be useful to everyone that runs into the same issue.

The message should have been more user friendly, though