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

Jenkins JIRA | oliva | 8 years ago
  1. 0

    [JENKINS-2953] NumberFormatException when collecting Crap4J analysis files - Jenkins JIRA

    jenkins-ci.org | 11 months ago
    java.lang.NumberFormatException: For input string: "?"
  2. 0

    Hello Daniel, i am trying to use the crap4j plugin under hudson. i integrated crap4j into our ant script and the output is generated well (report.xml as well as the html report). when i try to run crap4j (v 0.5) under hudson (1.279), we get error messages like: ... BUILD SUCCESSFUL Total time: 17 seconds [CRAP4J] Collecting Crap4J analysis files... FATAL: For input string: "?" java.lang.NumberFormatException: For input string: "?" at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224) at java.lang.Double.parseDouble(Double.java:510) at com.schneide.crap4j.reader.ReportReader.parseStatistics(ReportReader.java:141) at com.schneide.crap4j.reader.ReportReader.parseData(ReportReader.java:130) at hudson.plugins.crap4j.Crap4JPublisher.perform(Crap4JPublisher.java:93) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:33) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:324) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:312) at hudson.model.Build$RunnerImpl.post2(Build.java:132) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:297) at hudson.model.Run.run(Run.java:862) at hudson.model.Build.run(Build.java:88) at hudson.model.ResourceController.execute(ResourceController.java:70) at hudson.model.Executor.run(Executor.java:90) when i tried to find the problem, i diffed the generated report from ant with the report after the crap4j plugin under hudson and i get differences in these lines: 1.) ant: <stats> <name> Method Crap Stats </name> <totalCrap> 60036,00 </totalCrap> <crap> 7,16 </crap> <median> 2,00 </median> <average> 7,16 </average> <stdDev> 36,86 </stdDev> 2.) hudson: <stats> <name> Method Crap Stats </name> <totalCrap> ? </totalCrap> <crap> ? </crap> <median> 2,00 </median> <average> ? </average> <stdDev> ? </stdDev> i think this is the point where the plugin gets the errors. when i copy the report from ant into crap4j output folder for hudson and run an ant build with just the crap4j task again via hudson (without running tests, just do the report), the report is modified with the "?" again. in ant i use crap4j 1.1.6 to generate the report, the report is approx. 5 MBs of size. i'm not sure whether this is a defect in the plugin nor do i know what to do else - maybe you have any ideas ? best greets, oliver

    Jenkins JIRA | 8 years ago | oliva
    java.lang.NumberFormatException: For input string: "?"
  3. 0

    Hello Daniel, i am trying to use the crap4j plugin under hudson. i integrated crap4j into our ant script and the output is generated well (report.xml as well as the html report). when i try to run crap4j (v 0.5) under hudson (1.279), we get error messages like: ... BUILD SUCCESSFUL Total time: 17 seconds [CRAP4J] Collecting Crap4J analysis files... FATAL: For input string: "?" java.lang.NumberFormatException: For input string: "?" at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224) at java.lang.Double.parseDouble(Double.java:510) at com.schneide.crap4j.reader.ReportReader.parseStatistics(ReportReader.java:141) at com.schneide.crap4j.reader.ReportReader.parseData(ReportReader.java:130) at hudson.plugins.crap4j.Crap4JPublisher.perform(Crap4JPublisher.java:93) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:33) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:324) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:312) at hudson.model.Build$RunnerImpl.post2(Build.java:132) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:297) at hudson.model.Run.run(Run.java:862) at hudson.model.Build.run(Build.java:88) at hudson.model.ResourceController.execute(ResourceController.java:70) at hudson.model.Executor.run(Executor.java:90) when i tried to find the problem, i diffed the generated report from ant with the report after the crap4j plugin under hudson and i get differences in these lines: 1.) ant: <stats> <name> Method Crap Stats </name> <totalCrap> 60036,00 </totalCrap> <crap> 7,16 </crap> <median> 2,00 </median> <average> 7,16 </average> <stdDev> 36,86 </stdDev> 2.) hudson: <stats> <name> Method Crap Stats </name> <totalCrap> ? </totalCrap> <crap> ? </crap> <median> 2,00 </median> <average> ? </average> <stdDev> ? </stdDev> i think this is the point where the plugin gets the errors. when i copy the report from ant into crap4j output folder for hudson and run an ant build with just the crap4j task again via hudson (without running tests, just do the report), the report is modified with the "?" again. in ant i use crap4j 1.1.6 to generate the report, the report is approx. 5 MBs of size. i'm not sure whether this is a defect in the plugin nor do i know what to do else - maybe you have any ideas ? best greets, oliver

    Jenkins JIRA | 8 years ago | oliva
    java.lang.NumberFormatException: For input string: "?"
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    New Version: Fatal Error: java.lang.NumberFormatException: For input string: "?"

    Google Groups | 7 years ago | Cat
    java.lang.NumberFormatException: For input string: "?"
  6. 0

    problems with regulation multiplier

    Google Groups | 6 years ago | miquel
    java.lang.NumberFormatException: For input string: "?"

  1. marcbouvierdav 2 times, last 2 months ago
  2. rexgreenza 2 times, last 3 months ago
  3. tyson925 32 times, last 6 months ago
  4. balajivaishnav 14 times, last 9 months ago
  5. Macapon 130 times, last 9 months ago
1 more registered users
12 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 sun.misc.FloatingDecimal.readJavaFormatString()
  2. Java RT
    Double.parseDouble
    1. sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)
    2. java.lang.Double.parseDouble(Double.java:510)
    2 frames
  3. com.schneide.crap4j
    ReportReader.parseData
    1. com.schneide.crap4j.reader.ReportReader.parseStatistics(ReportReader.java:141)
    2. com.schneide.crap4j.reader.ReportReader.parseData(ReportReader.java:130)
    2 frames
  4. hudson.plugins.crap4j
    Crap4JPublisher.perform
    1. hudson.plugins.crap4j.Crap4JPublisher.perform(Crap4JPublisher.java:93)
    1 frame