java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected end of subtree [select e from de.gedoplan.buch.eedemos.entity.Employee e where e.skills is not empty ]

Hibernate JIRA | Dirk weil | 5 years ago
  1. 0

    The JPQL "select e from Employee e where e.skills is not empty" failes with the exception Exception in thread "main" java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected end of subtree [select e from de.gedoplan.buch.eedemos.entity.Employee e where e.skills is not empty ] at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1334) at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1280) at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:283) at de.gedoplan.buch.eedemos.entity.QueryTester.main(QueryTester.java:19) Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected end of subtree [select e from de.gedoplan.buch.eedemos.entity.Employee e where e.skills is not empty ] at org.hibernate.hql.internal.ast.QuerySyntaxException.convert(QuerySyntaxException.java:53) at org.hibernate.hql.internal.ast.QuerySyntaxException.convert(QuerySyntaxException.java:46) at org.hibernate.hql.internal.ast.ErrorCounter.throwQueryException(ErrorCounter.java:79) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.generate(QueryTranslatorImpl.java:238) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:203) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136) at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:101) at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:80) at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:120) at org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:214) at org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:192) at org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:1538) at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:280) ... 1 more The attribute skills used in the where clause is a simple @ElementCollection List<String>. Attached files are the entity class (Employee.java) and a short main programm for executing JPQL (QueryTester.java).

    Hibernate JIRA | 5 years ago | Dirk weil
    java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected end of subtree [select e from de.gedoplan.buch.eedemos.entity.Employee e where e.skills is not empty ]
  2. 0

    The JPQL "select e from Employee e where e.skills is not empty" failes with the exception Exception in thread "main" java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected end of subtree [select e from de.gedoplan.buch.eedemos.entity.Employee e where e.skills is not empty ] at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1334) at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1280) at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:283) at de.gedoplan.buch.eedemos.entity.QueryTester.main(QueryTester.java:19) Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected end of subtree [select e from de.gedoplan.buch.eedemos.entity.Employee e where e.skills is not empty ] at org.hibernate.hql.internal.ast.QuerySyntaxException.convert(QuerySyntaxException.java:53) at org.hibernate.hql.internal.ast.QuerySyntaxException.convert(QuerySyntaxException.java:46) at org.hibernate.hql.internal.ast.ErrorCounter.throwQueryException(ErrorCounter.java:79) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.generate(QueryTranslatorImpl.java:238) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:203) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136) at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:101) at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:80) at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:120) at org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:214) at org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:192) at org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:1538) at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:280) ... 1 more The attribute skills used in the where clause is a simple @ElementCollection List<String>. Attached files are the entity class (Employee.java) and a short main programm for executing JPQL (QueryTester.java).

    Hibernate JIRA | 5 years ago | Dirk weil
    java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected end of subtree [select e from de.gedoplan.buch.eedemos.entity.Employee e where e.skills is not empty ]
  3. 0

    Exception raised when calling isEmpty/isNotEmpty on an @ElementCollection field

    GitHub | 3 years ago | julien-gonzalez
    java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected end of subtree [select myEntity from fr.openwide.business.model.MyEntity myEntity where myEntity.technologies is empty]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    CAS 4.0 Service Management WebApp Setup Failing

    Stack Overflow | 2 years ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'servicesManager' defined in ServletContext resource [/WEB-INF/spring-configuration/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.jasig.cas.services.DefaultServicesManagerImpl]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: AbstractRegisteredService is not mapped [select r from AbstractRegisteredService r]
  6. 0

    A table not mapped in hibernate

    Stack Overflow | 2 years ago
    org.hibernate.hql.internal.ast.QuerySyntaxException: Enseignants is not mapped [Select coount(p) from Enseignants p ]

  1. MoYapro 1 times, last 2 weeks ago
  2. MoYapro 1 times, last 2 months ago
  3. marcbouvierdav 1 times, last 2 months ago
  4. tfr 1 times, last 4 months ago
  5. davidvanlaatum 1 times, last 5 months ago
30 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.hibernate.hql.internal.ast.QuerySyntaxException

    unexpected end of subtree [select e from de.gedoplan.buch.eedemos.entity.Employee e where e.skills is not empty ]

    at org.hibernate.hql.internal.ast.QuerySyntaxException.convert()
  2. Hibernate
    SessionImpl.createQuery
    1. org.hibernate.hql.internal.ast.QuerySyntaxException.convert(QuerySyntaxException.java:53)
    2. org.hibernate.hql.internal.ast.QuerySyntaxException.convert(QuerySyntaxException.java:46)
    3. org.hibernate.hql.internal.ast.ErrorCounter.throwQueryException(ErrorCounter.java:79)
    4. org.hibernate.hql.internal.ast.QueryTranslatorImpl.generate(QueryTranslatorImpl.java:238)
    5. org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:203)
    6. org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136)
    7. org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:101)
    8. org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
    9. org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:120)
    10. org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:214)
    11. org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:192)
    12. org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:1538)
    12 frames
  3. Hibernate EJB
    AbstractEntityManagerImpl.createQuery
    1. org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:280)
    1 frame
  4. de.gedoplan.buch
    QueryTester.main
    1. de.gedoplan.buch.eedemos.entity.QueryTester.main(QueryTester.java:19)
    1 frame