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

IncrementFactory does not construct Increment objects when provided children types

    Details

      Description

      IncrementFactory (used by BufferedIncrement) creates an Increment object based on the parameter type passed in the last method parameter. Since this doesn't handle super types, we could get errors in situations like java.sql.Timestamp.

      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.$Proxy132.updateLastPostDate(Unknown Source)
      at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.addFileEntry(DLFileEntryLocalServiceImpl.java:256)
      at sun.reflect.GeneratedMethodAccessor1209.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
      at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
      at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
      at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:40)
      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.$Proxy91.addFileEntry(Unknown Source)
      at com.liferay.portal.repository.liferayrepository.LiferayLocalRepository.addFileEntry(LiferayLocalRepository.java:137)
      at com.liferay.portal.repository.util.LocalRepositoryWrapper.addFileEntry(LocalRepositoryWrapper.java:61)
      at com.liferay.portal.repository.liferayrepository.ModelValidatorLocalRepositoryWrapper.addFileEntry(ModelValidatorLocalRepositoryWrapper.java:77)
      at com.liferay.portal.repository.util.LocalRepositoryWrapper.addFileEntry(LocalRepositoryWrapper.java:61)
      at com.liferay.portal.repository.liferayrepository.LiferayWorkflowLocalRepositoryWrapper.addFileEntry(LiferayWorkflowLocalRepositoryWrapper.java:71)
      at com.liferay.portal.repository.util.LocalRepositoryWrapper.addFileEntry(LocalRepositoryWrapper.java:61)
      at com.liferay.portal.repository.liferayrepository.LiferayProcessorLocalRepositoryWrapper.addFileEntry(LiferayProcessorLocalRepositoryWrapper.java:66)
      at com.liferay.portal.repository.capabilities.CapabilityLocalRepository.addFileEntry(CapabilityLocalRepository.java:79)
      at com.liferay.portlet.documentlibrary.service.impl.DLAppLocalServiceImpl.addFileEntry(DLAppLocalServiceImpl.java:291)
      at sun.reflect.GeneratedMethodAccessor1205.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
      at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
      at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
      at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:40)
      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.$Proxy95.addFileEntry(Unknown Source)
      at com.liferay.document.library.lar.FileEntryStagedModelDataHandler.doImportStagedModel(FileEntryStagedModelDataHandler.java:417)
      at com.liferay.document.library.lar.FileEntryStagedModelDataHandler.doImportStagedModel(FileEntryStagedModelDataHandler.java:84)
      at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:364)
      ... 68 more
      Caused by: java.lang.NoSuchMethodException: com.liferay.portal.kernel.increment.DateOverrideIncrement.<init>(java.sql.Timestamp)
      at java.lang.Class.getConstructor0(Class.java:3082)
      at java.lang.Class.getConstructor(Class.java:1825)
      at com.liferay.portal.kernel.increment.IncrementFactory.createIncrement(IncrementFactory.java:37)
      ... 114 more

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                michael.han Michael Han
                Reporter:
                michael.han Michael Han
                Participants of an Issue:
                Recent user:
                Csaba Turcsan
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 1 week, 2 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP2
                  7.0.0 DXP SP1
                  7.0.3 CE GA4
                  Master