java.io.IOException: Failed to read \jenkinsworkspace\jobname\artifacts\Testreport\testreport.junit.xml

Jenkins JIRA | Bernhard Berbuir | 7 months ago
  1. 0

    Version 1.11 contains an improvement to get test suite duration from time attribute (Testsuite duration can be retrieved from its time attribute if it exists). The code checks if the time attribute exits (is not null) but it does not handle empty time attributes (time=""). The test execution tool and JUnit report generator which is used by my jobs creates an empty time attribute when all test cases of a test suite are ignored. This causes the following stacktrace when the JUnit plugin tries to parse the test report: Publish JUnit test result report (hudson.tasks.junit.JUnitResultArchiver@1c146e) aborted due to exception java.io.IOException: Failed to read \jenkinsworkspace\jobname\artifacts\Testreport\testreport.junit.xml at hudson.tasks.junit.TestResult.parse(TestResult.java:306) at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:244) at hudson.tasks.junit.TestResult.parse(TestResult.java:175) at hudson.tasks.junit.TestResult.parse(TestResult.java:154) at hudson.tasks.junit.TestResult.<init>(TestResult.java:126) at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:132) at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:107) at hudson.FilePath.act(FilePath.java:990) at hudson.FilePath.act(FilePath.java:968) at hudson.tasks.junit.JUnitParser.parseResult(JUnitParser.java:103) at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:127) at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:148) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) at org.jenkins_ci.plugins.flexible_publish.builder.FailFastBuilder.perform(FailFastBuilder.java:102) at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:110) at org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail.conditionalRun(BuildStepRunner.java:154) at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105) at org.jenkins_ci.plugins.flexible_publish.strategy.FailFastExecutionStrategy.perform(FailFastExecutionStrategy.java:63) at org.jenkins_ci.plugins.flexible_publish.ConditionalPublisher.perform(ConditionalPublisher.java:206) at org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher.perform(FlexiblePublisher.java:124) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668) at hudson.model.Run.execute(Run.java:1763) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: java.lang.NumberFormatException: empty String at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1842) at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122) at java.lang.Float.parseFloat(Float.java:451) at hudson.tasks.junit.SuiteResult.<init>(SuiteResult.java:170) at hudson.tasks.junit.SuiteResult.parseSuite(SuiteResult.java:144) at hudson.tasks.junit.SuiteResult.parseSuite(SuiteResult.java:139) at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:129) at hudson.tasks.junit.TestResult.parse(TestResult.java:301) ... 28 more

    Jenkins JIRA | 7 months ago | Bernhard Berbuir
    java.io.IOException: Failed to read \jenkinsworkspace\jobname\artifacts\Testreport\testreport.junit.xml
  2. 0

    Version 1.11 contains an improvement to get test suite duration from time attribute (Testsuite duration can be retrieved from its time attribute if it exists). The code checks if the time attribute exits (is not null) but it does not handle empty time attributes (time=""). The test execution tool and JUnit report generator which is used by my jobs creates an empty time attribute when all test cases of a test suite are ignored. This causes the following stacktrace when the JUnit plugin tries to parse the test report: Publish JUnit test result report (hudson.tasks.junit.JUnitResultArchiver@1c146e) aborted due to exception java.io.IOException: Failed to read \jenkinsworkspace\jobname\artifacts\Testreport\testreport.junit.xml at hudson.tasks.junit.TestResult.parse(TestResult.java:306) at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:244) at hudson.tasks.junit.TestResult.parse(TestResult.java:175) at hudson.tasks.junit.TestResult.parse(TestResult.java:154) at hudson.tasks.junit.TestResult.<init>(TestResult.java:126) at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:132) at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:107) at hudson.FilePath.act(FilePath.java:990) at hudson.FilePath.act(FilePath.java:968) at hudson.tasks.junit.JUnitParser.parseResult(JUnitParser.java:103) at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:127) at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:148) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) at org.jenkins_ci.plugins.flexible_publish.builder.FailFastBuilder.perform(FailFastBuilder.java:102) at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:110) at org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail.conditionalRun(BuildStepRunner.java:154) at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105) at org.jenkins_ci.plugins.flexible_publish.strategy.FailFastExecutionStrategy.perform(FailFastExecutionStrategy.java:63) at org.jenkins_ci.plugins.flexible_publish.ConditionalPublisher.perform(ConditionalPublisher.java:206) at org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher.perform(FlexiblePublisher.java:124) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668) at hudson.model.Run.execute(Run.java:1763) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: java.lang.NumberFormatException: empty String at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1842) at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122) at java.lang.Float.parseFloat(Float.java:451) at hudson.tasks.junit.SuiteResult.<init>(SuiteResult.java:170) at hudson.tasks.junit.SuiteResult.parseSuite(SuiteResult.java:144) at hudson.tasks.junit.SuiteResult.parseSuite(SuiteResult.java:139) at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:129) at hudson.tasks.junit.TestResult.parse(TestResult.java:301) ... 28 more

    Jenkins JIRA | 7 months ago | Bernhard Berbuir
    java.io.IOException: Failed to read \jenkinsworkspace\jobname\artifacts\Testreport\testreport.junit.xml
  3. 0

    JavaFX -- Button action causing large string of errors

    Stack Overflow | 1 year ago | valentae
    java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Extracting data from file using multiple instances

    Stack Overflow | 9 months ago | TheDerp
    java.lang.NumberFormatException: empty String

  1. paulgureghian 2 times, last 5 months ago
  2. Christopher 1 times, last 7 months ago
  3. tone5992 10 times, last 8 months ago
  4. Larten 1 times, last 8 months ago
6 unregistered visitors
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.NumberFormatException

    empty String

    at sun.misc.FloatingDecimal.readJavaFormatString()
  2. Java RT
    Float.parseFloat
    1. sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1842)
    2. sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
    3. java.lang.Float.parseFloat(Float.java:451)
    3 frames
  3. Hudson
    BuildStepCompatibilityLayer.perform
    1. hudson.tasks.junit.SuiteResult.<init>(SuiteResult.java:170)
    2. hudson.tasks.junit.SuiteResult.parseSuite(SuiteResult.java:144)
    3. hudson.tasks.junit.SuiteResult.parseSuite(SuiteResult.java:139)
    4. hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:129)
    5. hudson.tasks.junit.TestResult.parse(TestResult.java:301)
    6. hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:244)
    7. hudson.tasks.junit.TestResult.parse(TestResult.java:175)
    8. hudson.tasks.junit.TestResult.parse(TestResult.java:154)
    9. hudson.tasks.junit.TestResult.<init>(TestResult.java:126)
    10. hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:132)
    11. hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:107)
    12. hudson.FilePath.act(FilePath.java:990)
    13. hudson.FilePath.act(FilePath.java:968)
    14. hudson.tasks.junit.JUnitParser.parseResult(JUnitParser.java:103)
    15. hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:127)
    16. hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:148)
    17. hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
    17 frames
  4. org.jenkins_ci.plugins
    FlexiblePublisher.perform
    1. org.jenkins_ci.plugins.flexible_publish.builder.FailFastBuilder.perform(FailFastBuilder.java:102)
    2. org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:110)
    3. org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail.conditionalRun(BuildStepRunner.java:154)
    4. org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105)
    5. org.jenkins_ci.plugins.flexible_publish.strategy.FailFastExecutionStrategy.perform(FailFastExecutionStrategy.java:63)
    6. org.jenkins_ci.plugins.flexible_publish.ConditionalPublisher.perform(ConditionalPublisher.java:206)
    7. org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher.perform(FlexiblePublisher.java:124)
    7 frames
  5. Hudson
    Executor.run
    1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
    3. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
    4. hudson.model.Build$BuildExecution.post2(Build.java:185)
    5. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
    6. hudson.model.Run.execute(Run.java:1763)
    7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    8. hudson.model.ResourceController.execute(ResourceController.java:98)
    9. hudson.model.Executor.run(Executor.java:410)
    9 frames