net.sf.hibernate.QueryException: path expression ends in a composite value: umssendhis1_.sendEntry [select max(history.id.tryCount) from net.cynet.voice.ums.message.UmsSendHistory history where history.sendEntry = :entryId and history.sendEntry.id.umsId = :umsId]

Hibernate JIRA | Jeon,Jiwon | 1 decade ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    As i know, It is possible to compare object instance in query like below. select max(send.age) from Sender send where send.receiver = ? but I have some exception like below: net.sf.hibernate.QueryException: path expression ends in a composite value: umssendhis1_.sendEntry [select max(history.id.tryCount) from net.cynet.voice.ums.message.UmsSendHistory history where history.sendEntry = :entryId and history.sendEntry.id.umsId = :umsId] at net.sf.hibernate.hql.PathExpressionParser.getWhereColumn(PathExpressionParser.java:375) at net.sf.hibernate.hql.WhereParser.doPathExpression(WhereParser.java:352) at net.sf.hibernate.hql.WhereParser.doToken(WhereParser.java:366) at net.sf.hibernate.hql.WhereParser.token(WhereParser.java:251) at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:87) at net.sf.hibernate.hql.PreprocessingParser.token(PreprocessingParser.java:123) at net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:29) at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:149) at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:138) at net.sf.hibernate.impl.SessionFactoryImpl.getQuery What I know is incorrectly or hibernate's bug? My configrue is below: <hibernate-mapping> <class name="net.cynet.voice.ums.message.UmsSendEntry" table="UMS_SEND_RESULT" dynamic-update="false" dynamic-insert="false" > <composite-id name="id" class="net.cynet.voice.ums.message.UmsSendEntryKey" unsaved-value="none" > <key-property name="umsId" type="long" column="MSG_ID" /> <key-property name="entryId" type="long" column="SEND_ID" /> </composite-id> <property name="msgStatus" type="int" update="true" insert="true" access="property" column="MSG_STATUS" not-null="false" unique="false" /> </hibernate-mapping> <hibernate-mapping> <class name="net.cynet.voice.ums.message.UmsSendHistory" table="UMS_SEND_HISTORY" dynamic-update="false" dynamic-insert="false" > <composite-id name="id" class="net.cynet.voice.ums.message.UmsSendHistoryKey" > <key-property name="tryCount" type="int" column="TRY_COUNT" /> <key-property name="entryId" type="long" column="SEND_ID" /> <key-property name="umsId" type="long" column="MSG_ID" /> </composite-id> <property name="result" type="int" update="true" insert="true" access="property" column="TRY_RESULT" not-null="false" unique="false" /> </hibernate-mapping>

    Hibernate JIRA | 1 decade ago | Jeon,Jiwon
    net.sf.hibernate.QueryException: path expression ends in a composite value: umssendhis1_.sendEntry [select max(history.id.tryCount) from net.cynet.voice.ums.message.UmsSendHistory history where history.sendEntry = :entryId and history.sendEntry.id.umsId = :umsId]
  2. 0

    As i know, It is possible to compare object instance in query like below. select max(send.age) from Sender send where send.receiver = ? but I have some exception like below: net.sf.hibernate.QueryException: path expression ends in a composite value: umssendhis1_.sendEntry [select max(history.id.tryCount) from net.cynet.voice.ums.message.UmsSendHistory history where history.sendEntry = :entryId and history.sendEntry.id.umsId = :umsId] at net.sf.hibernate.hql.PathExpressionParser.getWhereColumn(PathExpressionParser.java:375) at net.sf.hibernate.hql.WhereParser.doPathExpression(WhereParser.java:352) at net.sf.hibernate.hql.WhereParser.doToken(WhereParser.java:366) at net.sf.hibernate.hql.WhereParser.token(WhereParser.java:251) at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:87) at net.sf.hibernate.hql.PreprocessingParser.token(PreprocessingParser.java:123) at net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:29) at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:149) at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:138) at net.sf.hibernate.impl.SessionFactoryImpl.getQuery What I know is incorrectly or hibernate's bug? My configrue is below: <hibernate-mapping> <class name="net.cynet.voice.ums.message.UmsSendEntry" table="UMS_SEND_RESULT" dynamic-update="false" dynamic-insert="false" > <composite-id name="id" class="net.cynet.voice.ums.message.UmsSendEntryKey" unsaved-value="none" > <key-property name="umsId" type="long" column="MSG_ID" /> <key-property name="entryId" type="long" column="SEND_ID" /> </composite-id> <property name="msgStatus" type="int" update="true" insert="true" access="property" column="MSG_STATUS" not-null="false" unique="false" /> </hibernate-mapping> <hibernate-mapping> <class name="net.cynet.voice.ums.message.UmsSendHistory" table="UMS_SEND_HISTORY" dynamic-update="false" dynamic-insert="false" > <composite-id name="id" class="net.cynet.voice.ums.message.UmsSendHistoryKey" > <key-property name="tryCount" type="int" column="TRY_COUNT" /> <key-property name="entryId" type="long" column="SEND_ID" /> <key-property name="umsId" type="long" column="MSG_ID" /> </composite-id> <property name="result" type="int" update="true" insert="true" access="property" column="TRY_RESULT" not-null="false" unique="false" /> </hibernate-mapping>

    Hibernate JIRA | 1 decade ago | Jeon,Jiwon
    net.sf.hibernate.QueryException: path expression ends in a composite value: umssendhis1_.sendEntry [select max(history.id.tryCount) from net.cynet.voice.ums.message.UmsSendHistory history where history.sendEntry = :entryId and history.sendEntry.id.umsId = :umsId]
  3. 0

    I've got the following error when I set my machines locale to Turkish: org.springframework.orm.hibernate.HibernateQueryException: Incorrect query syntax [FROM com.opensymphony.workflow.spi.hibernate.HibernateCurrentStep step WHERE step.id IN (41)]; nested exception is net.sf.hibernate.QueryException: Incorrect query syntax [FROM com.opensymphony.workflow.spi.hibernate.HibernateCurrentStep step WHERE step.id IN (41)] net.sf.hibernate.QueryException: Incorrect query syntax [FROM com.opensymphony.workflow.spi.hibernate.HibernateCurrentStep step WHERE step.id IN (41)] at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:166) at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:138) at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:294) at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1562) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1533) at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39) at org.springframework.orm.hibernate.HibernateTemplate$17.doInHibernate(HibernateTemplate.java:331) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:150) at org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:170) at org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTemplate.java:328) ... I think that this stems from a case conversion "IN" -> "in" Please note that in Turkish "IN".toLowerCase != "in"; it is equal to "ın" (i without dot on top) If there is such case conversion in the code pleaase do it in correct locale (US ASCII?) Thank you.

    Hibernate JIRA | 1 decade ago | Umit VARDAR
    net.sf.hibernate.QueryException: Incorrect query syntax [FROM com.opensymphony.workflow.spi.hibernate.HibernateCurrentStep step WHERE step.id IN (41)]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. net.sf.hibernate.QueryException

      path expression ends in a composite value: umssendhis1_.sendEntry [select max(history.id.tryCount) from net.cynet.voice.ums.message.UmsSendHistory history where history.sendEntry = :entryId and history.sendEntry.id.umsId = :umsId]

      at net.sf.hibernate.hql.PathExpressionParser.getWhereColumn()
    2. net.sf.hibernate
      QueryTranslator.compile
      1. net.sf.hibernate.hql.PathExpressionParser.getWhereColumn(PathExpressionParser.java:375)
      2. net.sf.hibernate.hql.WhereParser.doPathExpression(WhereParser.java:352)
      3. net.sf.hibernate.hql.WhereParser.doToken(WhereParser.java:366)
      4. net.sf.hibernate.hql.WhereParser.token(WhereParser.java:251)
      5. net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:87)
      6. net.sf.hibernate.hql.PreprocessingParser.token(PreprocessingParser.java:123)
      7. net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:29)
      8. net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:149)
      9. net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:138)
      9 frames