java.sql.SQLException: Invalid parameter index 2.

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 Hibernate JIRA by Jason Stiefel, 1 year ago
Invalid parameter index 2.
via Hibernate JIRA by Jason Stiefel, 1 year ago
Invalid parameter index 2.
via Oracle Community by 807607, 1 year ago
via jtds by dcurran
, 1 year ago
Invalid parameter index 1. The error is getting throw in JtdsPreparedStatement.getParameter Here is a short stack trace:
via jtds by tullio0106
, 1 year ago
Invalid parameter index 12.
via jtds by icecuber
, 1 year ago
java.sql.SQLException: Invalid parameter index 2.
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.getParameter(JtdsPreparedStatement.java:239)
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.setParameter(JtdsPreparedStatement.java:311)
at net.sf.hibernate.type.BinaryType.set(BinaryType.java:28)
at net.sf.hibernate.type.SerializableType.set(SerializableType.java:28)
at net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:48)
at net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:35)

Users with the same issue

You are the first who have seen this exception.

Write tip

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