Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-41612

Non-standard SQL makes the Site Directory Portlet unusable

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 6.2.0 CE RC6
    • Fix Version/s: 6.2.0 CE RC6, 6.2.X EE
    • Component/s: WCM, WCM > Sites Management
    • Labels:
    • Environment:
      Tomcat 7 + Oracle 11g. Portal 6.2.x GIT ID: 3423b3daf755202c9f3ddbec871ff71f9977d9f1.

      Description

      Step to reproduce

      1) Use any database other than MySQL
      2) Place the Sites Directory portlet to a random page

      Observe the following error

      07:09:12,849 ERROR [http-bio-9080-exec-3][JDBCExceptionReporter:82] ORA-00979: not a GROUP BY expression_ [Sanitized]
      07:09:12,851 ERROR [http-bio-9080-exec-3][IncludeTag:129] Current URL /home generates exception: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: could not execute query
      java.sql.SQLSyntaxErrorException: ORA-00979: not a GROUP BY expression_ [Sanitized]
      	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
      	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
      	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
      	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
      	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
      	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
      	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
      	at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:884)
      	at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1167)
      	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1289)
      	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3584)
      	at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3628)
      	at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1493)
      	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:116)
      	at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
      	at org.hibernate.loader.Loader.getResultSet(Loader.java:1953)
      	at org.hibernate.loader.Loader.doQuery(Loader.java:802)
      	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
      	at org.hibernate.loader.Loader.doList(Loader.java:2542)
      	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
      

      Problematic SQL

      SELECT
      	DISTINCT Group_.groupId        AS groupId322_0_,
      	Group_.uuid_                   AS uuid2_322_0_,
      	Group_.companyId               AS companyId322_0_,
      	Group_.creatorUserId           AS creatorU4_322_0_,
      	Group_.classNameId             AS classNam5_322_0_,
      	Group_.classPK                 AS classPK322_0_,
      	Group_.parentGroupId           AS parentGr7_322_0_,
      	Group_.liveGroupId             AS liveGrou8_322_0_,
      	Group_.treePath                AS treePath322_0_,
      	Group_.name                    AS name322_0_,
      	Group_.description             AS descrip11_322_0_,
      	Group_.type_                   AS type12_322_0_,
      	Group_.typeSettings            AS typeSet13_322_0_,
      	Group_.manualMembership        AS manualM14_322_0_,
      	Group_.membershipRestriction   AS members15_322_0_,
      	Group_.friendlyURL             AS friendl16_322_0_,
      	Group_.site                    AS site322_0_,
      	Group_.remoteStagingGroupCount AS remoteS18_322_0_,
      	Group_.active_                 AS active19_322_0_ 
      FROM
      	Group_ 
      		INNER JOIN LayoutSet 
      		ON LayoutSet.groupId = Group_.groupId 
      WHERE
      	(Group_.companyId = ?) AND
      	(Group_.parentGroupId = ?) AND
      	(Group_.site = ?) AND
      	(LayoutSet.pageCount > 0) 
      GROUP BY
      	Group_.groupId
      

        Attachments

          Activity

            People

            • Assignee:
              evan.nagayama Evan Nagayama (Inactive)
              Reporter:
              laszlo.csontos Laszlo Csontos (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 50 weeks, 2 days ago

                Packages

                Version Package
                6.2.0 CE RC6
                6.2.X EE