aspose file tools*
The moose likes Java in General and the fly likes Illegal conversion: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Illegal conversion: " Watch "Illegal conversion: " New topic
Author

Illegal conversion:

muhammad kamran
Greenhorn

Joined: Jun 18, 2003
Posts: 3
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.
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
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.


I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
muhammad kamran
Greenhorn

Joined: Jun 18, 2003
Posts: 3
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.
 
subject: Illegal conversion: