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

NullPointer exception in TransactionInterceptor if intercepted class has no transaction annotations applied

    Details

    • Branch Version/s:
      6.0.x
    • Liferay Contributor's Agreement:
      Accept

      Description

      In com.liferay.portal.spring.transaction.TransactionInterceptor you find the following lines of code

      TransactionInfo transactionInfo = createTransactionIfNecessary(
      getTransactionManager(), transactionAttribute,
      joinPointIdentification);

      TransactionStatus transactionStatus =
      transactionInfo.getTransactionStatus();

      The TransactionInfo object returned by createTransactionIfNecessary is not guaranteed to hold a TransactionStatus object.

      This is for instance not the case when you are using a AnnotationTransactionAttributeSource and the object that is being intercepted does not have a @Transactional anywhere

      One way to reproduce this is install liferay 6.0.6 apply the fix for LPS-14475, install kaleo and in the control panel go to "my workflow tasks"

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            jelmer Jelmer Kuperus (Inactive)
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              9 years, 30 weeks, 3 days ago

                Packages

                Version Package
                --Sprint 12/11
                6.1.0 CE RC1