java.lang.NumberFormatException: For input string: ""


Samebug tips

You try to parse a String that contains non-numeric characters to an int. The string must contain decimal characters only, optionally beginning with a + or - sign.


1 month ago

Java does not handle IPv6 nameservers before 1.8.0_60. Upgrade to the latest JVM.


6 months ago

Solutions on the web

Solution icon of stackoverflow
via Stack Overflow by Shantanu
, 1 year ago
For input string: "string"

Solution icon of web
For input string: ""java.lang.NumberFormatException: For input string: ""

Solution icon of coderanch
via Coderanch by Elinor Chang, 10 months ago
For input string: "0.0000000000null"

Solution icon of coderanch
via Coderanch by Henry Wong, 1 year ago
For input string: ""

Solution icon of coderanch
via Coderanch by Jherald Lacambra, 1 year ago
For input string: " "

Solution icon of coderanch
via Coderanch by Sarah Rainier, 1 year ago
For input string: "jjss"

Solution icon of coderanch
via Coderanch by Matt Riddoch, 1 year ago
For input string: "0.5"

Solution icon of coderanch
via Coderanch by Henry Wong, 1 year ago
For input string: "b"

Solution icon of coderanch
via Coderanch by sachin yadav, 10 months ago
For input string: "<%=Offer.OFFER_ID%>"

Solution icon of coderanch
via Coderanch by Chris Wells, 1 year ago
For input string: "Chris"

Stack trace

java.lang.NumberFormatException: For input string: ""
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
	at java.lang.Integer.parseInt(Integer.java:468)
	at java.lang.Integer.parseInt(Integer.java:497)
	at org.apache.jsp.aascAjaxShipMethodInfo_jsp._jspService(aascAjaxShipMethodInfo_jsp.java:105)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:595)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 3 days ago
Once, 3 weeks ago
5 times, 3 months ago
Samebug visitor profile picture
Unknown user
Once, 8 months ago
Once, 9 months ago
255 more bugmates