This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes java.lang.NumberFormatException: For input string: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "java.lang.NumberFormatException: For input string:" Watch "java.lang.NumberFormatException: For input string:" New topic
Author

java.lang.NumberFormatException: For input string:

Caleb Jhay
Greenhorn

Joined: Apr 13, 2011
Posts: 18

Hi,

I dont knw if this is the right forum to ask this queston.

I have this query



This code execute well. I was able to see the size of my result

For some reason I dont see anything on my jsp page it returns me this error



My JSP CODE is this



I ran out of ideas I dont know what to do because I'm new to java/spring and hibernate. Any help is deeply appriciated.

Best Regards,
Paul Clapham
Sheriff

Joined: Oct 14, 2005
Posts: 19728
    
  10

Let's put it this way: the JSP processing is trying to convert the string "DATE_RECEIVED" to an integer for some reason. I don't see why either of the
two code fragments you posted have anything to do with that.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 44041
    
  33
Please avoid long lines; they are difficult to read, particularly in code tags.
You are somehow passing the String "PO_NUMBER" to the constructor of a Number class, or to a method like Integer.parseInt(), Integer.valueOf(), etc. It would appear to be Integer.parseInt().
You will have to go through your code, using the line numbers shown, and work out where it is happening. It is probably not in the code you posted.
Caleb Jhay
Greenhorn

Joined: Apr 13, 2011
Posts: 18

Hi,

THANK YOU FOR REPLYING GUYS

edited the error and put the entire error log.




This code execute well. I was able to see the size of my result

For some reason I dont see anything on my jsp page it returns me this error



My JSP CODE is this




I was confused how come im getting the parse error since I'm not parsing anything?
Initially I was using List result = session.createQuery it works ok. But when I try List result = session.createSQLQuery Im getting this problem.

Best Regards,
 
Have you checked out Aspose?
 
subject: java.lang.NumberFormatException: For input string:
 
It's not a secret anymore!