wood burning stoves 2.0*
The moose likes JDBC and the fly likes NumberFormatException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "NumberFormatException" Watch "NumberFormatException" New topic
Author

NumberFormatException

mohan kumar r
Ranch Hand

Joined: Jan 19, 2006
Posts: 38
I'm sure this is an easy one for you guys. I'm a newbie. I don't know what's going on. How do I get rid of this error?

I'm trying to update some records of a table. The sql part is ok. I tested it manually.

But when I execute method below I get this error
=========================================================

java.lang.NumberFormatException: For input string: "-~"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.FloatingDecimal.readJavaFormatString(Unknown Source)
at java.lang.Double.valueOf(Unknown Source)
at oracle.sql.NUMBER.toInt(NUMBER.java:369)
at oracle.jdbc.dbaccess.DBConversion.NumberBytesToInt(DBConversion.java:2009)
at oracle.jdbc.driver.OracleStatement.getIntValue(OracleStatement.java:3790)
at oracle.jdbc.driver.OracleResultSetImpl.getInt(OracleResultSetImpl.java:332)
at com.sns.ana.synchronize.PasswordSync.retrieveHQPasswordData(PasswordSync.java:160)
at com.sns.ana.synchronize.BPIReceiver.synchrnoizePassword(BPIReceiver.java:120)
at com.sns.ana.synchronize.SampleSync.main(SampleSync.java:24)
===================================================================


mohan
Naveen Mishra
Ranch Hand

Joined: Nov 20, 2005
Posts: 75
java.lang.NumberFormatException: For input string: "-~"
:
:
:
at com.sns.ana.synchronize.PasswordSync.retrieveHQPasswordData(PasswordSync.java:160)
at com.sns.ana.synchronize.BPIReceiver.synchrnoizePassword(BPIReceiver.java:120)
at com.sns.ana.synchronize.SampleSync.main(SampleSync.java:24)
===========

Only indiactes that you are getting "-~" as input and trying to parse some number.
start tracing ur SampleSync.java:24 ==> BPIReceiver.java:120 ==> PasswordSync.java:160 ....
The reported error is here at PasswordSync.java:160

Just have a close look at ur code.
 
wood burning stoves
 
subject: NumberFormatException