org.hibernate.hql.ParsingException

HQL000002: The query SELECT p FROM PPPoESession p where p.sourceIP=:source_ip and p.login>:logentrytime and p.logout>:logentrytime OR p.logout IS NULL is not valid; Parser error messages: [[statement, statementElement, selectStatement, queryExpression, querySpec, whereClause, logicalExpression, expression, logicalOrExpression, logicalAndExpression, negatedExpression, equalityExpression]: line 1:144 state 0 (decision=51) no viable alt; token=[@51,144:147='NULL',<75>,1:144]].


Solutions on the web5

Solution icon of hibernate
via Hibernate JIRA by Vinod Kumar Devi, 1 year ago
HQL000002: The query SELECT p FROM PPPoESession p where p.sourceIP=:source_ip and p.login>:logentrytime and p.logout>:logentrytime OR p.logout IS NULL is not valid; Parser error messages: [[statement, statementElement, selectStatement

Solution icon of stackoverflow
HQL000002: The query SELECT p FROM PPPoESession p where p.sourceIP=:source_ip and p.login>:logentrytime and p.logout>:logentrytime OR p.logout IS NULL is not valid; Parser error messages: [[statement, statementElement, selectStatement

Solution icon of stackoverflow
HQLLUCN000003: No queries can be applied to property ABC in type com.xxx.model.MyModel since the property is analyzed.

Solution icon of stackoverflow
HQLLUCN000003: No queries can be applied to property normVal in type org.cismef.db.core.object.DatatypeProperty since the property is analyzed.

Stack trace

  • org.hibernate.hql.ParsingException: HQL000002: The query SELECT p FROM PPPoESession p where p.sourceIP=:source_ip and p.login>:logentrytime and p.logout>:logentrytime OR p.logout IS NULL is not valid; Parser error messages: [[statement, statementElement, selectStatement, queryExpression, querySpec, whereClause, logicalExpression, expression, logicalOrExpression, logicalAndExpression, negatedExpression, equalityExpression]: line 1:144 state 0 (decision=51) no viable alt; token=[@51,144:147='NULL',<75>,1:144]]. at org.hibernate.hql.QueryParser.parseQuery(QueryParser.java:70) at org.hibernate.ogm.datastore.mongodb.query.parsing.impl.MongoDBBasedQueryParserService.parseQuery(MongoDBBasedQueryParserService.java:40) at org.hibernate.ogm.query.impl.OgmQueryTranslator.getQuery(OgmQueryTranslator.java:169) at org.hibernate.ogm.query.impl.OgmQueryTranslator.getLoader(OgmQueryTranslator.java:134) at org.hibernate.ogm.query.impl.OgmQueryTranslator.list(OgmQueryTranslator.java:128) at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216) at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1326) at org.hibernate.internal.QueryImpl.list(QueryImpl.java:87) at org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:606) at org.hibernate.jpa.internal.QueryImpl.getResultList(QueryImpl.java:483)

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

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.