java.lang.IllegalArgumentException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Our internal functional mailbox has a '&' character in its address. I would like to set this e-mail address as the system email in the SMTP settings so that Nexus can send notification. The problem is that Nexus claims that this is an invalid e-mail address, although I can send mails from another mailbox (e.g. Gmail) and there is an option, as per RFC 822, using quotes to have special characters in e-mail addresses. So how to set an e-mail address with '&' in it? Nexus shows a short pop-up with a 500 error and generates the following stacktrace: {code}2015-08-26 14:48:58 ERROR [qtp26197757-103] - org.sonatype.nexus.rest.NexusApplication - Unhandled exception or error intercepted java.lang.IllegalArgumentException: Invalida e-mail address: <address_with&amp;character@acme.com> at org.sonatype.micromailer.Address.validateAddress(Address.java:115) ~[sisu-mailer-1.8.jar:1.8] at org.sonatype.micromailer.Address.<init>(Address.java:44) ~[sisu-mailer-1.8.jar:1.8] at org.sonatype.micromailer.Address.<init>(Address.java:36) ~[sisu-mailer-1.8.jar:1.8] at org.sonatype.nexus.rest.global.GlobalConfigurationPlexusResource.put(GlobalConfigurationPlexusResource.java:256) ~[nexus-restlet1x-plugin-2.10.0-02/:na] at org.sonatype.plexus.rest.resource.RestletResource.storeRepresentation(RestletResource.java:299) ~[nexus-restlet1x-plugin-2.10.0-02/:na] at org.sonatype.nexus.rest.NexusRestletResource.storeRepresentation(NexusRestletResource.java:91) ~[nexus-restlet1x-plugin-2.10.0-02/:na] ... Caused by: javax.mail.internet.AddressException: Local address contains illegal character at javax.mail.internet.InternetAddress.checkAddress(InternetAddress.java:1216) ~[mail-1.4.7.jar:1.4.7] at javax.mail.internet.InternetAddress.validate(InternetAddress.java:1129) ~[mail-1.4.7.jar:1.4.7] at org.sonatype.micromailer.Address.getInternetAddress(Address.java:61) ~[sisu-mailer-1.8.jar:1.8] at org.sonatype.micromailer.Address.validateAddress(Address.java:111) ~[sisu-mailer-1.8.jar:1.8] ... 131 common frames omitted {code}
    via by Sylvain Baudoin,
    • java.lang.IllegalArgumentException: Invalida e-mail address: <address_with&amp;character@acme.com> at org.sonatype.micromailer.Address.validateAddress(Address.java:115)[sisu-mailer-1.8.jar:1.8] at org.sonatype.micromailer.Address.<init>(Address.java:44)[sisu-mailer-1.8.jar:1.8] at org.sonatype.micromailer.Address.<init>(Address.java:36)[sisu-mailer-1.8.jar:1.8] at org.sonatype.nexus.rest.global.GlobalConfigurationPlexusResource.put(GlobalConfigurationPlexusResource.java:256)[nexus-restlet1x-plugin-2.10.0-02/:na] at org.sonatype.plexus.rest.resource.RestletResource.storeRepresentation(RestletResource.java:299)[nexus-restlet1x-plugin-2.10.0-02/:na] at org.sonatype.nexus.rest.NexusRestletResource.storeRepresentation(NexusRestletResource.java:91)[nexus-restlet1x-plugin-2.10.0-02/:na]
    No Bugmate found.