java.lang.NumberFormatException: For input string: ""

Jenkins JIRA | Iain macLeish | 5 years ago
  1. 0

    xUnit crashes with the following exception: [xUnit] [INFO] - Starting to record. [xUnit] [INFO] - Processing CppUnit-1.12.1 (default) [xUnit] [INFO] - [CppUnit-1.12.1 (default)] - 1 test report file(s) were found with the pattern '**/src/associates/bnS3/Debug/result.xml' relative to 'C:\Jenkins\jobs\S3 Test\workspace' for the testing framework 'CppUnit-1.12.1 (default)'. [xUnit] [INFO] - Check 'Failed Tests' threshold. ERROR: Publisher org.jenkinsci.plugins.xunit.XUnitPublisher aborted due to exception java.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at org.jenkinsci.plugins.xunit.threshold.XUnitThreshold.convertToInteger(XUnitThreshold.java:134) at org.jenkinsci.plugins.xunit.threshold.XUnitThreshold.getResultThresholdNumber(XUnitThreshold.java:80) at org.jenkinsci.plugins.xunit.threshold.FailedThreshold.getResultThresholdNumber(FailedThreshold.java:34) at org.jenkinsci.plugins.xunit.XUnitPublisher.processResultThreshold(XUnitPublisher.java:354) at org.jenkinsci.plugins.xunit.XUnitPublisher.getResultWithThreshold(XUnitPublisher.java:338) at org.jenkinsci.plugins.xunit.XUnitPublisher.getBuildStatus(XUnitPublisher.java:321) at org.jenkinsci.plugins.xunit.XUnitPublisher.performXUnit(XUnitPublisher.java:124) at org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:92) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) at hudson.model.Build$RunnerImpl.post2(Build.java:162) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) at hudson.model.Run.run(Run.java:1435) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238) Finished: FAILURE On line 80 of XUnitThreshold.java the code checks getUnstableNewThreshold() for validity, but then attempts to convert getFailureNewThreshold(), so if the unstable new field was filled in but failure new field was not, it will cause an exception.

    Jenkins JIRA | 5 years ago | Iain macLeish
    java.lang.NumberFormatException: For input string: ""
  2. 0

    xUnit crashes with the following exception: [xUnit] [INFO] - Starting to record. [xUnit] [INFO] - Processing CppUnit-1.12.1 (default) [xUnit] [INFO] - [CppUnit-1.12.1 (default)] - 1 test report file(s) were found with the pattern '**/src/associates/bnS3/Debug/result.xml' relative to 'C:\Jenkins\jobs\S3 Test\workspace' for the testing framework 'CppUnit-1.12.1 (default)'. [xUnit] [INFO] - Check 'Failed Tests' threshold. ERROR: Publisher org.jenkinsci.plugins.xunit.XUnitPublisher aborted due to exception java.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at org.jenkinsci.plugins.xunit.threshold.XUnitThreshold.convertToInteger(XUnitThreshold.java:134) at org.jenkinsci.plugins.xunit.threshold.XUnitThreshold.getResultThresholdNumber(XUnitThreshold.java:80) at org.jenkinsci.plugins.xunit.threshold.FailedThreshold.getResultThresholdNumber(FailedThreshold.java:34) at org.jenkinsci.plugins.xunit.XUnitPublisher.processResultThreshold(XUnitPublisher.java:354) at org.jenkinsci.plugins.xunit.XUnitPublisher.getResultWithThreshold(XUnitPublisher.java:338) at org.jenkinsci.plugins.xunit.XUnitPublisher.getBuildStatus(XUnitPublisher.java:321) at org.jenkinsci.plugins.xunit.XUnitPublisher.performXUnit(XUnitPublisher.java:124) at org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:92) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656) at hudson.model.Build$RunnerImpl.post2(Build.java:162) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625) at hudson.model.Run.run(Run.java:1435) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238) Finished: FAILURE On line 80 of XUnitThreshold.java the code checks getUnstableNewThreshold() for validity, but then attempts to convert getFailureNewThreshold(), so if the unstable new field was filled in but failure new field was not, it will cause an exception.

    Jenkins JIRA | 5 years ago | Iain macLeish
    java.lang.NumberFormatException: For input string: ""
  3. 0

    java : convert string value to int

    Stack Overflow | 5 years ago | lamisse
    java.lang.NumberFormatException: For input string: ""
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Aptana 3 - wont load

    Stack Overflow | 4 years ago | Phil Jackson
    java.lang.NumberFormatException: For input string: ""

  1. Handemelindo 6 times, last 6 days ago
  2. bmacedo 2 times, last 7 days ago
  3. MoYapro 1 times, last 1 week ago
  4. filpgame 4 times, last 3 weeks ago
  5. silex 6 times, last 1 month ago
32 more registered users
63 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: ""

    at java.lang.NumberFormatException.forInputString()
  2. Java RT
    Integer.parseInt
    1. java.lang.NumberFormatException.forInputString(Unknown Source)
    2. java.lang.Integer.parseInt(Unknown Source)
    3. java.lang.Integer.parseInt(Unknown Source)
    3 frames
  3. org.jenkinsci.plugins
    XUnitPublisher.perform
    1. org.jenkinsci.plugins.xunit.threshold.XUnitThreshold.convertToInteger(XUnitThreshold.java:134)
    2. org.jenkinsci.plugins.xunit.threshold.XUnitThreshold.getResultThresholdNumber(XUnitThreshold.java:80)
    3. org.jenkinsci.plugins.xunit.threshold.FailedThreshold.getResultThresholdNumber(FailedThreshold.java:34)
    4. org.jenkinsci.plugins.xunit.XUnitPublisher.processResultThreshold(XUnitPublisher.java:354)
    5. org.jenkinsci.plugins.xunit.XUnitPublisher.getResultWithThreshold(XUnitPublisher.java:338)
    6. org.jenkinsci.plugins.xunit.XUnitPublisher.getBuildStatus(XUnitPublisher.java:321)
    7. org.jenkinsci.plugins.xunit.XUnitPublisher.performXUnit(XUnitPublisher.java:124)
    8. org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:92)
    8 frames
  4. Hudson
    Executor.run
    1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
    2. hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703)
    3. hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678)
    4. hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656)
    5. hudson.model.Build$RunnerImpl.post2(Build.java:162)
    6. hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625)
    7. hudson.model.Run.run(Run.java:1435)
    8. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    9. hudson.model.ResourceController.execute(ResourceController.java:88)
    10. hudson.model.Executor.run(Executor.java:238)
    10 frames