Arne Theß (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiOTQ4MTcyZTg2...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-15661?atlOrigin=eyJpIjoiOTQ4MT...
) HHH-15661 (
https://hibernate.atlassian.net/browse/HHH-15661?atlOrigin=eyJpIjoiOTQ4MT...
) ClassCastException in Select (
https://hibernate.atlassian.net/browse/HHH-15661?atlOrigin=eyJpIjoiOTQ4MT...
)
Change By: Arne Theß (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3...
)
We’re getting the following stack trace.
{{Caused by: java.lang.ClassCastException: class org.hibernate.type.CustomType cannot be
cast to class org.hibernate.metamodel.mapping.EntityValuedModelPart
(org.hibernate.type.CustomType and org.hibernate.metamodel.mapping.EntityValuedModelPart
are in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader
@1162410a)}}
{{ at
org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitTableGroup(BaseSqmToSqlAstConverter.java:3481)}}
{{ at
org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitQualifiedAttributeJoin(BaseSqmToSqlAstConverter.java:3416)}}
{{ at
org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitQualifiedAttributeJoin(BaseSqmToSqlAstConverter.java:416)}}
{{ at
org.hibernate.query.sqm.tree.domain.AbstractSqmAttributeJoin.accept(AbstractSqmAttributeJoin.java:131)}}
{{ at
org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitWithInferredType(BaseSqmToSqlAstConverter.java:6182)}}
{{ at
org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitIsNullPredicate(BaseSqmToSqlAstConverter.java:6686)}}
{{ at
org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitIsNullPredicate(BaseSqmToSqlAstConverter.java:416)}}
{{ at
org.hibernate.query.sqm.tree.predicate.SqmNullnessPredicate.accept(SqmNullnessPredicate.java:53)}}
{{ at
org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitJunctionPredicate(BaseSqmToSqlAstConverter.java:6333)}}
{{ at
org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitJunctionPredicate(BaseSqmToSqlAstConverter.java:416)}}
{{ at
org.hibernate.query.sqm.tree.predicate.SqmJunctionPredicate.accept(SqmJunctionPredicate.java:74)}}
{{ at
org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitWhereClause(BaseSqmToSqlAstConverter.java:2252)}}
{{ at
org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitQuerySpec(BaseSqmToSqlAstConverter.java:1823)}}
{{ at
org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitQuerySpec(BaseSqmToSqlAstConverter.java:416)}}
{{ at org.hibernate.query.sqm.tree.select.SqmQuerySpec.accept(SqmQuerySpec.java:122)}}
{{ at
org.hibernate.query.sqm.spi.BaseSemanticQueryWalker.visitQueryPart(BaseSemanticQueryWalker.java:213)}}
{{ at
org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitQueryPart(BaseSqmToSqlAstConverter.java:1679)}}
{{ at
org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitSelectStatement(BaseSqmToSqlAstConverter.java:1477)}}
{{ at
org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitSelectStatement(BaseSqmToSqlAstConverter.java:416)}}
{{ at
org.hibernate.query.sqm.tree.select.SqmSelectStatement.accept(SqmSelectStatement.java:199)}}
{{ at
org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.translate(BaseSqmToSqlAstConverter.java:711)}}
{{ at
org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan.buildCacheableSqmInterpretation(ConcreteSqmSelectQueryPlan.java:350)}}
{{ at
org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan.withCacheableSqmInterpretation(ConcreteSqmSelectQueryPlan.java:270)}}
{{ at
org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan.performList(ConcreteSqmSelectQueryPlan.java:246)}}
{{ at org.hibernate.query.sqm.internal.QuerySqmImpl.doList(QuerySqmImpl.java:546)}}
{{ at
org.hibernate.query.spi.AbstractSelectionQuery.list(AbstractSelectionQuery.java:363)}}
{{ at org.hibernate.query.sqm.internal.QuerySqmImpl.list(QuerySqmImpl.java:1032)}}
{{ at org.hibernate.query.Query.getResultList(Query.java:94)}}
The select worked fine in 6.1.1, but since upgrading to 6.1.5, we’re getting the class
cast exception instead. I’m not quite sure, why. Similar selects are still working fine.
Therefore I also don’t know how to construct a helpful test case.
(
https://hibernate.atlassian.net/browse/HHH-15661#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15661#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100210- sha1:a51bb46 )