ICEfaces
  1. ICEfaces
  2. ICE-10006

Showcase for ice 3.3 and 4 fails with NumberFormatException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA, 4.0.BETA
    • Fix Version/s: EE-3.3.0.GA_P02, 4.0
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      Tomcat 7, Jdk 1.6, showcase from trunk and showcase from icesoft website
    • Assignee Priority:
      P2
    • Affects:
      Sample App./Tutorial
    • Workaround Description:
      Hide
      In VehicleGenerator double parsing and forrmatting should be changed to valueof.

      Example.
      private double generateMPG()
       {
      return Double.valueOf((3 + randomizer.nextInt(15)) + randomizer.nextDouble());
      }

      private double generateCost()
       {
      return Double.valueOf((2000 + randomizer.nextInt(40000)) + randomizer.nextDouble());
      }
      Show
      In VehicleGenerator double parsing and forrmatting should be changed to valueof. Example. private double generateMPG()  { return Double.valueOf((3 + randomizer.nextInt(15)) + randomizer.nextDouble()); } private double generateCost()  { return Double.valueOf((2000 + randomizer.nextInt(40000)) + randomizer.nextDouble()); }

      Description

      This error occurs on several pages of showcase:

      SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path [/showcase] threw exception [Cant instantiate class:

      org.icefaces.samples.showcase.example.mobi.dataview.DataViewBean.] with root cause
      java.lang.NumberFormatException: For input string: "4,23"
      at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1222)
      at java.lang.Double.parseDouble(Double.java:510)
      at org.icefaces.samples.showcase.example.mobi.dataview.VehicleGenerator.generateMPG(VehicleGenerator.java:177)
      at org.icefaces.samples.showcase.example.mobi.dataview.VehicleGenerator.getRandomCar(VehicleGenerator.java:98)
      at org.icefaces.samples.showcase.example.mobi.dataview.VehicleGenerator.access$000(VehicleGenerator.java:23)
      at org.icefaces.samples.showcase.example.mobi.dataview.VehicleGenerator$1.<init>(VehicleGenerator.java:45)
      at org.icefaces.samples.showcase.example.mobi.dataview.VehicleGenerator.getRandomCars(VehicleGenerator.java:41)
      at org.icefaces.samples.showcase.example.mobi.dataview.DataViewBean$1.<init>(DataViewBean.java:73)
      at org.icefaces.samples.showcase.example.mobi.dataview.DataViewBean.<init>(DataViewBean.java:71)

        Activity

        Hide
        Carmen Cristurean added a comment -

        Verified in IE10, FF28, Chrome34 with IF4 rev 40954/ EE-3.3.0-maintenance branch rev 40953, and no errors have been found.

        Show
        Carmen Cristurean added a comment - Verified in IE10, FF28, Chrome34 with IF4 rev 40954/ EE-3.3.0-maintenance branch rev 40953, and no errors have been found.

          People

          • Assignee:
            Judy Guglielmin
            Reporter:
            Krashan Brahmanjara
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: