[xwiki-users] XWiki mail configuration - sendWaitTime
Hi everybody, I've tried the whole afternoon (including checking the source code of the corresponding java files) but I was unable to resolve my problem by myself. What have I done: * I've created a XWiki instance and I'm running 4 or 5 separate wikis there. * I've set up mail sending in the "main" section to test some features * The mails are sended and are received by the testclient So far no problem. But if I'm looking into the console output I've got the strange exception with an error level there and I'm not able to solve it: 2016-07-18 19:41:52,401 [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:187) at org.xwiki.model.reference.EntityReference.<init>(EntityReference.java:172) at org.xwiki.model.reference.EntityReference.<init>(EntityReference.java:143) 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.SendMailConfigClassDocumentConf igurationSource.getDocumentReference(SendMailConfigClassDocumentConfigurationSou rce.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(Send MailRunnable.java:177) at org.xwiki.mail.internal.thread.SendMailRunnable.runInternal(SendMailR unnable.java:108) at org.xwiki.mail.internal.thread.SendMailRunnable.run(SendMailRunnable.java:74) at java.lang.Thread.run(Unknown Source) as far as I understand the message it tells me, that a mandatory property is missing, should be the waitSendWaitTime property. In my mail configuration I've overridden the Send Wait Time, addtionally I've uncommented the property: mail.sender.sendWaitTime=8000 in the xwiki.properties file. Unfortunately the error keeps occuring. Best regards and thanks in advance, Heiko -- View this message in context: http://xwiki.475771.n2.nabble.com/XWiki-mail-configuration-sendWaitTime-tp76... Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi, Please see the existing issue on our issue tracker (good place to look first): http://jira.xwiki.org/browse/XWIKI-13546 Thanks, Eduard On Mon, Jul 18, 2016 at 8:53 PM, myname <[email protected]> wrote:
Hi everybody, I've tried the whole afternoon (including checking the source code of the corresponding java files) but I was unable to resolve my problem by myself.
What have I done: * I've created a XWiki instance and I'm running 4 or 5 separate wikis there. * I've set up mail sending in the "main" section to test some features * The mails are sended and are received by the testclient
So far no problem. But if I'm looking into the console output I've got the strange exception with an error level there and I'm not able to solve it: 2016-07-18 19:41:52,401 [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:187) at org.xwiki.model.reference.EntityReference.<init>(EntityReference.java:172) at org.xwiki.model.reference.EntityReference.<init>(EntityReference.java:143) 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.SendMailConfigClassDocumentConf
igurationSource.getDocumentReference(SendMailConfigClassDocumentConfigurationSou rce.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(Send MailRunnable.java:177) at org.xwiki.mail.internal.thread.SendMailRunnable.runInternal(SendMailR unnable.java:108) at
org.xwiki.mail.internal.thread.SendMailRunnable.run(SendMailRunnable.java:74) at java.lang.Thread.run(Unknown Source)
as far as I understand the message it tells me, that a mandatory property is missing, should be the waitSendWaitTime property.
In my mail configuration I've overridden the Send Wait Time, addtionally I've uncommented the property: mail.sender.sendWaitTime=8000 in the xwiki.properties file.
Unfortunately the error keeps occuring.
Best regards and thanks in advance, Heiko
-- View this message in context: http://xwiki.475771.n2.nabble.com/XWiki-mail-configuration-sendWaitTime-tp76... Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi, I've checked the jira tracker but didn't find the mentioned bug - I should have searched better. Thanks, Heiko -- View this message in context: http://xwiki.475771.n2.nabble.com/XWiki-mail-configuration-sendWaitTime-tp76... Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi myname,
On 18 Jul 2016, at 19:53, myname <[email protected]> wrote:
Hi everybody, I've tried the whole afternoon (including checking the source code of the corresponding java files) but I was unable to resolve my problem by myself.
What have I done: * I've created a XWiki instance and I'm running 4 or 5 separate wikis there. * I've set up mail sending in the "main" section to test some features * The mails are sended and are received by the testclient
So far no problem. But if I'm looking into the console output I've got the strange exception with an error level there and I'm not able to solve it: 2016-07-18 19:41:52,401 [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:187) at org.xwiki.model.reference.EntityReference.<init>(EntityReference.java:172) at org.xwiki.model.reference.EntityReference.<init>(EntityReference.java:143) 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.SendMailConfigClassDocumentConf igurationSource.getDocumentReference(SendMailConfigClassDocumentConfigurationSou rce.java:68)
[snip]
as far as I understand the message it tells me, that a mandatory property is missing, should be the waitSendWaitTime property.
From the stack trace you pasted, the error seems to be at this line in SendMailConfigClassDocumentConfigurationSource.java (I’m assuming you’re using a recent XWiki version): return new DocumentReference(DOC_REFERENCE, getCurrentWikiReference()); And getCurrentWikiReference() is implemented as: return new WikiReference(this.wikiManager.getCurrentWikiId()); Thus the issue is that this.wikiManager.getCurrentWikiId() returns null in your case, which means that the XWiki Context is not set. Could you tell us from where you are sending the mail? Also was it on the main wiki, on a subwiki? FTR it looks like a bug but we need to be able to reproduce it. Would be nice if you could create a jira issue at http://jira.xwiki.org. Thanks -Vincent
In my mail configuration I've overridden the Send Wait Time, addtionally I've uncommented the property: mail.sender.sendWaitTime=8000 in the xwiki.properties file.
Unfortunately the error keeps occuring.
Best regards and thanks in advance, Heiko
-- View this message in context: http://xwiki.475771.n2.nabble.com/XWiki-mail-configuration-sendWaitTime-tp76...
Ah just read Edy’s answer. Apparently this is a bug I’ve already fixed ;) Thanks -Vincent
On 19 Jul 2016, at 10:25, Vincent Massol <[email protected]> wrote:
Hi myname,
On 18 Jul 2016, at 19:53, myname <[email protected]> wrote:
Hi everybody, I've tried the whole afternoon (including checking the source code of the corresponding java files) but I was unable to resolve my problem by myself.
What have I done: * I've created a XWiki instance and I'm running 4 or 5 separate wikis there. * I've set up mail sending in the "main" section to test some features * The mails are sended and are received by the testclient
So far no problem. But if I'm looking into the console output I've got the strange exception with an error level there and I'm not able to solve it: 2016-07-18 19:41:52,401 [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:187) at org.xwiki.model.reference.EntityReference.<init>(EntityReference.java:172) at org.xwiki.model.reference.EntityReference.<init>(EntityReference.java:143) 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.SendMailConfigClassDocumentConf igurationSource.getDocumentReference(SendMailConfigClassDocumentConfigurationSou rce.java:68)
[snip]
as far as I understand the message it tells me, that a mandatory property is missing, should be the waitSendWaitTime property.
From the stack trace you pasted, the error seems to be at this line in SendMailConfigClassDocumentConfigurationSource.java (I’m assuming you’re using a recent XWiki version):
return new DocumentReference(DOC_REFERENCE, getCurrentWikiReference());
And getCurrentWikiReference() is implemented as:
return new WikiReference(this.wikiManager.getCurrentWikiId());
Thus the issue is that this.wikiManager.getCurrentWikiId() returns null in your case, which means that the XWiki Context is not set.
Could you tell us from where you are sending the mail? Also was it on the main wiki, on a subwiki?
FTR it looks like a bug but we need to be able to reproduce it. Would be nice if you could create a jira issue at http://jira.xwiki.org.
Thanks -Vincent
In my mail configuration I've overridden the Send Wait Time, addtionally I've uncommented the property: mail.sender.sendWaitTime=8000 in the xwiki.properties file.
Unfortunately the error keeps occuring.
Best regards and thanks in advance, Heiko
-- View this message in context: http://xwiki.475771.n2.nabble.com/XWiki-mail-configuration-sendWaitTime-tp76...
participants (3)
-
Eduard Moraru -
myname -
Vincent Massol