java.io.IOException

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.

  • I recently upgraded jenkins and all our plugins and some of our builds are failing. After investigation it turns out that we produce some nunit test xml files that have no test results in (we might have set a test to [Ignore] temporarily for example). These used to work, and now do not. Example xml: <?xml version="1.0" encoding="UTF-8"?><testsuite errors="0" failures="0" name="RES.Coordinate.Calculation.Test.TurkeyTest" skipped="1" tests="1" time=""> <testcase classname="RES.Coordinate.Calculation.Test.TurkeyTest" name="ED1950_to_WGS84(&quot;T1&quot;,556351,4611739,27.67626007d,41.65371627d)"> <skipped message=""/> </testcase> </testsuite> The output is as follows: Recording NUnit tests results ERROR: Step ‘Publish NUnit test result report’ aborted due to exception: java.io.IOException: Failed to read D:\EX00_WS\temporary-junit-reports\TEST-RES.Coordinate.Calculation.Test.TurkeyTest_2.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.plugins.nunit.NUnitPublisher$1.invoke(NUnitPublisher.java:202) at hudson.plugins.nunit.NUnitPublisher$1.invoke(NUnitPublisher.java:191) at hudson.FilePath.act(FilePath.java:990) at hudson.FilePath.act(FilePath.java:968) at hudson.plugins.nunit.NUnitPublisher.getTestResult(NUnitPublisher.java:191) at hudson.plugins.nunit.NUnitPublisher.recordTestResult(NUnitPublisher.java:147) at hudson.plugins.nunit.NUnitPublisher.perform(NUnitPublisher.java:109) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45) 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(Unknown Source) at sun.misc.FloatingDecimal.parseFloat(Unknown Source) at java.lang.Float.parseFloat(Unknown Source) at hudson.tasks.junit.SuiteResult.<init>(SuiteResult.java:170) at hudson.tasks.junit.SuiteResult.parseSuite(SuiteResult.java:144) at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:129) at hudson.tasks.junit.TestResult.parse(TestResult.java:301) ... 20 more Build result "FAILURE". Skipping script. Cheers Cedd
    via by cedd burge,
  • I recently upgraded jenkins and all our plugins and some of our builds are failing. After investigation it turns out that we produce some nunit test xml files that have no test results in (we might have set a test to [Ignore] temporarily for example). These used to work, and now do not. Example xml: <?xml version="1.0" encoding="UTF-8"?><testsuite errors="0" failures="0" name="RES.Coordinate.Calculation.Test.TurkeyTest" skipped="1" tests="1" time=""> <testcase classname="RES.Coordinate.Calculation.Test.TurkeyTest" name="ED1950_to_WGS84(&quot;T1&quot;,556351,4611739,27.67626007d,41.65371627d)"> <skipped message=""/> </testcase> </testsuite> The output is as follows: Recording NUnit tests results ERROR: Step ‘Publish NUnit test result report’ aborted due to exception: java.io.IOException: Failed to read D:\EX00_WS\temporary-junit-reports\TEST-RES.Coordinate.Calculation.Test.TurkeyTest_2.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.plugins.nunit.NUnitPublisher$1.invoke(NUnitPublisher.java:202) at hudson.plugins.nunit.NUnitPublisher$1.invoke(NUnitPublisher.java:191) at hudson.FilePath.act(FilePath.java:990) at hudson.FilePath.act(FilePath.java:968) at hudson.plugins.nunit.NUnitPublisher.getTestResult(NUnitPublisher.java:191) at hudson.plugins.nunit.NUnitPublisher.recordTestResult(NUnitPublisher.java:147) at hudson.plugins.nunit.NUnitPublisher.perform(NUnitPublisher.java:109) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45) 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(Unknown Source) at sun.misc.FloatingDecimal.parseFloat(Unknown Source) at java.lang.Float.parseFloat(Unknown Source) at hudson.tasks.junit.SuiteResult.<init>(SuiteResult.java:170) at hudson.tasks.junit.SuiteResult.parseSuite(SuiteResult.java:144) at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:129) at hudson.tasks.junit.TestResult.parse(TestResult.java:301) ... 20 more Build result "FAILURE". Skipping script. Cheers Cedd
    via by cedd burge,
  • Upgrading the junit-plugin from 1.11 to 1.12 fails with a parse error. I guess this relates to "PR #35" because the *skipped* (Ignore attr.) test result file's "time" attr. is *empty*. While the originator of the file (NUnit) should store a meaningful default (like -"00:00:00"- "0.0"), its up to the consumer to provide robust parsing, either by ignoring the "skipped" tests at all or by ignoring the empty string. // Jenkins log stacktrace \[16:48:06.879\] ERROR: Step ‘Publish NUnit test result report’ aborted due to exception: \[16:48:06.879\] java.io.IOException: Failed to read C:\Jenkins\workspace\Foo\temporary-junit-reports\TEST-Bar.Common.Test.Utils.AccessorTest_13_2.xml \[16:48:06.879\] at hudson.tasks.junit.TestResult.parse(TestResult.java:306) \[16:48:06.879\] at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:244) \[16:48:06.879\] at hudson.tasks.junit.TestResult.parse(TestResult.java:175) \[16:48:06.879\] at hudson.tasks.junit.TestResult.parse(TestResult.java:154) \[16:48:06.879\] at hudson.tasks.junit.TestResult.<init>(TestResult.java:126) \[16:48:06.879\] at hudson.plugins.nunit.NUnitPublisher$1.invoke(NUnitPublisher.java:243) \[16:48:06.879\] at hudson.plugins.nunit.NUnitPublisher$1.invoke(NUnitPublisher.java:226) \[16:48:06.879\] at hudson.FilePath.act(FilePath.java:990) \[16:48:06.879\] at hudson.FilePath.act(FilePath.java:968) \[16:48:06.879\] at hudson.plugins.nunit.NUnitPublisher.getTestResult(NUnitPublisher.java:226) \[16:48:06.879\] at hudson.plugins.nunit.NUnitPublisher.recordTestResult(NUnitPublisher.java:189) \[16:48:06.879\] at hudson.plugins.nunit.NUnitPublisher.perform(NUnitPublisher.java:152) \[16:48:06.879\] at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) \[16:48:06.879\] at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) \[16:48:06.879\] at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723) \[16:48:06.879\] at hudson.model.Build$BuildExecution.post2(Build.java:185) \[16:48:06.879\] at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668) \[16:48:06.879\] at hudson.model.Run.execute(Run.java:1763) \[16:48:06.879\] at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) \[16:48:06.879\] at hudson.model.ResourceController.execute(ResourceController.java:98) \[16:48:06.879\] at hudson.model.Executor.run(Executor.java:410) \[16:48:06.879\] Caused by: java.lang.NumberFormatException: empty String \[16:48:06.879\] at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source) \[16:48:06.879\] at sun.misc.FloatingDecimal.parseFloat(Unknown Source) \[16:48:06.879\] at java.lang.Float.parseFloat(Unknown Source) \[16:48:06.879\] at hudson.tasks.junit.SuiteResult.<init>(SuiteResult.java:170) \[16:48:06.879\] at hudson.tasks.junit.SuiteResult.parseSuite(SuiteResult.java:144) \[16:48:06.879\] at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:129) \[16:48:06.879\] at hudson.tasks.junit.TestResult.parse(TestResult.java:301) \[16:48:06.879\] ... 20 more // UnitTest.result file <?xml version="1.0" encoding="UTF-8"?><testsuite errors="0" failures="0" name="Foo.Common.Test.Utils.AccessorTest" skipped="1" tests="1" time=""> <testcase classname="Foo.Common.Test.Utils.AccessorTest" name="InternalStaticMethod_DirectAccess()"> <skipped message="Assembly containing class to access is not the use case."/> </testcase> </testsuite>
    via by André Fügenschuh,
  • Upgrading the junit-plugin from 1.11 to 1.12 fails with a parse error. I guess this relates to "PR #35" because the *skipped* (Ignore attr.) test result file's "time" attr. is *empty*. While the originator of the file (NUnit) should store a meaningful default (like -"00:00:00"- "0.0"), its up to the consumer to provide robust parsing, either by ignoring the "skipped" tests at all or by ignoring the empty string. // Jenkins log stacktrace \[16:48:06.879\] ERROR: Step ‘Publish NUnit test result report’ aborted due to exception: \[16:48:06.879\] java.io.IOException: Failed to read C:\Jenkins\workspace\Foo\temporary-junit-reports\TEST-Bar.Common.Test.Utils.AccessorTest_13_2.xml \[16:48:06.879\] at hudson.tasks.junit.TestResult.parse(TestResult.java:306) \[16:48:06.879\] at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:244) \[16:48:06.879\] at hudson.tasks.junit.TestResult.parse(TestResult.java:175) \[16:48:06.879\] at hudson.tasks.junit.TestResult.parse(TestResult.java:154) \[16:48:06.879\] at hudson.tasks.junit.TestResult.<init>(TestResult.java:126) \[16:48:06.879\] at hudson.plugins.nunit.NUnitPublisher$1.invoke(NUnitPublisher.java:243) \[16:48:06.879\] at hudson.plugins.nunit.NUnitPublisher$1.invoke(NUnitPublisher.java:226) \[16:48:06.879\] at hudson.FilePath.act(FilePath.java:990) \[16:48:06.879\] at hudson.FilePath.act(FilePath.java:968) \[16:48:06.879\] at hudson.plugins.nunit.NUnitPublisher.getTestResult(NUnitPublisher.java:226) \[16:48:06.879\] at hudson.plugins.nunit.NUnitPublisher.recordTestResult(NUnitPublisher.java:189) \[16:48:06.879\] at hudson.plugins.nunit.NUnitPublisher.perform(NUnitPublisher.java:152) \[16:48:06.879\] at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) \[16:48:06.879\] at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) \[16:48:06.879\] at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723) \[16:48:06.879\] at hudson.model.Build$BuildExecution.post2(Build.java:185) \[16:48:06.879\] at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668) \[16:48:06.879\] at hudson.model.Run.execute(Run.java:1763) \[16:48:06.879\] at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) \[16:48:06.879\] at hudson.model.ResourceController.execute(ResourceController.java:98) \[16:48:06.879\] at hudson.model.Executor.run(Executor.java:410) \[16:48:06.879\] Caused by: java.lang.NumberFormatException: empty String \[16:48:06.879\] at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source) \[16:48:06.879\] at sun.misc.FloatingDecimal.parseFloat(Unknown Source) \[16:48:06.879\] at java.lang.Float.parseFloat(Unknown Source) \[16:48:06.879\] at hudson.tasks.junit.SuiteResult.<init>(SuiteResult.java:170) \[16:48:06.879\] at hudson.tasks.junit.SuiteResult.parseSuite(SuiteResult.java:144) \[16:48:06.879\] at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:129) \[16:48:06.879\] at hudson.tasks.junit.TestResult.parse(TestResult.java:301) \[16:48:06.879\] ... 20 more // UnitTest.result file <?xml version="1.0" encoding="UTF-8"?><testsuite errors="0" failures="0" name="Foo.Common.Test.Utils.AccessorTest" skipped="1" tests="1" time=""> <testcase classname="Foo.Common.Test.Utils.AccessorTest" name="InternalStaticMethod_DirectAccess()"> <skipped message="Assembly containing class to access is not the use case."/> </testcase> </testsuite>
    via by André Fügenschuh,
  • Calculate -x--y in java
    via Stack Overflow by Albin I
    ,
    • java.io.IOException: Failed to read D:\EX00_WS\temporary-junit-reports\TEST-RES.Coordinate.Calculation.Test.TurkeyTest_2.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.plugins.nunit.NUnitPublisher$1.invoke(NUnitPublisher.java:202) at hudson.plugins.nunit.NUnitPublisher$1.invoke(NUnitPublisher.java:191) at hudson.FilePath.act(FilePath.java:990) at hudson.FilePath.act(FilePath.java:968) at hudson.plugins.nunit.NUnitPublisher.getTestResult(NUnitPublisher.java:191) at hudson.plugins.nunit.NUnitPublisher.recordTestResult(NUnitPublisher.java:147) at hudson.plugins.nunit.NUnitPublisher.perform(NUnitPublisher.java:109) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45) 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(Unknown Source) at sun.misc.FloatingDecimal.parseFloat(Unknown Source) at java.lang.Float.parseFloat(Unknown Source) at hudson.tasks.junit.SuiteResult.<init>(SuiteResult.java:170) at hudson.tasks.junit.SuiteResult.parseSuite(SuiteResult.java:144) at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:129) at hudson.tasks.junit.TestResult.parse(TestResult.java:301) ... 20 more

    Users with the same issue

    ChristopherChristopher
    1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    paulgureghianpaulgureghian
    2 times, last one,
    28 more bugmates