org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; SQL [select count(*) from document where current_date - cast(image_indexing_date as date) >= 20]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query

hsqldb | dma_k | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    A subtraction of two dates leads to exception

    hsqldb | 6 years ago | dma_k
    org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; SQL [select count(*) from document where current_date - cast(image_indexing_date as date) >= 20]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query

    Root Cause Analysis

    1. org.springframework.dao.InvalidDataAccessResourceUsageException

      could not execute query; SQL [select count(*) from document where current_date - cast(image_indexing_date as date) >= 20]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query

      at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException()
    2. Hibernate
      HibernateTemplate.findByNamedQuery
      1. org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:629)
      2. org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
      3. org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
      4. org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
      5. org.springframework.orm.hibernate3.HibernateTemplate.findByNamedQuery(HibernateTemplate.java:979)
      6. org.springframework.orm.hibernate3.HibernateTemplate.findByNamedQuery(HibernateTemplate.java:971)
      6 frames