[CONF-user] JNDI Mail Session

Subject:   [CONF-user] JNDI Mail Session (find more)
From:   Dan Hardiker <hidden> (find more)
Date:   Nov 01, 2005 05:40

Hi,
 
I am running Confluence 1.4.4 on Resin 3.0.14 - I have upgraded the  
javamail jar file in resin/lib from 1.2 to 1.3 (same as Confluence  
1.4.4). I have also removed activation*.jar and javamail*.jar from  
confluence/WEB-INF/lib. I have defined the following in my  
conf/resin.conf inside of the <server> element (I want all confluence's  
to use the same JNDI resource):
 
    <!-- JNDI Mail Session -->
    <resource jndi-name="mailer">
        <type>javax.mail.Session</type>
        <init>
            <mail.transport.protocol>smtp</mail.transport.protocol>
            <mail.smtp.host>mail.gradwell.net</mail.smtp.host>
            <mail.smtp.auth>true</mail.smtp.auth>
            <mail.smtp.port>25</mail.smtp.port>
            
<mail.smtp.user>hidden</mail.smtp.user>
            <password>*ommited*</password>
            <mail.debug>true</mail.debug>
        </init>
    </resource>
 
When starting up resin I get the following:
 
dhardiker@serenity:/usr/local/ngc/resin> sudo bin/httpd.sh
Resin-3.0.14 (built Tue, 05 Jul 2005 11:03:36 PDT)
Copyright(c) 1998-2004 Caucho Technology.  All rights reserved.
 
  Using Resin(R) Open Source under the GNU Public License (GPL).
 
  See http://www.caucho.com for information on Resin Professional,
  including caching, clustering, JNI acceleration, and OpenSSL integration.
 
Starting Resin on Tue, 01 Nov 2005 11:39:23 +0000 (GMT)
 
DEBUG: JavaMail version 1.3
DEBUG: java.io.FileNotFoundException:  
/usr/java/jdk1.5.0_05/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.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,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:  
{imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun  
Microsystems, Inc],  
pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,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/java/jdk1.5.0_05/jre/lib/javamail.address.map (No such file or  
directory)
[11:39:24.909] Server[] starting
[11:39:24.943] http listening to serenity.hardiker.net:80
[11:39:24.966] hmux listening to localhost:6802
[11:39:25.016] Host[] starting
[11:39:25.125] WebApp[http://217.155.211.1:80] starting
[11:39:25.879] WebApp[http://217.155.211.1:80/resin-doc] starting
[11:39:26.013] Host[wiki-dev.adaptavist.com] starting
[11:39:26.814] WebApp[http://wiki-dev.adaptavist.com] starting
2005-11-01 11:39:28,670 INFO [com.atlassian.confluence.lifecycle]  
Starting Confluence 1.4.4 (build #221)
[11:39:28.685] Loading root WebApplicationContext
2005-11-01 11:39:34,283 WARN [sf.hibernate.cache.EhCacheProvider] Could  
not find configuration [net.sf.hibernate.cache.StandardQueryCache];  
using defaults.
[11:39:43.540] action: init
[11:39:43.663] velocity: init
[11:39:44.559] simple-display: init
[11:39:44.560] tiny-url: init
[11:39:44.576] file-server: init
[11:39:44.577] xmlrpc: init
[11:39:44.583] glue-soap: init
[11:39:44.584] axis-soap: init
[11:39:44.584] servlet-module-container-servlet: init
[Filter: profiling] Using parameter [profile]
[Filter: profiling] defaulting to off [autostart=false]
[Filter: profiling] Turning filter off [profile=off]
2005-11-01 11:40:31,759 ERROR [mail.server.impl.SMTPMailServerImpl] Mail  
server at location [mailer] is not of required type javax.mail.Session.  
It is of type: [null] instead
 
I have set the JNDI Location in confluence's Mail Server configuration  
to "mailer". However when I go to "Send Test Email" I get the following  
in stdout:
 
2005-11-01 11:33:58,860 ERROR [mail.server.impl.SMTPMailServerImpl] Mail  
server at location [mailer] is not of required type javax.mail.Session.  
It is of type: [null] instead
 
and the web browser shows the following stack trace in the Log box:
 
An error has occurred with sending the test email:
java.lang.IllegalArgumentException: Mail server at location [mailer] is  
not of required type javax.mail.Session.
    at  
com.atlassian.mail.server.impl.SMTPMailServerImpl.getSession(SMTPMailServerImpl.java:104)
    at  
com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:155)
    at  
com.atlassian.confluence.admin.actions.mail.SendTestEmailAction.execute(SendTestEmailAction.java:52)
    at  
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)
    at  
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
    at  
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
    at  
com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.intercept(DefaultWorkflowInterceptor.java:55)
    at  
com.atlassian.confluence.core.ConfluenceWorkflowInterceptor.intercept(ConfluenceWorkflowInterceptor.java:33)
    at  
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
    at  
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
    at  
com.atlassian.confluence.core.ConfluenceValidationInterceptor.intercept(ConfluenceValidationInterceptor.java:16)
    at  
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
    at  
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
    at  
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
    at  
com.atlassian.confluence.security.actions.PermissionCheckInterceptor.intercept(PermissionCheckInterceptor.java:40)
    at  
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
    at  
com.atlassian.confluence.pages.actions.PageAwareInterceptor.intercept(PageAwareInterceptor.java:87)
    at  
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
    at  
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
    at  
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
    at  
com.atlassian.confluence.core.ConfluenceAutowireInterceptor.intercept(ConfluenceAutowireInterceptor.java:25)
    at  
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
    at  
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
    at  
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
    at  
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
    at  
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
    at  
com.atlassian.confluence.util.XWorkTransactionInterceptor.intercept(XWorkTransactionInterceptor.java:133)
    at  
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
    at  
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
    at  
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
    at  
com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:115)
    at  
com.opensymphony.webwork.dispatcher.ServletDispatcher.serviceAction(ServletDispatcher.java:229)
    at  
com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:199)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:92)
    at  
com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:99)
    at  
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
    at  
com.atlassian.confluence.util.profiling.ProfilingPageFilter.parsePage(ProfilingPageFilter.java:150)
    at  
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
    at  
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
    at  
com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:168)
    at  
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
    at  
com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:181)
    at  
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
    at  
com.atlassian.johnson.filters.JohnsonFilter.doFilter(JohnsonFilter.java:96)
    at  
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
    at  
org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:170)
    at  
bucket.custom.FlushingSpringSessionInViewFilter.doFilterInternal(FlushingSpringSessionInViewFilter.java:31)
    at  
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:73)
    at  
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
    at  
com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:132)
    at  
com.atlassian.confluence.util.error.ProfilingAndErrorFilter.doFilter(ProfilingAndErrorFilter.java:27)
    at  
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
    at  
com.atlassian.core.filters.gzip.GzipFilter.doFilter(GzipFilter.java:61)
    at  
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
    at  
com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:36)
    at  
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
    at  
com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:163)
    at  
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:208)
    at  
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:259)
    at com.caucho.server.port.TcpConnection.run(TcpConnection.java:363)
    at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:490)
    at com.caucho.util.ThreadPool.run(ThreadPool.java:423)
    at java.lang.Thread.run(Thread.java:595)
 
Any ideas?
-
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
confluence-user details available at:
http://www.atlassian.com/software/confluence/mailinglist.jsp
~
Unsubscribing:
To unsubscribe yourself from the list, send an email to hidden (not hidden) containing the line (in the body of the message):
unsubscribe
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Entire Thread (Showing 2 of 2)

  • [CONF-user] JNDI Mail Session Dan Hardiker <hidden>
    • Re: [CONF-user] JNDI Mail Session Dan Hardiker <hidden>

      different error all together. I have checked the login details provided and they are valid (infact I am using them to send this email through Thunderbird). There is nothing of interest in the resin logs, and the exception returned in the web interface log when ...