java.lang.reflect.InvocationTargetException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When we have a failure of test cases due to javaagent failure, Jenkins are ignoring the test result and mark the build status as SUCCESS. Log: {code} ... ... FATAL ERROR in native method: processing of -javaagent failed /bin/sh: line 1: 16902 Aborted /opt/build/jdk/jdk1.6.0_45/jre/bin/java -javaagent:/data/hudson/jobs/foo/workspace/.repository/fixme/jmockit/1.0/jmockit-1.0.jar -jar /tmp/surefirebooter3725770228654412047.jar /tmp/surefire2623483402548392725tmp /tmp/surefire6196487644916225973tmp 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.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323) at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338) Caused by: java.lang.NoSuchMethodError: mockit.internal.RedefinitionEngine.setUpMock(Ljava/lang/Class;)V at mockit.internal.ToolLoader.setUpExternalMock(ToolLoader.java:104) at mockit.internal.ToolLoader.visitEnd(ToolLoader.java:92) at org.objectweb.asm2.ClassReader.accept(ClassReader.java:1147) at org.objectweb.asm2.ClassReader.accept(ClassReader.java:300) at mockit.internal.Startup.loadExternalTool(Startup.java:156) at mockit.internal.Startup.initialize(Startup.java:114) at mockit.internal.Startup.premain(Startup.java:96) ... 6 more FATAL ERROR in native method: processing of -javaagent failed /bin/sh: line 1: 16925 Aborted /opt/build/jdk/jdk1.6.0_45/jre/bin/java -javaagent:/data/hudson/jobs/foo/workspace/.repository/fixme/jmockit/1.0/jmockit-1.0.jar -jar /tmp/surefirebooter4869326884051725104.jar /tmp/surefire9113749607916052890tmp /tmp/surefire4100425927814768287tmp [ERROR] There are test failures. ... ... Finished: SUCCESS {code}
    via by Wisen Tanasa,
  • When we have a failure of test cases due to javaagent failure, Jenkins are ignoring the test result and mark the build status as SUCCESS. Log: {code} ... ... FATAL ERROR in native method: processing of -javaagent failed /bin/sh: line 1: 16902 Aborted /opt/build/jdk/jdk1.6.0_45/jre/bin/java -javaagent:/data/hudson/jobs/foo/workspace/.repository/fixme/jmockit/1.0/jmockit-1.0.jar -jar /tmp/surefirebooter3725770228654412047.jar /tmp/surefire2623483402548392725tmp /tmp/surefire6196487644916225973tmp 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.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323) at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338) Caused by: java.lang.NoSuchMethodError: mockit.internal.RedefinitionEngine.setUpMock(Ljava/lang/Class;)V at mockit.internal.ToolLoader.setUpExternalMock(ToolLoader.java:104) at mockit.internal.ToolLoader.visitEnd(ToolLoader.java:92) at org.objectweb.asm2.ClassReader.accept(ClassReader.java:1147) at org.objectweb.asm2.ClassReader.accept(ClassReader.java:300) at mockit.internal.Startup.loadExternalTool(Startup.java:156) at mockit.internal.Startup.initialize(Startup.java:114) at mockit.internal.Startup.premain(Startup.java:96) ... 6 more FATAL ERROR in native method: processing of -javaagent failed /bin/sh: line 1: 16925 Aborted /opt/build/jdk/jdk1.6.0_45/jre/bin/java -javaagent:/data/hudson/jobs/foo/workspace/.repository/fixme/jmockit/1.0/jmockit-1.0.jar -jar /tmp/surefirebooter4869326884051725104.jar /tmp/surefire9113749607916052890tmp /tmp/surefire4100425927814768287tmp [ERROR] There are test failures. ... ... Finished: SUCCESS {code}
    via by Wisen Tanasa,
    • 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.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323) at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338) Caused by: java.lang.NoSuchMethodError: mockit.internal.RedefinitionEngine.setUpMock(Ljava/lang/Class;)V at mockit.internal.ToolLoader.setUpExternalMock(ToolLoader.java:104) at mockit.internal.ToolLoader.visitEnd(ToolLoader.java:92) at org.objectweb.asm2.ClassReader.accept(ClassReader.java:1147) at org.objectweb.asm2.ClassReader.accept(ClassReader.java:300) at mockit.internal.Startup.loadExternalTool(Startup.java:156) at mockit.internal.Startup.initialize(Startup.java:114) at mockit.internal.Startup.premain(Startup.java:96) ... 6 more
    No Bugmate found.