java.lang.reflect.InvocationTargetException

Jenkins JIRA | Wisen Tanasa | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    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}

    Jenkins JIRA | 2 years ago | Wisen Tanasa
    java.lang.reflect.InvocationTargetException
  2. 0

    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}

    Jenkins JIRA | 2 years ago | Wisen Tanasa
    java.lang.reflect.InvocationTargetException

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      mockit.internal.RedefinitionEngine.setUpMock(Ljava/lang/Class;)V

      at mockit.internal.ToolLoader.setUpExternalMock()
    2. Main
      ToolLoader.visitEnd
      1. mockit.internal.ToolLoader.setUpExternalMock(ToolLoader.java:104)
      2. mockit.internal.ToolLoader.visitEnd(ToolLoader.java:92)
      2 frames
    3. org.objectweb.asm2
      ClassReader.accept
      1. org.objectweb.asm2.ClassReader.accept(ClassReader.java:1147)
      2. org.objectweb.asm2.ClassReader.accept(ClassReader.java:300)
      2 frames
    4. Main
      Startup.premain
      1. mockit.internal.Startup.loadExternalTool(Startup.java:156)
      2. mockit.internal.Startup.initialize(Startup.java:114)
      3. mockit.internal.Startup.premain(Startup.java:96)
      3 frames
    5. Java RT
      InstrumentationImpl.loadClassAndCallPremain
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      5. sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
      6. sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
      6 frames