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

Samebug tips

  1. ,
    Expert tip

    MySQL doesn't support some types of characters (such as emojis) with the utf8 encoding. You need to be on MySQL 5.5+ and force utf8mb4 (everywhere, client and server). You can do this sending the query "SET NAMES utf8mb4". Check this https://goo.gl/3E2qzg

  2. ,

    Make sure you are using InnoDB storage engine and READ-COMMITTED transaction isolation level and increase the database server innodb_lock_wait_timeout variable to about 500.

Solutions on the web

via Coderanch by vinoth vino, 1 year ago
Parameter index out of range (3 > number of parameters, which is 2).
via Stack Overflow by Pedro Bastos
, 2 years ago
via Stack Overflow by DawgVonT
, 1 year ago
Parameter index out of range (2 > number of parameters, which is 0).
via GitHub by GodzillaHua
, 7 months ago
Parameter index out of range (2 > number of parameters, which is 1).
via Stack Overflow by Isaiah
, 2 years ago
Parameter index out of range (10 > number of parameters, which is 9).
via Stack Overflow by spacegeek224
, 1 year ago
Parameter index out of range (1 > number of parameters, which is 0).
java.sql.SQLException: Parameter index out of range (3 > number of parameters, which is 2).	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998)	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:937)	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:872)	at com.mysql.jdbc.PreparedStatement.checkBounds(PreparedStatement.java:3367)	at com.mysql.jdbc.PreparedStatement.setInternal(PreparedStatement.java:3352)	at com.mysql.jdbc.PreparedStatement.setString(PreparedStatement.java:4078)	at demojdbc.MysqlCon.main(MysqlCon.java:21)