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

"org.postgresql.util.PSQLException: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list_" occurs on PostgreSQL when user tries to manage Document Types

    Details

      Description

      Reproduction

      1. Launch portal with PostgreSQL db
      2. Create a user, assign the default Liferay site to the user
      3. Give the user site owner role
      4. Login with the user created before
      5. Go to Site Administration -> Content -> Document and Media Library
      6. Go to Manage -> Document Types

      Result:

      Exception in log:

      15:02:53,137 ERROR [http-bio-8080-exec-6][IncludeTag:129] Current URL /web/guest/home?p_p_id=20&p_p_lifecycle=0&p_p_state=pop_up
      &p_p_mode=view&p_p_col_id=column-2&p_p_col_pos=1&p_p_col_count=3&_20_redirect=http%3A%2F%2Flocalhost%3A8080%2Fweb%2Fguest%2Fhome
      %3Fp_p_id%3D20%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26p_p_col_id%3Dcolumn-2%26p_p_col_pos%3D1%26p_p_col_co
      unt%3D3&_20_struts_action=%2Fdocument_library%2Fview_file_entry_type generates exception: com.liferay.portal.kernel.dao.orm.ORME
      xception: org.hibernate.exception.SQLGrammarException: could not execute query
      org.postgresql.util.PSQLException: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list_  Position: 1301
      [Sanitized]
              at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
              at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
              at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
              at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
              at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
              at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:273)
              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)
              at org.hibernate.loader.Loader.list(Loader.java:2271)
              at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:316)
              at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1842)
              at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:165)
              at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:157)
              at com.liferay.portal.dao.orm.hibernate.SQLQueryImpl.list(SQLQueryImpl.java:177)
              at com.liferay.portal.dao.orm.hibernate.SQLQueryImpl.list(SQLQueryImpl.java:168)
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 12 weeks, 6 days ago

                  Packages

                  Version Package
                  6.1.X EE
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M3