This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC 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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
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
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

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: 37936
    
  22
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,
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java.lang.NumberFormatException: For input string:
 
Similar Threads
Iterating a List Using JSTL
Servlet.service() for servlet jsp threw exception
org.hibernate.MappingException: No Dialect mapping for JDBC type: -9
How close am I in getting this program right?
Passing parameter to query from JSP