Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-22042

Mail Prepare Thread error still occurs in some cases when triggering the mail sending job from Scheduler

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      Steps to reproduce

      These are the steps after which I reproduced the issue the first time (on 15.10.7):

      1. Login as Admin
      2. Create an user (e.g. U1)
      3. Create some pages (e.g. a/b/c/d/e)
      4. Login as the user U1
      5. Go to Notifications Settings and create a filter or more (not sure this step is really relevant, but this is how I reproduced), e.g.: 
        1. Location -> Page "c": "Home/a/b/c/"
        2. Action -> Ignore the event
        3. Events type (Pages) -> A page is modified
        4. Channel -> Alert
      6. Login as Admin
      7. Update the pages a/b/c/d/e/
      8. Go to Scheduler.WebHome and trigger the 'Notifications daily email' job
      9. Observe the XWiki console

      Expected results

      No errors are displayed.

      Actual results

      Despite the fix from XWIKI-21991, in XWiki logs there is the following stacktrace:

      2024-03-26 16:28:12,637 [Mail Prepare Thread] ERROR o.a.v.rendering                - Left side ($documentPropertiesSummary.modified) of comparison operation has null value at environment:/templates/diff_macros.vm[line 425, column 45]
      2024-03-26 16:28:12,637 [Mail Prepare Thread] ERROR o.a.v.rendering                - Left side ($docDiff.metaData.size()) of comparison operation has null value at environment:/templates/diff_macros.vm[line 373, column 34]
      2024-03-26 16:28:12,637 [Mail Prepare Thread] ERROR o.a.v.rendering                - Left side ($docDiff.attachments.size()) of comparison operation has null value at environment:/templates/diff_macros.vm[line 379, column 37]
      2024-03-26 16:28:12,637 [Mail Prepare Thread] ERROR o.a.v.rendering                - Left side ($docDiff.objects.size()) of comparison operation has null value at environment:/templates/diff_macros.vm[line 385, column 33]
      2024-03-26 16:28:12,637 [Mail Prepare Thread] ERROR o.a.v.rendering                - Left side ($docDiff.classProperties.size()) of comparison operation has null value at environment:/templates/diff_macros.vm[line 391, column 41]
      2024-03-26 16:28:12,684 [Mail Prepare Thread] ERROR o.a.v.rendering                - Left side ($documentPropertiesSummary.modified) of comparison operation has null value at environment:/templates/diff_macros.vm[line 425, column 45]
      2024-03-26 16:28:12,684 [Mail Prepare Thread] ERROR o.a.v.rendering                - Left side ($docDiff.metaData.size()) of comparison operation has null value at environment:/templates/diff_macros.vm[line 373, column 34]
      2024-03-26 16:28:12,684 [Mail Prepare Thread] ERROR o.a.v.rendering                - Left side ($docDiff.attachments.size()) of comparison operation has null value at environment:/templates/diff_macros.vm[line 379, column 37]
      2024-03-26 16:28:12,684 [Mail Prepare Thread] ERROR o.a.v.rendering                - Left side ($docDiff.objects.size()) of comparison operation has null value at environment:/templates/diff_macros.vm[line 385, column 33]
      2024-03-26 16:28:12,684 [Mail Prepare Thread] ERROR o.a.v.rendering                - Left side ($docDiff.classProperties.size()) of comparison operation has null value at environment:/templates/diff_macros.vm[line 391, column 41]
      2024-03-26 16:28:13,197 [Mail Prepare Thread] ERROR o.a.v.rendering                - Left side ($documentPropertiesSummary.modified) of comparison operation has null value at environment:/templates/diff_macros.vm[line 425, column 45]
      2024-03-26 16:28:13,197 [Mail Prepare Thread] ERROR o.a.v.rendering                - Left side ($docDiff.metaData.size()) of comparison operation has null value at environment:/templates/diff_macros.vm[line 373, column 34]
      2024-03-26 16:28:13,197 [Mail Prepare Thread] ERROR o.a.v.rendering                - Left side ($docDiff.attachments.size()) of comparison operation has null value at environment:/templates/diff_macros.vm[line 379, column 37]
      2024-03-26 16:28:13,197 [Mail Prepare Thread] ERROR o.a.v.rendering                - Left side ($docDiff.objects.size()) of comparison operation has null value at environment:/templates/diff_macros.vm[line 385, column 33]
      2024-03-26 16:28:13,197 [Mail Prepare Thread] ERROR o.a.v.rendering                - Left side ($docDiff.classProperties.size()) of comparison operation has null value at environment:/templates/diff_macros.vm[line 391, column 41]
      2024-03-26 16:28:13,313 [Mail Prepare Thread] ERROR o.a.v.rendering                - Left side ($documentPropertiesSummary.modified) of comparison operation has null value at environment:/templates/diff_macros.vm[line 425, column 45]
      2024-03-26 16:28:13,319 [Mail Prepare Thread] ERROR o.a.v.rendering                - Left side ($docDiff.metaData.size()) of comparison operation has null value at environment:/templates/diff_macros.vm[line 373, column 34]
      2024-03-26 16:28:13,319 [Mail Prepare Thread] ERROR o.a.v.rendering                - Left side ($docDiff.attachments.size()) of comparison operation has null value at environment:/templates/diff_macros.vm[line 379, column 37]
      2024-03-26 16:28:13,319 [Mail Prepare Thread] ERROR o.a.v.rendering                - Left side ($docDiff.objects.size()) of comparison operation has null value at environment:/templates/diff_macros.vm[line 385, column 33]
      2024-03-26 16:28:13,319 [Mail Prepare Thread] ERROR o.a.v.rendering                - Left side ($docDiff.classProperties.size()) of comparison operation has null value at environment:/templates/diff_macros.vm[line 391, column 41]

      However, the mails are sent and received by the user and the diff from mails seems ok.

      I managed to reproduce the issue every time after an upgrade (in this case from 12.10.11 to 16.2.0 on an instance with an existing user with notifications) by triggering the 'Notifications daily email' job just after (no Mail Sending configuration required).

      Attachments

        Issue Links

          Activity

            People

              surli Simon Urli
              iandriuta Ilie Andriuta
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: