org.postgresql.util.PSQLException

The column index is out of range: 5, number of columns: 4.

Solutions on the web1760

  • The column index is out of range: 5, number of columns: 4.
  • The column index is out of range: 4, number of columns: 3.
  • via Coderanch by John Hughes, 7 months ago
    The column index is out of range: 2, number of columns: 1.
  • Stack trace

    • org.postgresql.util.PSQLException: The column index is out of range: 5, number of columns: 4. at org.postgresql.core.v3.SimpleParameterList.bind(SimpleParameterList.java:68)[postgresql-9.4.1211.jar:9.4.1211] at org.postgresql.core.v3.SimpleParameterList.setNull(SimpleParameterList.java:157)[postgresql-9.4.1211.jar:9.4.1211] at org.postgresql.jdbc.PgPreparedStatement.setNull(PgPreparedStatement.java:287)[postgresql-9.4.1211.jar:9.4.1211] at org.hibernate.type.descriptor.sql.BasicBinder.bind(BasicBinder.java:61)[hibernate-core-5.0.9.Final.jar:5.0.9.Final] at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:257)[hibernate-core-5.0.9.Final.jar:5.0.9.Final] at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:252)[hibernate-core-5.0.9.Final.jar:5.0.9.Final] at org.hibernate.type.ComponentType.nullSafeSet(ComponentType.java:343)[hibernate-core-5.0.9.Final.jar:5.0.9.Final] at org.hibernate.persister.entity.AbstractEntityPersister.dehydrateId(AbstractEntityPersister.java:2636)[hibernate-core-5.0.9.Final.jar:5.0.9.Final] at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2604)[hibernate-core-5.0.9.Final.jar:5.0.9.Final] at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2883)[hibernate-core-5.0.9.Final.jar:5.0.9.Final] at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3386)[hibernate-core-5.0.9.Final.jar:5.0.9.Final] at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:89)[hibernate-core-5.0.9.Final.jar:5.0.9.Final] at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:560)[hibernate-core-5.0.9.Final.jar:5.0.9.Final] at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]

    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

    3 times, 7 months ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago