Issue

Caused by: java.sql.SQLException: Parameter index out of range (0 < 1 ).
     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)<!>

com.mysql.jdbc.PreparedStatement.checkBounds(PreparedStatement.java:3712)
com.mysql.jdbc.PreparedStatement.setInternal(PreparedStatement.java:3701)
com.mysql.jdbc.PreparedStatement.setInternal(PreparedStatement.java:3743)
     at com.mysql.jdbc.PreparedStatement.setDate(PreparedStatement.java:3619)
     at com.mysql.jdbc.PreparedStatement.setDate(PreparedStatement.java:3588)
org.apache.commons.dbcp.DelegatingPreparedStatement.setDate(.Statement.java:141)
org.apache.commons.dbcp.DelegatingPreparedStatement.setDate(.Statement.java:141)
com.infuze.service.linkedin.dao.JobChangeDao.addUser(JobChangeDao.java:75)
com.infuze.service.linkedin.workflow.RegisterUserexecuteProcess(Register…java:76)
     … 10 more


Solution

When you set the values for the parameters in a Prepared Statement make sure that the index is correct. This error happens when you try to set a parameter with an index greater than the number of parameters. Also remember that the index starts with a 0.