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

Sorting Document and Media by size throws exception

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Duplicate
    • Affects Version/s: 6.2.0 CE M5
    • Fix Version/s: 6.2.0 CE M5
    • Component/s: Documents & Media
    • Labels:
      None
    • Environment:
      Trunk CE (b5c4263b758004aaf166ac7e6ff4a8acf232267b) with Tomcat 7, MySQL 5.5, and Java 1.6.0_35

      Description

      1. Log in as [email protected]/test
      2. Go into the Control Panel > Documents and Media
      3. Add a few Basic Document entries with the same attachment, but different titles (e.g. Apple, Banana, Cat, Dracula, Eellogofusciouhipoppokunurious)
      4. Look at the Documents and Media screen and notice that clicking on "Size" does not sort the data.
      Instead, the items are no longer viewable and the following exception is on the screen:

      19:36:16,712 ERROR [http-bio-8443-exec-6][JDBCExceptionReporter:76] Unknown colu
      mn 'size' in 'order clause'
      19:36:16,716 ERROR [http-bio-8443-exec-6][IncludeTag:205] Current URL /group/con
      trol_panel/manage?p_p_id=20&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&do
      AsGroupId=19&refererPlid=10168&_20_refererPlid=10168&_20_doAsGroupId=19 generate
      s exception: com.liferay.portal.kernel.exception.SystemException: com.liferay.po
      rtal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: c
      ould not execute query
      19:36:16,722 ERROR [http-bio-8443-exec-6][IncludeTag:154] com.liferay.portal.ker
      nel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: o
      rg.hibernate.exception.SQLGrammarException: could not execute query
      at com.liferay.portlet.documentlibrary.service.persistence.DLFolderFinde
      rImpl.doFindF_FE_FS_ByG_F_M_M(DLFolderFinderImpl.java:523)
      at com.liferay.portlet.documentlibrary.service.persistence.DLFolderFinde
      rImpl.filterFindF_FE_FS_ByG_F_M_M(DLFolderFinderImpl.java:141)
      at com.liferay.portal.security.lang.DoPrivilegedHandler.doInvoke(DoPrivi
      legedHandler.java:74)
      at com.liferay.portal.security.lang.DoPrivilegedHandler.invoke(DoPrivile
      gedHandler.java:55)
      at com.liferay.portlet.documentlibrary.service.impl.DLFolderServiceImpl.
      getFoldersAndFileEntriesAndFileShortcuts(DLFolderServiceImpl.java:225)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(Ser
      viceBeanMethodInvocation.java:112)
      at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.exec
      ute(DefaultTransactionExecutor.java:61)
      at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(T
      ransactionInterceptor.java:51)
      ...
      Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column '
      size' in 'order clause'
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
      at com.mysql.jdbc.Connection.execSQL(Connection.java:3256)
      at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.ja
      va:1313)
      at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:
      1448)
      at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewPr
      oxyPreparedStatement.java:76)
      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(Lo
      ader.java:274)
      at org.hibernate.loader.Loader.doList(Loader.java:2542)
      ... 300 more

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              michael.saechang Michael Saechang
              Reporter:
              james.lefeu James Lefeu (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:
                8 years, 41 weeks, 6 days ago

                  Packages

                  Version Package
                  6.2.0 CE M5