1

I have a problem when I execute a Vaadin 6 application in the Internet Explorer 11.

When I click in any button, a red icon appear and I have this Exception: java.lang.NumberFormatException.

Can someone help me to identify the cause of this problem?

CodeNotFound
  • 22,153
  • 10
  • 68
  • 69
  • java.lang.NumberFormatException: For input string: "26.670000076293945" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:492) at java.lang.Integer.parseInt(Integer.java:527) at com.vaadin.terminal.gwt.client.MouseEventDetails.deSerialize(MouseEventDetails.java:123) – Nourhenne GA Feb 12 '16 at 17:21
  • the code works well with google chrome but I have just this problem when I use Internet Explorer 11 – Nourhenne GA Feb 15 '16 at 07:31

1 Answers1

-1

I don't know if you are making the right question, but, your input string is 26.670000076293945, it has a dot and you are trying to parseInt this number. Well a number with a dot can't be an integer, that's why you get a NumberFormatException.

ChoCho
  • 439
  • 5
  • 13
  • the real problem is that vaadin tries to parse it as integer, internally. Unfortunatelly, the only fix is custom servlet. – Enerccio Aug 03 '16 at 11:24
  • Strange behaviour, have been working with vaadin 4 years, and never saw vaadin internally parsing a String to Integer, under what conditions? Events? Components? In what way can a custom servlet help? – ChoCho Aug 03 '16 at 16:45
  • 2
    com.vaadin.terminal.gwt.client.MouseEventDetails.deSerialize‌​(MouseEventDetails.j‌​ava:123) -> vaadin uses Integer.parseInt() on received double from subpixel mouse position from ie. I had to solve it via runtime patching method with custom method that used correct Double.parseDouble().intValue() via javassist to fix this behavior in Vaadin 6 – Enerccio Jan 04 '18 at 07:46
  • @Enerccio, Can you share how you did that with javassist? I'm running into the same issue. – Mitch1077487 Apr 06 '21 at 20:53
  • If anyone else gets here with an older (unsupported version) of vaadin... Rather than use javassist (since I'm not familar enough with that), I'm solving this by recompiling this vaadin library with the Double.parseDouble() change that Enerccio mentioned and using that rather than the actual dependency. – Mitch1077487 Apr 07 '21 at 19:58