java.lang.IllegalStateException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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.
    via by Stephan Fudeus,
  • 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.
    via by Stephan Fudeus,
    • 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)
    No Bugmate found.