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
<vincent(a)massol.net> wrote:
Hi myname,
On 18 Jul 2016, at 19:53, myname
<heiko.roehrle(a)am-automation.de> 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-tp7…