Jstack gives java.lang.reflect.InvocationTargetException

Yesterday jstack worked fine. Today all of a sudden this gives me the exception below, and I don't know why:

$ sudo -u tomcat6 jstack -J-d64 -m 26385
Attaching to process ID 26385, please wait...
Exception in thread "main" java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at sun.tools.jstack.JStack.runJStackTool(JStack.java:118)
    at sun.tools.jstack.JStack.main(JStack.java:84)
Caused by: sun.jvm.hotspot.runtime.VMVersionMismatchException: Supported versions are 20.1-b02. Target VM is 19.0-b09
    at sun.jvm.hotspot.runtime.VM.checkVMVersion(VM.java:224)
    at sun.jvm.hotspot.runtime.VM.<init>(VM.java:287)
    at sun.jvm.hotspot.runtime.VM.initialize(VM.java:357)
    at sun.jvm.hotspot.bugspot.BugSpotAgent.setupVM(BugSpotAgent.java:594)
    at sun.jvm.hotspot.bugspot.BugSpotAgent.go(BugSpotAgent.java:494)
    at sun.jvm.hotspot.bugspot.BugSpotAgent.attach(BugSpotAgent.java:332)
    at sun.jvm.hotspot.tools.Tool.start(Tool.java:163)
    at sun.jvm.hotspot.tools.JStack.main(JStack.java:86)
    ... 6 more

Does anyone know what causes this? I am running Tomcat6 on a server version of Ubuntu.

+5
source share
1 answer

Nevermind This was a problem with OpenJDK. Replacing it with the original Sun / Oracle JRE and JDKs fixed the problem.

+6
source

All Articles