org.hibernate.QueryParameterException: Position beyond number of declared ordinal p arameters. Remember that ordinal parameters are 1-based! Position: 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

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Stack Overflow by Timo
, 9 months ago
Position beyond number of declared ordinal p arameters. Remember that ordinal parameters are 1-based! Position: 2]]
org.hibernate.QueryParameterException: Position beyond number of declared ordinal p arameters. Remember that ordinal parameters are 1-based! Position: 2]]
at org.hibernate.engine.query.spi.ParameterMetadata.getOrdinalParameterDescriptor(ParameterMetadata.java:80)
at org.hibernate.engine.query.spi.ParameterMetadata.getOrdinalParameterExpectedType(ParameterMetadata.java:86)
at org.hibernate.internal.AbstractQueryImpl.determineType(AbstractQueryImpl.java:450)
at org.hibernate.ejb.QueryImpl.setParameter(QueryImpl.java:445)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

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