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

Atlassian JIRA | Wolfram Richter | 6 years ago
  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 java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected - got CLOB
  2. 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 java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected - got CLOB
  3. 0

    [CONF-22164] Many page operations: move, restricting, deleting, etc. fail with Oracle, DB2 or SQL Server - Atlassian JIRA

    atlassian.com | 1 year ago
    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
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    h3. Problem This query (exists in 3.5 and 4.3): {code} select page0_.CONTENTID as CONTENTID0_, comments1_.CONTENTID as CONTENTID1_, children2_.CONTENTID as CONTENTID2_, page0_.CHILD_POSITION as CHILD_P13_0_, page0_.PARENTID as PARENTID0_, page0_.SPACEID as SPACEID0_, page0_.TITLE as TITLE0_, page0_.VERSION as VERSION0_, page0_.CREATOR as CREATOR0_, page0_.CREATIONDATE as CREATION6_0_, page0_.LASTMODIFIER as LASTMODI7_0_, page0_.LASTMODDATE as LASTMODD8_0_, page0_.VERSIONCOMMENT as VERSIONC9_0_, page0_.PREVVER as PREVVER0_, page0_.CONTENT_STATUS as CONTENT11_0_, comments1_.PAGEID as PAGEID1_, comments1_.PARENTCOMMENTID as PARENTC23_1_, comments1_.TITLE as TITLE1_, comments1_.VERSION as VERSION1_, comments1_.CREATOR as CREATOR1_, comments1_.CREATIONDATE as CREATION6_1_, comments1_.LASTMODIFIER as LASTMODI7_1_, comments1_.LASTMODDATE as LASTMODD8_1_, comments1_.VERSIONCOMMENT as VERSIONC9_1_, comments1_.PREVVER as PREVVER1_, comments1_.CONTENT_STATUS as CONTENT11_1_, children2_.PAGEID as PAGEID2_, children2_.PARENTCOMMENTID as PARENTC23_2_, children2_.TITLE as TITLE2_, children2_.VERSION as VERSION2_, children2_.CREATOR as CREATOR2_, children2_.CREATIONDATE as CREATION6_2_, children2_.LASTMODIFIER as LASTMODI7_2_, children2_.LASTMODDATE as LASTMODD8_2_, children2_.VERSIONCOMMENT as VERSIONC9_2_, children2_.PREVVER as PREVVER2_, children2_.CONTENT_STATUS as CONTENT11_2_, children2_.PARENTCOMMENTID as PARENTC23___, children2_.CONTENTID as CONTENTID__ from CONTENT page0_ left outer join CONTENT comments1_ on page0_.CONTENTID=comments1_.PAGEID left outer join CONTENT children2_ on comments1_.CONTENTID=children2_.PARENTCOMMENTID where page0_.CONTENTTYPE='PAGE' and ((page0_.SPACEID=688130 )and(lower(page0_.TITLE)='test task page' )and(page0_.PREVVER is null )and(page0_.CONTENT_STATUS='current' )) order by children2_.CREATIONDATE {code} can result in this error: {code} Error Cause org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: Could not execute query; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:107) caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay at sun.reflect.GeneratedConstructorAccessor495.newInstance(Unknown Source) Stack Trace:[hide] org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: Could not execute query; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay at sun.reflect.GeneratedConstructorAccessor495.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.Util.getInstance(Util.java:386) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2281) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:89) at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:880) at net.sf.hibernate.loader.Loader.doQuery(Loader.java:273) at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138) at net.sf.hibernate.loader.Loader.doList(Loader.java:1063) at net.sf.hibernate.loader.Loader.list(Loader.java:1054) at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1552) at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49) at com.atlassian.hibernate.HibernateObjectDao$5.doInHibernate(HibernateObjectDao.java:374) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370) at org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:341) at com.atlassian.hibernate.HibernateObjectDao.findNamedQueryStringParams(HibernateObjectDao.java:341) at com.atlassian.hibernate.HibernateObjectDao.findNamedQueryStringParams(HibernateObjectDao.java:296) at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernatePageDao.getPage(HibernatePageDao.java:89) at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernatePageDao.getPageWithComments(HibernatePageDao.java:99) at com.atlassian.confluence.pages.persistence.dao.hibernate.CachingPageDao$2.getBySpaceAndTitle(CachingPageDao.java:57) at com.atlassian.confluence.pages.persistence.dao.hibernate.CachingPageDao.loadPage(CachingPageDao.java:72) at com.atlassian.confluence.pages.persistence.dao.hibernate.CachingPageDao.getPageWithComments(CachingPageDao.java:48) at com.atlassian.confluence.pages.DefaultPageManager.getPageWithComments(DefaultPageManager.java:134) at com.atlassian.confluence.pages.DefaultPageManager.getPage(DefaultPageManager.java:147) at sun.reflect.GeneratedMethodAccessor774.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy37.getPage(Unknown Source) at com.atlassian.confluence.pages.actions.PageAwareInterceptor.getPageFromKeyAndTitle(PageAwareInterceptor.java:180) at com.atlassian.confluence.pages.actions.PageAwareInterceptor.getPage(PageAwareInterceptor.java:131) at com.atlassian.confluence.pages.actions.PageAwareInterceptor.intercept(PageAwareInterceptor.java:55) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.spaces.actions.SpaceAwareInterceptor.intercept(SpaceAwareInterceptor.java:68) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.core.actions.LastModifiedInterceptor.intercept(LastModifiedInterceptor.java:38) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.core.ConfluenceAutowireInterceptor.intercept(ConfluenceAutowireInterceptor.java:38) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.xwork.interceptors.TransactionalInvocation.invokeAndHandleExceptions(TransactionalInvocation.java:76) at com.atlassian.xwork.interceptors.TransactionalInvocation.invokeInTransaction(TransactionalInvocation.java:61) at com.atlassian.xwork.interceptors.XWorkTransactionInterceptor.intercept(XWorkTransactionInterceptor.java:56) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.xwork.SetupIncompleteInterceptor.intercept(SetupIncompleteInterceptor.java:40) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:115) at com.atlassian.confluence.servlet.ConfluenceServletDispatcher.serviceAction(ConfluenceServletDispatcher.java:53) at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:199) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at com.atlassian.confluence.servlet.simpledisplay.SimpleDisplayServlet.service(SimpleDisplayServlet.java:60) at com.atlassian.confluence.servlet.SpringManagedServlet.service(SpringManagedServlet.java:64) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.refinedwiki.confluence.plugins.mobile.filters.MobileRedirectFilter.doFilter(MobileRedirectFilter.java:111) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.security.websudo.MessagesDecoratorFilter.doFilter(MessagesDecoratorFilter.java:49) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.atlassian.confluence.util.profiling.ProfilingPageFilter.parsePage(ProfilingPageFilter.java:84) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:54) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.jmx.JmxFilter.doFilter(JmxFilter.java:106) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.ServletContextThreadLocalFilter.doFilter(ServletContextThreadLocalFilter.java:19) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.util.LoggingContextFilter.doFilter(LoggingContextFilter.java:40) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.web.filter.ThreadLocalCacheFilter.doFilter(ThreadLocalCacheFilter.java:22) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.util.UserThreadLocalFilter.doFilter(UserThreadLocalFilter.java:44) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:211) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:98) at com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:30) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:150) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:71) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.util.ClusterHeaderFilter.doFilter(ClusterHeaderFilter.java:34) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:72) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:170) at com.atlassian.spring.filter.FlushingSpringSessionInViewFilter.doFilterInternal(FlushingSpringSessionInViewFilter.java:29) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.util.ConfluenceErrorFilter.doFilter(ConfluenceErrorFilter.java:22) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:99) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.core.datetime.RequestTimeThreadLocalFilter.doFilter(RequestTimeThreadLocalFilter.java:35) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:81) at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.cache.AbstractCachingFilter.doFilter(AbstractCachingFilter.java:33) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.confluence.extra.webdav.servlet.filter.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:427) at com.atlassian.confluence.extra.webdav.servlet.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:34) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.web.filter.validateparam.RequestParamValidationFilter.doFilter(RequestParamValidationFilter.java:58) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.plugin.servlet.filter.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.web.filter.LanguageExtractionFilter.doFilter(LanguageExtractionFilter.java:52) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.util.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:25) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:41) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:65) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662) Referer URL Unknown {code} Home pages of spaces can be viewed, but child pages can not. Is it possible to optimise this query to prevent this error? h3. Workaround The workaround is to increase max join size: http://stackoverflow.com/questions/950465/mysql-sql-big-selects

    Atlassian JIRA | 4 years ago | Denise Unterwurzacher
    org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: Could not execute query; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
  6. 0

    The Setup doesn't display an error message when the user does not have permissions to create tables in the database. Instead it simply goes ahead to the next step to create a user and fails with the following exception: Cause: org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [] in task 'Hibernate operation'; nested exception is java.sql.SQLException: Invalid object name 'os_user'. at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:85) caused by: java.sql.SQLException: Invalid object name 'os_user'. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365) Stack Trace: [hide] org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [] in task 'Hibernate operation'; nested exception is java.sql.SQLException: Invalid object name 'os_user'. java.sql.SQLException: Invalid object name 'os_user'. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224) at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628) We should catch the lack of permissions earlier and display an appropriate error message.

    Atlassian JIRA | 1 decade ago | Jens Schumacher
    org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [] in task 'Hibernate operation'; nested exception is java.sql.SQLException: Invalid object name 'os_user'.

    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. 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()
    2. Spring Framework
      SQLStateSQLExceptionTranslator.translate
      1. org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:107)
      1 frame