aditya zagade (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMGM0YjMxMTJm...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-17060?atlOrigin=eyJpIjoiMGM0Yj...
) HHH-17060 (
https://hibernate.atlassian.net/browse/HHH-17060?atlOrigin=eyJpIjoiMGM0Yj...
) QuerySyntaxException: Unexpected Exception thrown when JOIN used for Entities who's
Fully Qualified Domain Name starts with 'in' (
https://hibernate.atlassian.net/browse/HHH-17060?atlOrigin=eyJpIjoiMGM0Yj...
)
Change By: aditya zagade (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3...
)
{noformat} @Query Aug 09, 2023 7:09:23 PM org.hibernate.hql.internal.ast.ErrorTracker
reportError
ERROR: line 1:67: unexpected token: in
Aug 09, 2023 7:09:23 PM org.hibernate.hql.internal.ast.ErrorTracker reportError
ERROR: line 1:67: unexpected token: in
line 1:67: unexpected token: in
at org.hibernate.hql.internal.antlr.HqlBaseParser.fromJoin ( """
HqlBaseParser.java:1796)
select address from AddressEntity address inner JOIN VendorEntity vendor where
address at org. workspaceId =
hibernate.hql.internal.antlr.HqlBaseParser.fromClause(HqlBaseParser.java : workspaceId
and
address 1485)
at org. partyId= hibernate.hql.internal.antlr.HqlBaseParser.selectFrom(HqlBaseParser.java
: partyId and
address 1171)
at org. partyType= hibernate.hql.internal.antlr.HqlBaseParser.queryRule(HqlBaseParser.java
: partyType and
address 825)
at org. partyId=vendor hibernate. id and
address hql. status in internal.antlr.HqlBaseParser.selectStatement ( HqlBaseParser.java :
statuses 336 ) and
vendor
at org. status = hibernate.hql.internal.antlr.HqlBaseParser.statement(HqlBaseParser.java :
vendorStatus 200)
""" at
org.hibernate.hql.internal.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:294 )
List<AddressEntity> getCheckVendorAddresses at
org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile (
QueryTranslatorImpl.java:189)
@NonNull @Param at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile (
"partyId" QueryTranslatorImpl.java:144 ) String partyId,
@NonNull @Param at org.hibernate.engine.query.spi.HQLQueryPlan.<init> (
"partyType" HQLQueryPlan.java:113 ) PartyType partyType,
@NonNull @Param at org.hibernate.engine.query.spi.HQLQueryPlan.<init> (
"addressScopeType" HQLQueryPlan.java:73 ) AddressScopeType addressScopeType,
@NonNull @Param at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan (
"workspaceId" QueryPlanCache.java:162 ) String workspaceId,
@NonNull @Param at org.hibernate.internal.AbstractSharedSessionContract.getQueryPlan (
"vendorStatus" AbstractSharedSessionContract.java:636 ) Status vendorStatus,
@NonNull @Param at org.hibernate.internal.AbstractSharedSessionContract.createQuery (
"statuses" AbstractSharedSessionContract.java:748 ) List<AddressStatus>
statuses
at org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:23 )
;{noformat}
at Main.test(Main.java:25)
Spring+JPA Used, However, this is not a spring JPA issue at Main. It throws following
exception when JPA Query is validated main(Main. java:20)
{noformat}Caused by Exception in thread "main"
java.lang.IllegalArgumentException : org.hibernate.hql.internal.ast.QuerySyntaxException:
unexpected token: in near line 1, column 72 67 [ select address from in SELECT b. abcdef
authorId, b. model id, b. AddressEntity address inner JOIN title FROM in. abcdef entity.
vendor Book b INNER JOIN in.entity. VendorEntity vendor where
address Author a ON b. workspaceId authorId = a.id
]
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java :
workspaceId and 138)
address at org. addressScopeType=
hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java :
addressScopeType and 181)
address at org. partyId=
hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java : partyId
and 188)
address at org. partyType=
hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java
: partyType and 757)
address at org. partyId=vendor hibernate. id and
internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:23)
address at Main. status in test ( Main.java : statuses 25 ) and
vendor at Main. status = main(Main.java : vendorStatus 20)
Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: in near
line 1, column 67 [SELECT b.authorId, b.id, b.title FROM in.entity.Book b INNER JOIN
in.entity.Author a ON b.authorId = a.id
]
at
org.hibernate.hql.internal.ast.QuerySyntaxException.convert(QuerySyntaxException.java:74)
at org.hibernate.hql.internal.ast.ErrorTracker.throwQueryException(ErrorTracker.java:93)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:301)
at
org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:189)
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:636)
at
org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:748)
... 172 common frames omitted 3 more {noformat}
(
https://hibernate.atlassian.net/browse/HHH-17060#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-17060#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#100234- sha1:90f5128 )