You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I updated our application to use Hibernate ORM 6.4.0.Final and tested a few things in our application. Executing a CTE query like the following leads to an exception. This is of course not our original query, but I cannot post that here.
@NamedQuery(name = "Object.selectAllParentsInfoRecursive",
query = "WITH ParentInfoCte AS(" +
"SELECT p parent, c child, aa.id assignmentId, true directParent, aa.expiryDate expiryDate" +
" FROM ... aa " +
" INNER JOIN aa.parent p" +
" INNER JOIN aa.child c" +
" WHERE c.id = :childId" +
" AND aa.validFrom IS NOT NULL" +
" AND aa.validTo IS NULL " +
"UNION ALL " +
"SELECT p2 parent, c2 child, aa2.id assignmentId, false directParent, NULL expiryDate" +
" FROM ParentInfoCte pi " +
" INNER JOIN ... aa2 on pi.parent = aa2.child " +
" INNER JOIN aa2.parent p2" +
" INNER JOIN aa2.child c2" +
" WHERE aa2.validFrom IS NOT NULL" +
" AND aa2.validTo IS NULL" +
" AND c2 != p2" +
") search breadth first by parent set orderAttr cycle assignmentId set cycleMark " +
" SELECT new ParentInfo(pi.parent, pi.child, pi.directParent, pi.assignmentId, pi.expiryDate) " +
" FROM ParentInfoCte pi")
Caused by: java.lang.AbstractMethodError: Receiver class com.blazebit.persistence.integration.hibernate.base.function.HibernateJpqlFunctionAdapter does not define or inherit an implementation of the resolved method 'abstract void render(org.hibernate.sql.ast.spi.SqlAppender, java.util.List, org.hibernate.query.ReturnableType, org.hibernate.sql.ast.SqlAstTranslator)' of interface org.hibernate.query.sqm.function.FunctionRenderer.
at [email protected]//org.hibernate.query.sqm.function.SelfRenderingFunctionSqlAstExpression.renderToSql(SelfRenderingFunctionSqlAstExpression.java:184)
at [email protected]//org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitSelfRenderingExpression(AbstractSqlAstTranslator.java:6832)
at [email protected]//org.hibernate.sql.ast.tree.expression.SelfRenderingExpression.accept(SelfRenderingExpression.java:20)
at [email protected]//org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.render(AbstractSqlAstTranslator.java:6434)
at [email protected]//org.hibernate.dialect.function.CastingConcatFunction.renderAsString(CastingConcatFunction.java:102)
at [email protected]//org.hibernate.dialect.function.CastingConcatFunction.render(CastingConcatFunction.java:89)
at [email protected]//org.hibernate.query.sqm.function.SelfRenderingFunctionSqlAstExpression.renderToSql(SelfRenderingFunctionSqlAstExpression.java:184)
at [email protected]//org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitSelfRenderingExpression(AbstractSqlAstTranslator.java:6832)
at [email protected]//org.hibernate.sql.ast.tree.expression.SelfRenderingExpression.accept(SelfRenderingExpression.java:20)
at [email protected]//org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitRecursivePath(AbstractSqlAstTranslator.java:2500)
at [email protected]//org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.emulateSearchClauseOrderWithString(AbstractSqlAstTranslator.java:2440)
at [email protected]//org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.renderRecursiveCteVirtualSelections(AbstractSqlAstTranslator.java:2126)
at [email protected]//org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.renderVirtualSelections(AbstractSqlAstTranslator.java:4837)
at [email protected]//org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitSelectClause(AbstractSqlAstTranslator.java:4731)
at [email protected]//org.hibernate.dialect.SQLServerSqlAstTranslator.visitSelectClause(SQLServerSqlAstTranslator.java:287)
at [email protected]//org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitQuerySpec(AbstractSqlAstTranslator.java:3180)
at [email protected]//org.hibernate.dialect.SQLServerSqlAstTranslator.visitQuerySpec(SQLServerSqlAstTranslator.java:277)
at [email protected]//org.hibernate.sql.ast.tree.select.QuerySpec.accept(QuerySpec.java:119)
at [email protected]//org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.renderQueryGroup(AbstractSqlAstTranslator.java:3105)
at [email protected]//org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitQueryGroup(AbstractSqlAstTranslator.java:3025)
at [email protected]//org.hibernate.dialect.SQLServerSqlAstTranslator.visitQueryGroup(SQLServerSqlAstTranslator.java:267)
at [email protected]//org.hibernate.sql.ast.tree.select.QueryGroup.accept(QueryGroup.java:67)
at [email protected]//org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitSelectStatement(AbstractSqlAstTranslator.java:998)
at [email protected]//org.hibernate.sql.ast.tree.select.SelectStatement.accept(SelectStatement.java:68)
at [email protected]//org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitCteDefinition(AbstractSqlAstTranslator.java:1933)
at [email protected]//org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitCteStatement(AbstractSqlAstTranslator.java:1794)
at [email protected]//org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitCteContainer(AbstractSqlAstTranslator.java:1701)
at [email protected]//org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.visitSelectStatement(AbstractSqlAstTranslator.java:997)
at [email protected]//org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.translateSelect(AbstractSqlAstTranslator.java:861)
at [email protected]//org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.translate(AbstractSqlAstTranslator.java:811)
at [email protected]//org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan.buildCacheableSqmInterpretation(ConcreteSqmSelectQueryPlan.java:416)
at [email protected]//org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan.withCacheableSqmInterpretation(ConcreteSqmSelectQueryPlan.java:310)
at [email protected]//org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan.performList(ConcreteSqmSelectQueryPlan.java:286)
at [email protected]//org.hibernate.query.sqm.internal.QuerySqmImpl.doList(QuerySqmImpl.java:509)
at [email protected]//org.hibernate.query.spi.AbstractSelectionQuery.list(AbstractSelectionQuery.java:427)
at [email protected]//org.hibernate.query.Query.getResultList(Query.java:120)
Steps to reproduce
I think the problem is a simple incompatibility, so I did not create a reproducer.
Environment
Version: 1.6.10
JPA-Provider: Hibernate 6.4.0.Final
DBMS: Microsoft SQL Server 2019
Application Server: WildFly 30
The text was updated successfully, but these errors were encountered:
Hi @mkomko.
From the stack trace, I could see that there is a method missing in the HibernateJpqlFunctionAdapter class related to the FunctionRenderer interface. This issue is basically encountered when you have incompatible versions of libraries we are using.
Suggestion:
Please try with other versions of balze-persistence and hibernate. It would work.
@ishwariyabooraja Thank you. I know it works with other versions. This issue exists so Blaze Persistence can be made compatible with the newest Hibernate versions 😉
Description
I updated our application to use Hibernate ORM 6.4.0.Final and tested a few things in our application. Executing a CTE query like the following leads to an exception. This is of course not our original query, but I cannot post that here.
Expected behavior
The query works and returns the desired results
Actual behavior
The following exception occurs:
Steps to reproduce
I think the problem is a simple incompatibility, so I did not create a reproducer.
Environment
Version: 1.6.10
JPA-Provider: Hibernate 6.4.0.Final
DBMS: Microsoft SQL Server 2019
Application Server: WildFly 30
The text was updated successfully, but these errors were encountered: