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

DateOverrideIncrement fails when used with java.sql.Timestamp

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Duplicate
    • Affects Version/s: 7.0.1 CE GA2, 7.0.2 CE GA3
    • Fix Version/s: 7.0.3 CE GA4
    • Component/s: Portal Services
    • Labels:
      None
    • Fix Priority:
      3

      Description

      In the cases where a DB is used for document management, the DateOverrideIncrement fails when used with java.sql.Timestamp. For example, a file import will trigger:

      @BufferedIncrement(
      configuration = "DLFolderEntry",
      incrementClass = DateOverrideIncrement.class
      )
      @Override
      public void updateLastPostDate(long folderId, Date lastPostDate)

      The date is (java.sql.Timestamp).

      Since DateOverrideIncrement is defined using Generics, and Java generics are not polymorphic, the operation will fail with a No Method Found exception.

      Caused by: com.liferay.portal.kernel.exception.SystemException: java.lang.NoSuchMethodException: com.liferay.portal.kernel.increment.DateOverrideIncrement.<init>(java.sql.Timestamp)
      at com.liferay.portal.kernel.increment.IncrementFactory.createIncrement(IncrementFactory.java:43)
      at com.liferay.portal.increment.BufferedIncrementAdvice.before(BufferedIncrementAdvice.java:103)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:44)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
      at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
      at com.sun.proxy.$Proxy216.updateLastPostDate(Unknown Source)
      at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.addFileEntry(DLFileEntryLocalServiceImpl.java:256)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              preston.crary Preston Crary
              Reporter:
              naci@eteration.com Naci Dai
              Participants of an Issue:
              Recent user:
              Preston Crary
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 11 weeks, 4 days ago

                  Packages

                  Version Package
                  7.0.3 CE GA4