java.lang.NoSuchMethodError: method <init>(Ljava/lang/Throwable;)V not found

Jenkins JIRA | jpiironen | 6 years ago
  1. 0
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0
  4. 0

    For easier investigation, we reproduced our problem in the following minimal scenario: 1. We create a file main.c (attached to this report): int main() { return 0; } 2. We create a CppCheck report, cppcheck-result.xml, on main.c: cppcheck --xml main.c 2> cppcheck-result.xml Contents of cppcheck-result.xml (attached to this report): <?xml version="1.0" encoding="UTF-8"?> <results> </results> 3. We create a Jenking job for CppCheck. 4. We place cppcheck-result.xml (created in step 2) in the workspace of the Jenkins job. 5. In the Jenkins job configuration page: 5a. We specify no command for the build. 5b. We select "Publish Cppcheck results". 5c. In the box "Cppcheck report XMLs", we enter "**/cppcheck-result.xml". 5d. We leave the CppCheck plugin boxes "Use the workspace as root path to look for reports" and "Ignore blank files" unchecked. 5e. We do not touch the CppCheck plugin's "Advanced..." settings. 5f. We save the Jenkins job configuration. 6. We build manually the Jenking CppCheck job ("Build Now"). The build fails. The console output shows: [Cppcheck] Processing 1 files with the pattern '**/cppcheck-result.xml'. FATAL: method <init>(Ljava/lang/Throwable;)V not found java.lang.NoSuchMethodError: method <init>(Ljava/lang/Throwable;)V not found at org.jenkinsci.plugins.cppcheck.parser.CppcheckParser.parse( at org.jenkinsci.plugins.cppcheck.CppcheckParserResult.invoke( at org.jenkinsci.plugins.cppcheck.CppcheckParserResult.invoke( at hudson.FilePath.act( at hudson.FilePath.act( at org.jenkinsci.plugins.cppcheck.CppcheckPublisher.perform( at hudson.tasks.BuildStepMonitor$3.perform( at hudson.model.AbstractBuild$AbstractRunner.perform( at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps( at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps( at hudson.model.Build$RunnerImpl.post2( at hudson.model.AbstractBuild$ at at at hudson.model.ResourceController.execute( at 7. In the Jenkins job configuration page, we change the contents of the box "Cppcheck report XMLs" so it contains the absolute path to cppcheck-result.xml, and we save the Jenkins job configuration. 8. We build manually the Jenking CppCheck job ("Build Now"). The build fails again. The console output now shows a different error message: [Cppcheck] Starting the cppcheck analysis. [Cppcheck] Parsing throws exceptions. No cppcheck test report file(s) were found with the pattern '/absolute/path/to/cppcheck-result.xml' relative to '/absolute/path/to/workspace'. Did you enter a pattern relative to the correct directory? Did you generate the XML report(s) for Cppcheck? Build step 'Publish Cppcheck results' changed build result to FAILURE Build step 'Publish Cppcheck results' marked build as failure Finished: FAILURE What is wrong? Note that we are using the Cobertura Jenkins plugin (which also reads an XML input file), and it works perfectly. -- dave

    Jenkins JIRA | 5 years ago | Dave Ohlsson
    java.lang.NoSuchMethodError: method <init>(Ljava/lang/Throwable;)V not found

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoSuchMethodError method <init>(Ljava/lang/Throwable;)V not found

      at hudson.plugins.robot.parser.RobotParser.invoke()
    2. hudson.plugins.robot
      1. hudson.plugins.robot.parser.RobotParser.invoke(
      2. hudson.plugins.robot.parser.RobotParser.invoke(
      2 frames
    3. Hudson
      1. hudson.FilePath.act(
      2. hudson.FilePath.act(
      2 frames
    4. hudson.plugins.robot
      1. hudson.plugins.robot.RobotPublisher.perform(
      1 frame
    5. Hudson
      1. hudson.tasks.BuildStepMonitor$1.perform(
      2. hudson.model.AbstractBuild$AbstractRunner.perform(
      3. hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(
      4. hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(
      5. hudson.model.Build$RunnerImpl.post2(
      6. hudson.model.AbstractBuild$
      9. hudson.model.ResourceController.execute(
      10 frames