-
Notifications
You must be signed in to change notification settings - Fork 496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No provider for smtp #5723
Comments
Hello,
Configuration and smtp server have not be changed. Do you already have this issue? And a solution :) |
I haven't seen this issue in updating to 4.20. The smtp configuration is in glassfish, so have you tried seeing what |
@poikilotherm is proposing a much simpler and standardized (through MicroProfile Config a.k.a MPCONFIG) way to configure SMTP in the following issue: (There's no PR yest but I do see a branch: develop...poikilotherm:dataverse:7424-maildefinition ) @juancorr @tcoupin perhaps you could give feedback there. I'm hoping it prevents issues like this one. Meanwhile, is it ok to close this issue? We could all follow #7424 instead. Please let me know what you think. Thanks. |
Resolved by this pull request: |
Feedback and contact mails was not sending in e-cienciaDatos (https://edatos.consorciomadrono.es) . We obtain a NoSuchProviderException in the server.log. We have found this exception in v4.11 and v4.8.3, but not in v4.9.3.
In our current installation, code calls to MailServiceBean.sendMail (String from, String to, String subject, String messageText) and not to MailServiceBean.sendMail(String host, String reply, String to, String subject, String messageText).
We have "solved" this problem harcoding our localhost mail server:
public void sendMail(String reply, String to, String subject, String messageText, Map<Object, Object> extraHeaders) {
try {
Properties props = System.getProperties();
String host="127.0.0.1";
props.put("mail.smtp.host", host);
Session session = Session.getDefaultInstance(props, null);
Our asadmin call was:
asadmin create-javamail-resource --mailhost 127.0.0.1 --mailuser [email protected] --fromaddress [email protected] mail/notifyMailSession
javax.mail.NoSuchProviderException: No provider for smtp
at javax.mail.Session.getProvider(Session.java:479)
at javax.mail.Session.getTransport(Session.java:681)
at javax.mail.Session.getTransport(Session.java:662)
at javax.mail.Session.getTransport(Session.java:719)
at javax.mail.Transport.send0(Transport.java:248)
at javax.mail.Transport.send(Transport.java:124)
at edu.harvard.iq.dataverse.MailServiceBean.sendMail(MailServiceBean.java:205)
at edu.harvard.iq.dataverse.MailServiceBean.sendMail(MailServiceBean.java:168)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:64)
at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
at sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
at com.sun.proxy.$Proxy243.sendMail(Unknown Source)
at edu.harvard.iq.dataverse.EJB31_Generated__MailServiceBean__Intf____Bean.sendMail(Unknown Source)
at edu.harvard.iq.dataverse.SendFeedbackDialog.sendMessage(SendFeedbackDialog.java:212)
[...]
If it is a configuration problem, the mail configuration documentation could be perhaps improved
The text was updated successfully, but these errors were encountered: