CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 HTTP 500

Print topic Send  topic

Author Message
gggadepa

Posts: 7
Posted: 05/23/2007, 1:09 AM

Hello,

When I run the 'Add shopping cart' and Vote in the Online book store application, I get this error message. May I ask if somebody can help me fix this problem ?. The rest of the application is working fine.

Regards
Gayatri

HTTP 500
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: For input string: ""
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.NumberFormatException: For input string: ""
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
java.lang.Integer.parseInt(Integer.java:468)
java.lang.Integer.parseInt(Integer.java:497)
org.apache.jsp.BookDetail_jsp.Rating_Show(BookDetail_jsp.java:1219)
org.apache.jsp.BookDetail_jsp._jspService(BookDetail_jsp.java:1419)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.

_________________
Gayatri
View profile  Send private message
matheus

Posts: 386
Posted: 05/23/2007, 4:54 AM

Your error was here:

org.apache.jsp.BookDetail_jsp.Rating_Show(BookDetail_jsp.java:1219)

It will trying convert string "" to Integer:

java.lang.NumberFormatException: For input string: ""
java.lang.Integer.parseInt(Integer.java:497)



_________________
Matheus Trevizan

Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br
View profile  Send private message
gggadepa

Posts: 7
Posted: 05/23/2007, 10:49 AM

May I ask if you can tell me how to solve this problem ?
Regards
Gayatri
_________________
Gayatri
View profile  Send private message
matheus

Posts: 386
Posted: 05/23/2007, 1:02 PM

org.apache.jsp.BookDetail_jsp.Rating_Show(BookDetail_jsp.java:1219)

What is Rating in your page?

Have custom code?

Have some control with Integer value and recover string from database?

May I ask if you cann tell me more information?


_________________
Matheus Trevizan

Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br
View profile  Send private message
gggadepa

Posts: 7
Posted: 05/24/2007, 12:17 AM

Thanks for your reply. I am trying to use the custom code from the application. The errror is in BookDetail.jsp. I think the problem is with the field fldrating. Its a string field and there is a parseint() function being done on this field. I tried converting the variable to integer but it still does not work. I do not know how to give you a copy of the code. If you have an email address, I can mail you the code.

Regards
Gayatri
_________________
Gayatri
View profile  Send private message
matheus

Posts: 386
Posted: 05/24/2007, 4:52 AM

Before convert to int the string field, verify if wasn't null or empty.

Use Codecharge function

  
if (!StringUtils.isEmpty(yourcontrol)){  
    /* your conversion */  
}  

_________________
Matheus Trevizan

Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.