Details

    • Branch Version/s:
      6.0.x, 5.2.x, 5.1.x
    • Backported to Branch:
      Committed
    • Similar Issues:
      Show 5 results 

      Description

      FINEST|22409/0|10-08-19 08:32:40|08:32:40,883 ERROR [JDBCExceptionReporter:101] Syntax error: Encountered "UNION" at line 1, column 369.
      INFO|wrapper|10-08-19 08:32:40|Trigger found: Exception
      FINEST|22409/0|10-08-19 08:32:40|08:32:40,910 ERROR [IncludeTag:231] Current URL /group/demoportal/documents generates exception: An exception occurred processing JSP page /html/portlet/document_library/view_file_entries.jspf at line 43
      INFO|wrapper|10-08-19 08:32:40|start script scripts/trayMessage.gv
      FINEST|22409/0|10-08-19 08:32:40|
      FINEST|22409/0|10-08-19 08:32:40|40: results = DLFolderServiceUtil.getFoldersAndFileEntriesAndFileShortcuts(scopeGroupId, folderId, status, searchContainer.getStart(), searchContainer.getEnd());
      FINEST|22409/0|10-08-19 08:32:40|41: }
      FINEST|22409/0|10-08-19 08:32:40|42: else

      { FINEST|22409/0|10-08-19 08:32:40|43: results = DLFolderServiceUtil.getFileEntriesAndFileShortcuts(scopeGroupId, folderId, status, searchContainer.getStart(), searchContainer.getEnd()); FINEST|22409/0|10-08-19 08:32:40|44: }

      FINEST|22409/0|10-08-19 08:32:40|45:
      FINEST|22409/0|10-08-19 08:32:40|46: if (mergedView) {
      FINEST|22409/0|10-08-19 08:32:40|
      FINEST|22409/0|10-08-19 08:32:40|
      FINEST|22409/0|10-08-19 08:32:40|Stacktrace:
      FINEST|22409/0|10-08-19 08:32:40|08:32:40,917 ERROR [IncludeTag:154] com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: could not execute query
      INFO|wrapper|10-08-19 08:32:40|Trigger found: Exception
      FINEST|22409/0|10-08-19 08:32:40| at com.liferay.portlet.documentlibrary.service.persistence.DLFolderFinderImpl.doFindFE_FS_ByG_F_S(DLFolderFinderImpl.java:574)

      See attached Log for full stacktrace.

      1. DLException.log
        41 kB
        Tobias Kaefer
      2. DLFolderFinderImpl.diff
        33 kB
        Tobias Kaefer
      3. SQLTransformer.diff
        2 kB
        Tobias Kaefer

        Issue Links

          Activity

          Hide
          Tobias Kaefer added a comment -

          As far as I found out, the Exception is thrown because the SQL statement looks something like this:
          SELECT * FROM ( (SELECT DISTSINCT ...) UNION ALL (SELECT DISTINCT ...) ) TEMP_TABLE ORDER BY modelFolder DESC, title ASC

          The surrounding SELECT statement
          SELECT * FROM ( ... ) TEMP_TABLE
          seems to be not supported by DerbyDB.

          What seems to be supported by DerbyDB is something like this:
          ((SELECT DISTSINCT ...) UNION ALL (SELECT DISTINCT ...)) ORDER BY modelFolder DESC, title ASC

          Show
          Tobias Kaefer added a comment - As far as I found out, the Exception is thrown because the SQL statement looks something like this: SELECT * FROM ( (SELECT DISTSINCT ...) UNION ALL (SELECT DISTINCT ...) ) TEMP_TABLE ORDER BY modelFolder DESC, title ASC The surrounding SELECT statement SELECT * FROM ( ... ) TEMP_TABLE seems to be not supported by DerbyDB. What seems to be supported by DerbyDB is something like this: ((SELECT DISTSINCT ...) UNION ALL (SELECT DISTINCT ...)) ORDER BY modelFolder DESC, title ASC
          Hide
          Tobias Kaefer added a comment -

          These patches fix not only this issue but some other I submitted or stumbled upon:
          http://issues.liferay.com/browse/LPS-11291
          http://issues.liferay.com/browse/LPS-11978

          They all relate to native SQL errors, for more info see my thread in the message board:
          http://www.liferay.com/community/forums/-/message_boards/message/5606347

          Show
          Tobias Kaefer added a comment - These patches fix not only this issue but some other I submitted or stumbled upon: http://issues.liferay.com/browse/LPS-11291 http://issues.liferay.com/browse/LPS-11978 They all relate to native SQL errors, for more info see my thread in the message board: http://www.liferay.com/community/forums/-/message_boards/message/5606347
          Hide
          Tobias Kaefer added a comment -

          Another fix that is included in these patches, fixes this issue:
          http://issues.liferay.com/browse/LPS-2371

          Show
          Tobias Kaefer added a comment - Another fix that is included in these patches, fixes this issue: http://issues.liferay.com/browse/LPS-2371
          Hide
          Brian Chan added a comment -

          Thx for the fix Tobias!

          Show
          Brian Chan added a comment - Thx for the fix Tobias!
          Hide
          Daniel Poodratchi added a comment -

          I have this behavior on Liferay 6.0.6. I'm using tomcat and mysql on Linux (SUSE).

          Show
          Daniel Poodratchi added a comment - I have this behavior on Liferay 6.0.6. I'm using tomcat and mysql on Linux (SUSE).

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 22 weeks, 1 day ago

                Development

                  Structure Helper Panel