tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raimee Stevens <raimee_stev...@yahoo.com>
Subject Re: ROOT context fails to use mail/Session Resource param. defaults to localhost
Date Thu, 10 Jul 2003 12:44:26 GMT
Windows 2000, Tomcat 4.1.24, Sun J2SDK1.4.1_02

Raimee Stevens <raimee_stevens@yahoo.com> wrote:
I am not able to use the JNDI mail Factory from the ROOT context. It works when

run from the examples context and other non-ROOT contexts as well. For some reason,

the ROOT context fails to correctly load the SMTP host variable defined by the JNDI

resource in the server.xml(below). It does however register in the Context log (below) with
the correct value.

> Exception Log 

ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending failed; nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested
exception is: java.net.ConnectException: Connection refused: connect 

javax.mail.SendFailedException: Sending failed;
nested exception is: 
javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
nested exception is: 
java.net.ConnectException: Connection refused: connect
at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)
at SendMailServlet.doPost(SendMailServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:376)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve.java:221)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)

> web.xml



ROOT Context





SendMailServlet

SendMailServlet





SendMailServlet

/SendMailServlet





mail/Session

javax.mail.Session

Container






>server.xml














mail.smtp.host










>Context FileLogger output shows that JNDI naming context was correctly initialized with
correct host name: ()

2003-07-09 14:37:41 NamingContextListener[/Standalone/myhostname]: Creating JNDI naming context
2003-07-09 14:37:41 NamingContextListener[/Standalone/myhostname]: Resource parameters for
mail/Session = ResourceParams[name=mail/Session, parameters={mail.smtp.host=}]
2003-07-09 14:37:41 NamingContextListener[/Standalone/myhostname]: Adding resource ref mail/Session
2003-07-09 14:37:41 NamingContextListener[/Standalone/myhostname]: ResourceRef[className=javax.mail.Session,factoryClassLocation=null,factoryClassName=org.apache.naming.factory.ResourceFactory,{type=scope,content=Shareable},{type=auth,content=Container},{type=mail.smtp.host,content=}]
2003-07-09 14:37:41 NamingContextListener[/Standalone/myhostname]: Resource parameters for
UserTransaction = null


I didn't see a similar item in the bugs database. Has this problem been addressed? 






-----------------------------
Yours Truly,
Raimee

---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!


-----------------------------
 Yours Truly,
 Raimee

---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message