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

Exception occurred when user try to do a search using SQL Server 2017

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: No Longer Reproducible
    • Affects Version/s: 7.1.10.2 SP2, 7.2.10.1 DXP SP1
    • Fix Version/s: None
    • Component/s: Search Infrastructure
    • Labels:
      None
    • Fix Priority:
      5

      Description

      Steps to reproduce:

      1. Login as test user.
      2. Create a WC named "Apple" and upload a file using DM, named "Apple".
      3. Back to home page, search Apple.

      Expected result:
      Search works, both content could be searched out.

      Actual result:
      Exception display in page and console.

      2019-10-24 06:24:50.708 ERROR [http-nio-8080-exec-4][JDBCExceptionReporter:234] 不能在具有唯一索引"IX_C7057FF7"的对象"dbo.PortletPreferences"中插入重复键的行。重复键值为 (0, 3, 20171, com_liferay_product_navigation_product_menu_web_portlet_ProductMenuPortlet)。
      2019-10-24 06:24:50.722 ERROR [http-nio-8080-exec-4][RuntimeTag:353] org.springframework.dao.InvalidDataAccessResourceUsageException: Could not execute JDBC batch update; SQL [insert into PortletPreferences (mvccVersion, companyId, ownerId, ownerType, plid, portletId, preferences, portletPreferencesId) values (?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
      org.springframework.dao.InvalidDataAccessResourceUsageException: Could not execute JDBC batch update; SQL [insert into PortletPreferences (mvccVersion, companyId, ownerId, ownerType, plid, portletId, preferences, portletPreferencesId) values (?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
      	at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:643)
      	at org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:800)
      	at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:671)
      

      Notes: Tested on SQL Server 2017 with 71 DXP SP2, not verified on latest branches yet.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  15 weeks, 6 days ago

                  Packages

                  Version Package