java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via mysql.com by Unknown author, 1 year ago
Parameter index out of range (1 > number of parameters, which is 0).
via mysql.com by Unknown author, 1 year ago
Parameter index out of range (2 > number of parameters, which is 1).
via mysql.com by Unknown author, 1 year ago
Parameter index out of range (2 > number of parameters, which is 1).
via mysql.com by Unknown author, 1 year ago
via mysql.com by Unknown author, 1 year ago
via hibernate.org by Unknown author, 2 years ago
java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).
at com.mysql.jdbc.PreparedStatement.setInternal(PreparedStatement.java:2474)
at com.mysql.jdbc.PreparedStatement.setInternal(PreparedStatement.java:2500)
at com.mysql.jdbc.PreparedStatement.setNull(PreparedStatement.java:2536)
at com.mysql.jdbc.PreparedStatement.setObject(PreparedStatement.java:2685)
at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.setParameters(QueryTagSupport.java:295)
at org.apache.jsp.searchpage_jsp._jspx_meth_sql_query_0(searchpage_jsp.java:232)
at org.apache.jsp.searchpage_jsp._jspService(searchpage_jsp.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at java.lang.Thread.run(Thread.java:595)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.