File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java. lang. NumberFormatException ?

 
Zhixiong Pan
Ranch Hand
Posts: 239
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
i try to realize multi client.my client fetch data from server using Socket, and server provide multithread to satisfy muliticlien.My first client can successfully get data from server, but clients after the first can not, and the server will paint:

java.lang.NumberFormatException: For input string: "le"
at java.lang.NumberFormatException.forInputString(NumberFormatException.
java:48)
at java.lang.Integer.parseInt(Integer.java:468)
at java.lang.Integer.parseInt(Integer.java:518)
at KKMultiServerThread.getHotel(KKMultiServerThread.java:36)
at KKMultiServerThread.run(KKMultiServerThread.java:75)

Can any one help me ?
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The message seems explicit enough.
In getHotel(), you are trying to convert a String into an int,
but the String is not a number. Its value is actually "le".

Check the getHotel() function.
 
Zhixiong Pan
Ranch Hand
Posts: 239
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Satou,
Thanks for your advice.I finally got the critical mistake and solved it.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic