[jboss-jira] [JBoss JIRA] (WFLY-11818) wildfly-16.0.0.Final: "From address" is no more used as default from in email
Wolfgang Mayer (Jira)
issues at jboss.org
Fri Mar 15 06:03:00 EDT 2019
[ https://issues.jboss.org/browse/WFLY-11818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13708816#comment-13708816 ]
Wolfgang Mayer commented on WFLY-11818:
---------------------------------------
I am not sure understanding all your points. But the configuration was done via jboss-cli and the WildFly console:
*>>> What does the mail subsystem config from your xml look like? The QS does not configure the 'from' attribute you mention in the JIRA description*.
<subsystem xmlns="urn:jboss:domain:mail:3.0">
<mail-session name="default" jndi-name="java:jboss/mail/Default" from="my.mail.from at server">
<smtp-server outbound-socket-binding-ref="mail-smtp" tls="true" username="my.mail.from at server" password="myPassword"/>
</mail-session>
<mail-session name="imap" jndi-name="java:jboss/mail/imap" from="my.mail.from at server">
<imap-server outbound-socket-binding-ref="mail-imap" ssl="true" username="my.mail.from at server" password="myPassword"/>
</mail-session>
<mail-session name="pop3" jndi-name="java:jboss/mail/pop3" from="my.mail.from at server">
<pop3-server outbound-socket-binding-ref="mail-pop3" ssl="true" username="my.mail.from at server" password="myPassword"/>
</mail-session>
</subsystem
*>>> So unless you are configuring it some other way the description of that attribute doesn't matter.*
/subsystem=mail/mail-session=MyOtherMail:read-resource-description
...
"from" => {
"type" => STRING,
"description" => "From address that is used as default from, if not set when sending",
"expressions-allowed" => true,
"required" => false,
"nillable" => true,
"min-length" => 1L,
"max-length" => 2147483647L,
"access-type" => "read-write",
"storage" => "configuration",
"restart-required" => "all-services"
},
...
*>>> Do you have a stack trace for the SMTPSendFailedException?*
Context Path:
/mail
Servlet Path:
/home.jsf
Path Info:
null
Query String:
null
Stack Trace:
javax.servlet.ServletException: java.lang.NullPointerException
at javax.faces.api at 2.3.9.SP01//javax.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:725)
at javax.faces.api at 2.3.9.SP01//javax.faces.webapp.FacesServlet.service(FacesServlet.java:451)
at io.undertow.servlet at 2.0.19.Final//io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
at io.undertow.servlet at 2.0.19.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
at io.opentracing.contrib.opentracing-jaxrs2//io.opentracing.contrib.jaxrs2.server.SpanFinishingFilter.doFilter(SpanFinishingFilter.java:55)
at io.undertow.servlet at 2.0.19.Final//io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet at 2.0.19.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at io.undertow.servlet at 2.0.19.Final//io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
at io.undertow.servlet at 2.0.19.Final//io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
at io.undertow.servlet at 2.0.19.Final//io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
at io.undertow.servlet at 2.0.19.Final//io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at org.wildfly.extension.undertow at 16.0.0.Final//org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.core at 2.0.19.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet at 2.0.19.Final//io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
at io.undertow.servlet at 2.0.19.Final//io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
at io.undertow.core at 2.0.19.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.core at 2.0.19.Final//io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
at io.undertow.servlet at 2.0.19.Final//io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
at io.undertow.core at 2.0.19.Final//io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
at io.undertow.servlet at 2.0.19.Final//io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
at io.undertow.core at 2.0.19.Final//io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
at io.undertow.core at 2.0.19.Final//io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
at io.undertow.core at 2.0.19.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at org.wildfly.extension.undertow at 16.0.0.Final//org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.core at 2.0.19.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at org.wildfly.extension.undertow at 16.0.0.Final//org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
at io.undertow.core at 2.0.19.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet at 2.0.19.Final//io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
at io.undertow.servlet at 2.0.19.Final//io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
at io.undertow.servlet at 2.0.19.Final//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
at io.undertow.servlet at 2.0.19.Final//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
at io.undertow.servlet at 2.0.19.Final//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
at io.undertow.servlet at 2.0.19.Final//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at org.wildfly.extension.undertow at 16.0.0.Final//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
at org.wildfly.extension.undertow at 16.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
at org.wildfly.extension.undertow at 16.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
at org.wildfly.extension.undertow at 16.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
at org.wildfly.extension.undertow at 16.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
at io.undertow.servlet at 2.0.19.Final//io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
at io.undertow.servlet at 2.0.19.Final//io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
at io.undertow.servlet at 2.0.19.Final//io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
at io.undertow.core at 2.0.19.Final//io.undertow.server.Connectors.executeRootHandler(Connectors.java:364)
at io.undertow.core at 2.0.19.Final//io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
at org.jboss.threads at 2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads at 2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
at org.jboss.threads at 2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads at 2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
at com.sun.jsf-impl at 2.3.9.SP01//com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:76)
at com.sun.jsf-impl at 2.3.9.SP01//com.sun.faces.application.ActionListenerImpl.getNavigationOutcome(ActionListenerImpl.java:82)
at com.sun.jsf-impl at 2.3.9.SP01//com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:71)
at javax.faces.api at 2.3.9.SP01//javax.faces.component.UICommand.broadcast(UICommand.java:222)
at javax.faces.api at 2.3.9.SP01//javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:847)
at javax.faces.api at 2.3.9.SP01//javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1395)
at com.sun.jsf-impl at 2.3.9.SP01//com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:58)
at com.sun.jsf-impl at 2.3.9.SP01//com.sun.faces.lifecycle.Phase.doPhase(Phase.java:76)
at com.sun.jsf-impl at 2.3.9.SP01//com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
at javax.faces.api at 2.3.9.SP01//javax.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:707)
... 47 more
Caused by: java.lang.NullPointerException
at deployment.mail.war//org.jboss.as.quickstarts.mail.Email.send(Email.java:121)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.glassfish.javax.el at 3.0.1-b08-jbossorg-1//com.sun.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:181)
at org.glassfish.javax.el at 3.0.1-b08-jbossorg-1//com.sun.el.parser.AstValue.invoke(AstValue.java:289)
at org.glassfish.javax.el at 3.0.1-b08-jbossorg-1//com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304)
at org.jboss.weld.core at 3.1.0.Final//org.jboss.weld.module.web.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
at org.jboss.weld.core at 3.1.0.Final//org.jboss.weld.module.web.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
at org.jboss.weld.core at 3.1.0.Final//org.jboss.weld.module.web.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
at org.jboss.weld.core at 3.1.0.Final//org.jboss.weld.module.web.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
at com.sun.jsf-impl at 2.3.9.SP01//com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:65)
at com.sun.jsf-impl at 2.3.9.SP01//com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:66)
... 56 more
> wildfly-16.0.0.Final: "From address" is no more used as default from in email
> -----------------------------------------------------------------------------
>
> Key: WFLY-11818
> URL: https://issues.jboss.org/browse/WFLY-11818
> Project: WildFly
> Issue Type: Bug
> Components: Mail
> Affects Versions: 16.0.0.Final
> Environment: mvn -v
> Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T20:41:47+02:00)
> Maven home: /apps/apache-maven-3.6.0
> Java version: 11.0.2, vendor: Oracle Corporation, runtime: /usr/java/jdk-11.0.2
> Default locale: de_DE, platform encoding: UTF-8
> OS name: "linux", version: "4.12.14-lp150.12.48-default", arch: "amd64", family: "unix"
> Reporter: Wolfgang Mayer
> Assignee: Tomaz Cerar
> Priority: Major
>
> As mentioned in the Help (description) of 'Mail Session' configuration:
> From: *From address that is used as default from, if not set when sending*
> Apparently this is not the case anymore in wildfly-16.0.0.Final.
> For example I made a test with quickstart-16.0/mail/.
> When omitting the line
> *message.setFrom(new InternetAddress(from));*
> Sending mail fails with:
> com.sun.mail.smtp.SMTPSendFailedException: 554-Transaction failed
> 554 Unauthorized sender address.
> I have the same issue when replacing the line above with
> message.setFrom(new InternetAddress());
> I am pretty sure that this is working in wildfly-15
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list