java.lang.IllegalStateException: DOT node with no left-hand-side!

Hibernate JIRA | Stephan Fudeus | 1 decade ago
  1. 0

    Hi, I discovered a problem in the QuerySplitter, when executing a hql-query with more than two selected Objects. e.g. SELECT Customer, CustomerProperty, CustomerAddress FROM CustomerProperty AS CustomerProperty, Customer AS Customer, CustomerAddress AS CustomerAddress WHERE ( Customer.customerId = 5135 AND Customer.customerId = CustomerProperty.customerId AND Customer.customerId = CustomerAddress.customerId) The QuerySplitter makes some strange assumption about when to substitute class names with persistent implementors. It is explicitly said the following: "make sure we don't pick up a class in the select clause!" But the following hql is generated out of this: SELECT Customer, eg.CustomerProperty, CustomerAddress FROM eg.CustomerProperty AS CustomerProperty, eg.Customer AS Customer, eg.CustomerAddress AS CustomerAddress WHERE (Customer.customerId = 5135 AND Customer.customerId = CustomerProperty.customerId AND Customer.customerId = CustomerAddress.customerId) As you can see, for the selected object in the middle, the name is replaced. This concludes out of some strange assumptions what to to after having parsed a comma. This leads to the following exception: java.lang.IllegalStateException: DOT node with no left-hand-side! at org.hibernate.hql.ast.DotNode.getLhs(DotNode.java:488) at org.hibernate.hql.ast.DotNode.getDataType(DotNode.java:467) at org.hibernate.hql.ast.DotNode.resolveSelectExpression(DotNode.java:533) at org.hibernate.hql.ast.HqlSqlWalker.resolveSelectExpression(HqlSqlWalker.java:471) ... I created a little patch to QuerySplitter which solves this issue and works for me which is based on the assumption never to replace a class in the select clause. Perhaps someone here can comment on this and might consider it useful.

    Hibernate JIRA | 1 decade ago | Stephan Fudeus
    java.lang.IllegalStateException: DOT node with no left-hand-side!
  2. 0

    Hi, I discovered a problem in the QuerySplitter, when executing a hql-query with more than two selected Objects. e.g. SELECT Customer, CustomerProperty, CustomerAddress FROM CustomerProperty AS CustomerProperty, Customer AS Customer, CustomerAddress AS CustomerAddress WHERE ( Customer.customerId = 5135 AND Customer.customerId = CustomerProperty.customerId AND Customer.customerId = CustomerAddress.customerId) The QuerySplitter makes some strange assumption about when to substitute class names with persistent implementors. It is explicitly said the following: "make sure we don't pick up a class in the select clause!" But the following hql is generated out of this: SELECT Customer, eg.CustomerProperty, CustomerAddress FROM eg.CustomerProperty AS CustomerProperty, eg.Customer AS Customer, eg.CustomerAddress AS CustomerAddress WHERE (Customer.customerId = 5135 AND Customer.customerId = CustomerProperty.customerId AND Customer.customerId = CustomerAddress.customerId) As you can see, for the selected object in the middle, the name is replaced. This concludes out of some strange assumptions what to to after having parsed a comma. This leads to the following exception: java.lang.IllegalStateException: DOT node with no left-hand-side! at org.hibernate.hql.ast.DotNode.getLhs(DotNode.java:488) at org.hibernate.hql.ast.DotNode.getDataType(DotNode.java:467) at org.hibernate.hql.ast.DotNode.resolveSelectExpression(DotNode.java:533) at org.hibernate.hql.ast.HqlSqlWalker.resolveSelectExpression(HqlSqlWalker.java:471) ... I created a little patch to QuerySplitter which solves this issue and works for me which is based on the assumption never to replace a class in the select clause. Perhaps someone here can comment on this and might consider it useful.

    Hibernate JIRA | 1 decade ago | Stephan Fudeus
    java.lang.IllegalStateException: DOT node with no left-hand-side!
  3. 0

    Part of composite primary key also a foreign key

    Stack Overflow | 2 years ago | Uros Stankovic
    java.lang.IllegalStateException: DOT node with no left-hand-side!
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Hibernate HQL Join Query DOT node with no left-hand-side

    Stack Overflow | 2 years ago | iCode
    java.lang.IllegalStateException: DOT node with no left-hand-side!
  6. 0

    HQL select error

    Stack Overflow | 3 years ago | Krishna
    java.lang.IllegalStateException: DOT node with no left-hand-side!

    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. java.lang.IllegalStateException

      DOT node with no left-hand-side!

      at org.hibernate.hql.ast.DotNode.getLhs()
    2. Hibernate HQL/JP-QL Parser
      HqlSqlWalker.resolveSelectExpression
      1. org.hibernate.hql.ast.DotNode.getLhs(DotNode.java:488)
      2. org.hibernate.hql.ast.DotNode.getDataType(DotNode.java:467)
      3. org.hibernate.hql.ast.DotNode.resolveSelectExpression(DotNode.java:533)
      4. org.hibernate.hql.ast.HqlSqlWalker.resolveSelectExpression(HqlSqlWalker.java:471)
      4 frames