hudson.util.IOException2: Failed to read /data/hudson_builds/jobs/Site_Build/workspace/trunk/systemtest/dbsyncupdate /target/surefire-reports/TEST-au.com.east.st.DbsyncUpdateSystemTest.xml

Jenkins JIRA | jchharris | 9 years ago
  1. 0

    The JUnit task has issues reading the JUnit test report from one of my components. The exception is as follows: hudson.util.IOException2: Failed to read /data/hudson_builds/jobs/Site_Build/workspace/trunk/systemtest/dbsyncupdate /target/surefire-reports/TEST-au.com.east.st.DbsyncUpdateSystemTest.xml at hudson.tasks.junit.TestResult.parse(TestResult.java:125) at hudson.tasks.junit.TestResult.parse(TestResult.java:92) at hudson.tasks.junit.TestResult.<init>(TestResult.java:69) at hudson.tasks.junit.JUnitResultArchiver$1.invoke (JUnitResultArchiver.java:67) at hudson.tasks.junit.JUnitResultArchiver$1.invoke (JUnitResultArchiver.java:52) at hudson.FilePath.act(FilePath.java:291) at hudson.tasks.junit.JUnitResultArchiver.perform (JUnitResultArchiver.java:52) at hudson.model.Build$RunnerImpl.performAllBuildStep(Build.java:150) at hudson.model.Build$RunnerImpl.post2(Build.java:137) at hudson.model.AbstractBuild$AbstractRunner.post (AbstractBuild.java:254) at hudson.model.Run.run(Run.java:667) at hudson.model.Build.run(Build.java:102) at hudson.model.ResourceController.execute(ResourceController.java:70) at hudson.model.Executor.run(Executor.java:64) Caused by: java.lang.NumberFormatException: For input string: "2,297.255" at sun.misc.FloatingDecimal.readJavaFormatString (FloatingDecimal.java:1224) at java.lang.Float.parseFloat(Float.java:394) at hudson.tasks.junit.CaseResult.parseTime(CaseResult.java:36) at hudson.tasks.junit.CaseResult.<init>(CaseResult.java:31) at hudson.tasks.junit.SuiteResult.<init>(SuiteResult.java:65) at hudson.tasks.junit.TestResult.parse(TestResult.java:121) ... 13 more Inspecting the offending Junit report I can see the following: <testsuite errors="0" skipped="0" tests="6" time="3,000.262" failures="0" name="au.com.east.st.DbsyncUpdateSystemTest"> and: <testcase time="2,297.255" name="testTCDS009"/> Looking at the code for the parseTime() method in CaseResult it is only using Float.parseFloat(). This doesn't support floats formatted with comma separators. The class should be using the DecimalFormat class to parse the number instead. The same can be said of the CaseResult(SuiteResult parent, Element testCase, String testCaseName) constructor.

    Jenkins JIRA | 9 years ago | jchharris
    hudson.util.IOException2: Failed to read /data/hudson_builds/jobs/Site_Build/workspace/trunk/systemtest/dbsyncupdate /target/surefire-reports/TEST-au.com.east.st.DbsyncUpdateSystemTest.xml
  2. 0

    [JENKINS-1085] NumberFormatException when parsing junit report - Jenkins JIRA

    jenkins-ci.org | 1 month ago
    hudson.util.IOException2: Failed to read /data/hudson_builds/jobs/Site_Build/workspace/trunk/systemtest/dbsyncupdate /target/surefire-reports/TEST-au.com.east.st.DbsyncUpdateSystemTest.xml
  3. 0

    The JUnit task has issues reading the JUnit test report from one of my components. The exception is as follows: hudson.util.IOException2: Failed to read /data/hudson_builds/jobs/Site_Build/workspace/trunk/systemtest/dbsyncupdate /target/surefire-reports/TEST-au.com.east.st.DbsyncUpdateSystemTest.xml at hudson.tasks.junit.TestResult.parse(TestResult.java:125) at hudson.tasks.junit.TestResult.parse(TestResult.java:92) at hudson.tasks.junit.TestResult.<init>(TestResult.java:69) at hudson.tasks.junit.JUnitResultArchiver$1.invoke (JUnitResultArchiver.java:67) at hudson.tasks.junit.JUnitResultArchiver$1.invoke (JUnitResultArchiver.java:52) at hudson.FilePath.act(FilePath.java:291) at hudson.tasks.junit.JUnitResultArchiver.perform (JUnitResultArchiver.java:52) at hudson.model.Build$RunnerImpl.performAllBuildStep(Build.java:150) at hudson.model.Build$RunnerImpl.post2(Build.java:137) at hudson.model.AbstractBuild$AbstractRunner.post (AbstractBuild.java:254) at hudson.model.Run.run(Run.java:667) at hudson.model.Build.run(Build.java:102) at hudson.model.ResourceController.execute(ResourceController.java:70) at hudson.model.Executor.run(Executor.java:64) Caused by: java.lang.NumberFormatException: For input string: "2,297.255" at sun.misc.FloatingDecimal.readJavaFormatString (FloatingDecimal.java:1224) at java.lang.Float.parseFloat(Float.java:394) at hudson.tasks.junit.CaseResult.parseTime(CaseResult.java:36) at hudson.tasks.junit.CaseResult.<init>(CaseResult.java:31) at hudson.tasks.junit.SuiteResult.<init>(SuiteResult.java:65) at hudson.tasks.junit.TestResult.parse(TestResult.java:121) ... 13 more Inspecting the offending Junit report I can see the following: <testsuite errors="0" skipped="0" tests="6" time="3,000.262" failures="0" name="au.com.east.st.DbsyncUpdateSystemTest"> and: <testcase time="2,297.255" name="testTCDS009"/> Looking at the code for the parseTime() method in CaseResult it is only using Float.parseFloat(). This doesn't support floats formatted with comma separators. The class should be using the DecimalFormat class to parse the number instead. The same can be said of the CaseResult(SuiteResult parent, Element testCase, String testCaseName) constructor.

    Jenkins JIRA | 9 years ago | jchharris
    au.com.east.st.DbsyncUpdateSystemTest.xml
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Bug 47178 – IDE hangs on server startup

    netbeans.org | 6 months ago
    java.lang.NumberFormatException: For input string: "${default.javac.source}"
  6. 0

    how to set the format mask

    Oracle Community | 7 years ago | 713492
    java.lang.NumberFormatException: For input string: "1,000.00"

  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

    For input string: "2,297.255"

    at sun.misc.FloatingDecimal.readJavaFormatString()
  2. Java RT
    Float.parseFloat
    1. sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)
    2. java.lang.Float.parseFloat(Float.java:394)
    2 frames
  3. Hudson
    Executor.run
    1. hudson.tasks.junit.CaseResult.parseTime(CaseResult.java:36)
    2. hudson.tasks.junit.CaseResult.<init>(CaseResult.java:31)
    3. hudson.tasks.junit.SuiteResult.<init>(SuiteResult.java:65)
    4. hudson.tasks.junit.TestResult.parse(TestResult.java:121)
    5. hudson.tasks.junit.TestResult.parse(TestResult.java:92)
    6. hudson.tasks.junit.TestResult.<init>(TestResult.java:69)
    7. hudson.tasks.junit.JUnitResultArchiver$1.invoke(JUnitResultArchiver.java:67)
    8. hudson.tasks.junit.JUnitResultArchiver$1.invoke(JUnitResultArchiver.java:52)
    9. hudson.FilePath.act(FilePath.java:291)
    10. hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:52)
    11. hudson.model.Build$RunnerImpl.performAllBuildStep(Build.java:150)
    12. hudson.model.Build$RunnerImpl.post2(Build.java:137)
    13. hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:254)
    14. hudson.model.Run.run(Run.java:667)
    15. hudson.model.Build.run(Build.java:102)
    16. hudson.model.ResourceController.execute(ResourceController.java:70)
    17. hudson.model.Executor.run(Executor.java:64)
    17 frames