org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: error performing findBySQL; bad SQL grammar []; nested exception is com.ibm.db2.jcc.am.mo: DB2 SQL Error: SQLCODE=-134, SQLSTATE=42907, SQLERRMC=VERSIONC9_0_, DRIVER=4.7.85 Caused by: com.ibm.db2.jcc.am.mo: DB2 SQL Error: SQLCODE=-134, SQLSTATE=42907, SQLERRMC=VERSIONC9_0_, DRIVER=4.7.85 ...

Atlassian JIRA | Wolfram Richter | 6 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    For Oracle: {noformat} caused by: org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: error performing findBySQL; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected - got CLOB at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:107) caused by: java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected - got CLOB at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440) {noformat} For DB2: {noformat} 2011-04-13 06:19:41,145 ERROR [http-8080-6] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action -- url: /pages/dopurgetrashitem.action | userName: admin | referer: http://ec2-50-16-150-219.compute-1.amazonaws.com:8080/pages/purgetrashitem.action?key=ds&contentId=32815 org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: error performing findBySQL; bad SQL grammar []; nested exception is com.ibm.db2.jcc.am.mo: DB2 SQL Error: SQLCODE=-134, SQLSTATE=42907, SQLERRMC=VERSIONC9_0_, DRIVER=4.7.85 Caused by: com.ibm.db2.jcc.am.mo: DB2 SQL Error: SQLCODE=-134, SQLSTATE=42907, SQLERRMC=VERSIONC9_0_, DRIVER=4.7.85 ... at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernatePageDao$5.doInHibernate(HibernatePageDao.java:473) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370) at org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:341) at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernatePageDao.getDescendents(HibernatePageDao.java:462) at com.atlassian.confluence.pages.persistence.dao.hibernate.CachingPageDao.getDescendents(CachingPageDao.java:201) at com.atlassian.confluence.pages.DefaultPageManager.getDescendents(DefaultPageManager.java:167) ... {noformat} For SQL Server: {noformat} 2011-04-06 14:37:19,123 ERROR [http-8081-9] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action url: /pages/movepage.action | userName: xxxxx | referer: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: error performing findBySQL; uncategorized SQLException for SQL []; SQL state [S1000]; error code [421]; The ntext data type cannot be selected as DISTINCT because it is not comparable.; nested exception is java.sql.SQLException: The ntext data type cannot be selected as DISTINCT because it is not comparable. Caused by: java.sql.SQLException: The ntext data type cannot be selected as DISTINCT because it is not comparable. {noformat} {panel:title=Workaround Available|borderStyle=solid|borderColor=#3C78B5| titleBGColor=#3C78B5| bgColor=#E7F4FA} To fix this problem in Confluence 3.5.1 or 3.5.2, use the [attached patch|^CONF-22164-patch-v1.zip] as follows: # Shut down Confluence. # Unzip the patch file, [^CONF-22164-patch-v1.zip] into the {{confluence/WEB-INF/classes/}} directory. This will create a deep nesting of subdirectories with the 7 patched class files in {{confluence/WEB-INF/classes/com/atlassian/confluence/pages/persistence/dao/hibernate/}}. # Start Confluence again. Please contact [Atlassian support|https://support.atlassian.com] if you have trouble applying the patch. *Do not under any circumstances change your database schema to fix this problem.* Doing so may break future upgrades of Confluence and will not be supported by Atlassian in the future. If you have already changed your database schema to work around this problem, we recommend rolling back that change and applying this patch instead. The patch is not be required in Confluence 3.5.3 or later, which will ship with this fix. Confluence 3.5 and earlier does not have this issue. {panel}

    Atlassian JIRA | 6 years ago | Wolfram Richter
    org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: error performing findBySQL; bad SQL grammar []; nested exception is com.ibm.db2.jcc.am.mo: DB2 SQL Error: SQLCODE=-134, SQLSTATE=42907, SQLERRMC=VERSIONC9_0_, DRIVER=4.7.85 Caused by: com.ibm.db2.jcc.am.mo: DB2 SQL Error: SQLCODE=-134, SQLSTATE=42907, SQLERRMC=VERSIONC9_0_, DRIVER=4.7.85 ...

    Root Cause Analysis

    1. org.springframework.jdbc.BadSqlGrammarException

      Hibernate operation: error performing findBySQL; bad SQL grammar []; nested exception is com.ibm.db2.jcc.am.mo: DB2 SQL Error: SQLCODE=-134, SQLSTATE=42907, SQLERRMC=VERSIONC9_0_, DRIVER=4.7.85 Caused by: com.ibm.db2.jcc.am.mo: DB2 SQL Error: SQLCODE=-134, SQLSTATE=42907, SQLERRMC=VERSIONC9_0_, DRIVER=4.7.85 ...

      at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernatePageDao$5.doInHibernate()
    2. com.atlassian.confluence
      HibernatePageDao$5.doInHibernate
      1. com.atlassian.confluence.pages.persistence.dao.hibernate.HibernatePageDao$5.doInHibernate(HibernatePageDao.java:473)
      1 frame
    3. Hibernate
      HibernateTemplate.executeFind
      1. org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370)
      2. org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:341)
      2 frames
    4. com.atlassian.confluence
      DefaultPageManager.getDescendents
      1. com.atlassian.confluence.pages.persistence.dao.hibernate.HibernatePageDao.getDescendents(HibernatePageDao.java:462)
      2. com.atlassian.confluence.pages.persistence.dao.hibernate.CachingPageDao.getDescendents(CachingPageDao.java:201)
      3. com.atlassian.confluence.pages.DefaultPageManager.getDescendents(DefaultPageManager.java:167)
      3 frames