Getting 'Invalid use of group function' SQLException Error on MySQL 4.x
Symptoms
Using MySQL 4.x, the following appears in the atlassian-confluence.log
file:
ERROR [http-1026-3] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action
-- referer: http://wiki.somedomain.com/confluence/dashboard.action | url: /confluence/dosearchsite.action | userName: admin
java.lang.RuntimeException: Error rendering template for decorator root
(snipped stack trace)
Caused by: java.lang.RuntimeException: Error rendering template for decorator search
(snipped stack trace)
Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getRelatedLabels' in class com.atlassian.confluence.search.actions.SearchSiteAction threw exception org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Could not execute query; uncategorized SQLException for SQL []; SQL state [S1000]; error code [1111]; General error, message from server: "Invalid use of group function"; nested exception is java.sql.SQLException: General error, message from server: "Invalid use of group function" @ /search/searchpanel.vm[46,14]
(snipped stack trace)
Caused by: org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Could not execute query; uncategorized SQLException for SQL []; SQL state [S1000]; error code [1111]; General error, message from server: "Invalid use of group function"; nested exception is java.sql.SQLException: General error, message from server: "Invalid use of group function"
(snipped stack trace)
Caused by: java.sql.SQLException: General error, message from server: "Invalid use of group function"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1905)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2090)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1496)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
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:1554)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49)
at com.atlassian.confluence.labels.persistence.dao.hibernate.HibernateLabelDao$3.doInHibernate(HibernateLabelDao.java:378)
at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370)
... 195 more
Cause
Confluence 2.9 and later no longer supports MySQL 4.x. Check the List Of Supported Databases.
Resolution
Upgrade to MySQL 5.0.28+.
There is a posted workaround, but upgrade is the supported resolution pattern. You may have limited success with the workaround, which is not supported. See Workaround For Enabling MySQL 4.1.x with Confluence 2.10.
Last modified on Mar 30, 2016
Powered by Confluence and Scroll Viewport.