[ http://jira.codehaus.org/browse/CONTINUUM-1022?page=comments#action_81382
]
Napoleon Esmundo C. Ramirez commented on CONTINUUM-1022:
--------------------------------------------------------
The validation mail now uses JNDI to locate the mail service. However the
codes at the trunk isn't configured yet to make jetty:run work.
To configure continuum to use the JNDI mail resource, I added the following in
continuum-webapp/src/jetty-env.xml:
<New id="validation_mail" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>mail/Session</Arg>
<Arg>
<New class="org.mortbay.naming.factories.MailSessionReference">
<Set name="user">username</Set>
<Set name="password">password</Set>
<Set name="properties">
<New class="java.util.Properties">
<Put name="mail.smtp.host">smtp.host.org</Put>
<Put name="mail.from">[EMAIL PROTECTED]</Put>
<Put name="mail.senderName">Continuum</Put>
<Put name="mail.debug">true</Put>
</New>
</Set>
</New>
</Arg>
</New>
I also added the following in continuum-webapp/src/main/webapp/WEB-INF/web.xml:
<resource-ref>
<res-ref-name>mail/Session</res-ref-name>
<res-type>javax.mail.Session</res-type>
<res-auth>Container</res-auth>
</resource-ref>
Which led me to another problem described by the following stack trace:
DEBUG: JavaMail version 1.4ea
DEBUG: java.io.FileNotFoundException:
/usr/share/jdk1.5.0_06/jre/lib/javamail.providers (No such file or directory)
DEBUG: !anyLoaded
DEBUG: not loading resource: /META-INF/javamail.providers
DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name:
{com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun
Microsystems, Inc],
com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc],
com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun
Microsystems, Inc],
com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun
Microsystems, Inc],
com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun
Microsystems, Inc],
com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun
Microsystems, Inc]}
DEBUG: Providers Listed By Protocol:
{imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun
Microsystems, Inc],
imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun
Microsystems, Inc],
smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun
Microsystems, Inc],
pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun
Microsystems, Inc],
pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun
Microsystems, Inc],
smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc]}
DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
DEBUG: !anyLoaded
DEBUG: not loading resource: /META-INF/javamail.address.map
DEBUG: java.io.FileNotFoundException:
/usr/share/jdk1.5.0_06/jre/lib/javamail.address.map (No such file or directory)
2006-11-29 16:26:29,745 [btpool0-4] ERROR Mailer -
Unable to generate email for template
'org/codehaus/plexus/security/ui/web/mail/template/newAccountValidationEmail.vm':
javax.mail.Session
java.lang.ClassCastException: javax.mail.Session
at
org.codehaus.plexus.mailsender.javamail.JndiJavamailMailSender.getSession(JndiJavamailMailSender.java:52)
at
org.codehaus.plexus.mailsender.javamail.AbstractJavamailMailSender.send(AbstractJavamailMailSender.java:62)
at
org.codehaus.plexus.security.ui.web.mail.Mailer.sendMessage(Mailer.java:237)
at
org.codehaus.plexus.security.ui.web.mail.Mailer.sendVelocityEmail(Mailer.java:165)
at
org.codehaus.plexus.security.ui.web.mail.Mailer.sendAccountValidationEmail(Mailer.java:108)
at
org.codehaus.plexus.security.ui.web.action.RegisterAction.register(RegisterAction.java:183)
Any ideas about this? Or did I miss on some configuration?
> Validaiton Email not working
> ----------------------------
>
> Key: CONTINUUM-1022
> URL: http://jira.codehaus.org/browse/CONTINUUM-1022
> Project: Continuum
> Issue Type: Bug
> Components: Web interface
> Reporter: Franz Allan Valencia See
>
> The validation email sent when you register is not working.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira