org.hibernate.QueryException: JPA-style positional param was not an integral ordinal

516 views
0
0 Comments

I’m trying to execute native MySQL query in hibernate. My native query working in MySQL work bench but getting below error while executing it from my code

java.lang.IllegalArgumentException: org.hibernate.QueryException: JPA-style positional param was not an integral ordinal
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:138)
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181)
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188)
at org.hibernate.internal.AbstractSharedSessionContract.getNativeQueryImplementor(AbstractSharedSessionContract.java:1098)
at org.hibernate.internal.AbstractSharedSessionContract.createNativeQuery(AbstractSharedSessionContract.java:1017)
at org.hibernate.internal.AbstractSharedSessionContract.createNativeQuery(AbstractSharedSessionContract.java:1027)
at org.hibernate.internal.AbstractSessionImpl.createNativeQuery(AbstractSessionImpl.java:23)

Answered question
0

Post your sql query, without SQL query unable to answer this question.

My guess is you may miss the space or comma between your column names or SQL keywords while forming sql from from, or there may be any typo in your query check your query created by hibernate from log.

Answered question