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

Error in the log when sending a mail through the Mail API

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.4.2
    • Fix Version/s: 8.2-rc-1, 7.4.5
    • Component/s: Mail
    • Labels:
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      When sending a mail with the mail API, the mail is successful, but the logs report an error in the mail sender thread.

      To reproduce:

      1. Configure mail sending
      2. Try a simple example from the documentation http://extensions.xwiki.org/xwiki/bin/view/Extension/Mail+Sender+API#HExample1:Sendasimpletextemail
      3. Observe the logs:
        2016-07-05 12:28:01,067 [Mail Sender Thread] ERROR o.x.m.i.t.SendMailRunnable     - Unexpected error in the Mail Sender Thread 
        java.lang.IllegalArgumentException: An Entity Reference name cannot be null or empty
                at org.xwiki.model.reference.EntityReference.setName(EntityReference.java:186)
                at org.xwiki.model.reference.EntityReference.<init>(EntityReference.java:171)
                at org.xwiki.model.reference.EntityReference.<init>(EntityReference.java:142)
                at org.xwiki.model.reference.WikiReference.<init>(WikiReference.java:61)
                at org.xwiki.configuration.internal.AbstractDocumentConfigurationSource.getCurrentWikiReference(AbstractDocumentConfigurationSource.java:185)
                at org.xwiki.mail.internal.configuration.SendMailConfigClassDocumentConfigurationSource.getDocumentReference(SendMailConfigClassDocumentConfigurationSource.java:68)
                at org.xwiki.configuration.internal.AbstractDocumentConfigurationSource.getCacheKeyPrefix(AbstractDocumentConfigurationSource.java:122)
                at org.xwiki.configuration.internal.AbstractDocumentConfigurationSource.getPropertyValue(AbstractDocumentConfigurationSource.java:306)
                at org.xwiki.configuration.internal.AbstractDocumentConfigurationSource.getProperty(AbstractDocumentConfigurationSource.java:301)
                at org.xwiki.mail.internal.configuration.DefaultMailSenderConfiguration.getSendWaitTime(DefaultMailSenderConfiguration.java:313)
                at org.xwiki.mail.internal.thread.SendMailRunnable.waitSendWaitTime(SendMailRunnable.java:177)
                at org.xwiki.mail.internal.thread.SendMailRunnable.runInternal(SendMailRunnable.java:108)
                at org.xwiki.mail.internal.thread.SendMailRunnable.run(SendMailRunnable.java:74)
                at java.lang.Thread.run(Thread.java:745)
        

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vmassol Vincent Massol
                Reporter:
                enygma Eduard Moraru
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: