org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: where near line 1, column 206 [select distinct generatedAlias0 from de.mexchange.packagingdb.entity.Employee as generatedAlias0 where exists (select distinct treat(generatedAlias0 as de.mexchange.packagingdb.entity.EmployeeThird) from where treat(generatedAlias0 as de.mexchange.packagingdb.entity.EmployeeThird).other like :param0)]


Solutions on the web86

Solution icon of stackoverflow
unexpected token: where near line 1, column 206 [select distinct generatedAlias0 from de.mexchange.packagingdb.entity.Employee as generatedAlias0 where exists (select distinct treat(generatedAlias0 as de.mexchange.packagingdb.entity.EmployeeThird) from where treat(generatedAlias0 as de.mexchange.packagingdb.entity.EmployeeThird).other like :param0)]

Solution icon of stackoverflow
unexpected token: [ near line 1, column 29 [select generatedAlias0 from [user] as generatedAlias0]

Solution icon of stackoverflow
unexpected token: part near line 1, column 155 [SELECT NEW com.htd.domain.ShopOrder(po.id, po.po_number, po.due_date, po_part.id, po_part.part_quantity, part.id, part.part_number, part.part_description part.plasma_hrs_per_part

Solution icon of hibernate
via Hibernate JIRA by Emond Papegaaij, 10 months ago
Invalid path: 'generatedAlias1.name' [select treat(generatedAlias0 as org.hibernate.bugs.SmellyCheese) from org.hibernate.bugs.Cheese as generatedAlias0 where generatedAlias1.name=:param0]

Solution icon of hibernate
Invalid path: 'generatedAlias2.name' [select generatedAlias0 from org.hibernate.bugs.entity.Allocation as generatedAlias0 inner join generatedAlias0.resource as generatedAlias1 where generatedAlias2.name=:param0]

Solution icon of hibernate
via Hibernate JIRA by Emond Papegaaij, 1 year ago
Invalid path: 'generatedAlias2.myvalue' [select generatedAlias0 from org.hibernate.bugs.RefEntity as generatedAlias0 inner join generatedAlias0.other as generatedAlias1 where generatedAlias2.myvalue=42]

Solution icon of hibernate
via Hibernate JIRA by Emond Papegaaij, 1 year ago
Invalid path: 'generatedAlias2.myvalue' [select generatedAlias0 from org.hibernate.bugs.RefEntity as generatedAlias0 inner join generatedAlias0.other as generatedAlias1 where generatedAlias2.myvalue=42]

Solution icon of hibernate
via Hibernate JIRA by Etienne Miret, 1 year ago
unexpected token: ( near line 1, column 114 [select pet from org.hibernate.test.hql.Animal pet, org.hibernate.test.hql.Animal owner where pet member of treat (owner as Human).pets]

Solution icon of hibernate
via Hibernate JIRA by Etienne Miret, 1 year ago
unexpected token: ( near line 1, column 114 [select pet from org.hibernate.test.hql.Animal pet, org.hibernate.test.hql.Animal owner where pet member of treat (owner as Human).pets]

Solution icon of hibernate
via Hibernate JIRA by Etienne Miret, 1 year ago
expecting "as", found '(' near line 1, column 58 [from org.hibernate.test.hql.Animal h where treat ( treat ( h as Human ).father as Human ).pets is empty]

Stack trace

org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: where near line 1, column 206 [select distinct generatedAlias0 from de.mexchange.packagingdb.entity.Employee as generatedAlias0 where exists (select distinct treat(generatedAlias0 as de.mexchange.packagingdb.entity.EmployeeThird) from  where treat(generatedAlias0 as de.mexchange.packagingdb.entity.EmployeeThird).other like :param0)]
	at org.hibernate.hql.internal.ast.QuerySyntaxException.convert(QuerySyntaxException.java:91)
	at org.hibernate.hql.internal.ast.ErrorCounter.throwQueryException(ErrorCounter.java:109)
	at org.hibernate.hql.internal.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:304)
	at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:203)
	at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:158)
	at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:131)
	at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:93)
	at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:167)
	at org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:301)
	at org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:236)
	at org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:1836)
	at org.hibernate.jpa.spi.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:568)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

11 times, 2 months ago
16 times, 3 months ago
Samebug visitor profile picture
Unknown user
Once, 8 months ago
Once, 9 months ago
2 times, 10 months ago
39 more bugmates