Fixed
Details
Assignee
Nathan XuNathan XuReporter
Andrias SundskarðAndrias SundskarðComponents
Fix versions
Affects versions
Priority
Major
Details
Details
Assignee
Nathan Xu
Nathan XuReporter
Andrias Sundskarð
Andrias SundskarðComponents
Fix versions
Affects versions
Priority
Created September 9, 2020 at 10:11 AM
Updated September 30, 2020 at 5:35 PM
Resolved September 14, 2020 at 7:43 AM
The following query fails with "Could not parse literal [9223372036854775808] as integer"
select count(*) from Table1 where instanceId = '5d060a98-aec3-4fe7-a6e0-e3a55c10623a' and (counter = -9223372036854775808)
“counter” is of type long.
Relevant stacktrace:
Caused by: javax.persistence.PersistenceException: org.hibernate.HibernateException: Could not parse literal [9223372036854775808] as integer
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154)
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181)
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188)
at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:725)
at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:113)
at dk.amc.xkernel.table.XkernelTableInternalHibernate.getRowCount(XkernelTableInternalHibernate.java:466)
... 30 more
Caused by: org.hibernate.HibernateException: Could not parse literal [9223372036854775808] as integer
at org.hibernate.hql.internal.ast.util.LiteralProcessor.determineIntegerRepresentation(LiteralProcessor.java:248)
at org.hibernate.hql.internal.ast.util.LiteralProcessor.processNumeric(LiteralProcessor.java:209)
at org.hibernate.hql.internal.ast.HqlSqlWalker.processNumericLiteral(HqlSqlWalker.java:1223)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.literal(HqlSqlBaseWalker.java:5668)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.constant(HqlSqlBaseWalker.java:3173)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1353)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.arithmeticExpr(HqlSqlBaseWalker.java:3405)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1368)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4771)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:4240)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:2161)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:2089)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:827)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:621)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:325)
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:273)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:276)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:192)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:144)
at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:113)
at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:73)
at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:162)
at org.hibernate.internal.AbstractSharedSessionContract.getQueryPlan(AbstractSharedSessionContract.java:604)
at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:716)
... 32 more
Caused by: java.lang.NumberFormatException: For input string: "9223372036854775808"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Long.parseLong(Long.java:596)
at java.lang.Long.valueOf(Long.java:803)
at org.hibernate.hql.internal.ast.util.LiteralProcessor.determineIntegerRepresentation(LiteralProcessor.java:245)
... 55 more