• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Illegal conversion:

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i enter value (999999999.99) through java.text.DecimalFormat(#.##), but websphere 3.5.4
through exception(Illegal conversion: java.lang.NumberFormatException: 99999999E8 )
while tomcat 4.0 didn't.
any one have idea how to protect this error.
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All I can guess is the JVM you are using with WebShere is being a little more liberal with the internal representation of Decimal values then the JVM for Tomcat. The only thing I can suggest you try is putting the "strictfp" keyword on the class and see if that doesn't help.
 
muhammad kamran
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Trusiak,
thanks, but this also does not work, in replcement i use varchar and store as its into DB.
when i need calculation, first i parse and then calculate on server side.
otherwise i haven't any solution.
any way thanks a lot.
regards,
kamran.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic