Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NumberFormatException

 
mohan kumar r
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
===================================================================
 
Naveen Mishra
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic