You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David Diskin <da...@verizon.net> on 2002/12/28 22:32:09 UTC
Newbie: Java Mail Problem
I've just set up Tomcat 4.1.18 on my Windows XP Home PC. I installed
it as a service. I have no problem connecting to the Tomcat main web
page. I reconfigured conf/server.xml and changed to value of
mail.smtp.host to "smtp.verizon.net", my isp mail server. However,
when I go to run the jsp send mail example, I get the following
exception. Can anyone help on this?
======================================================
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:260)
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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
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.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:170)
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.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.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:432)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:536)
Re: Ant Build Script Fails to Invoke Manager with "install"
command
Posted by Paul Campbell <se...@halcyon.com>.
Did you update conf/web.xml to add a manager username/password/role?
401 means unathorized access to a password protected page
At 12:21 AM 12/31/2002 -0500, you wrote:
>Can anyone suggest what's wrong? As a relative newbie, I've been modifying and using the example build.xml file provided with the tomcat-docs. I am using it from Intellij IDEA. It's working fine, except I can't get the install target to work. The catalina-ant.jar file has been added to the Build File Properties Additional Classpath in IDEA's Ant Dialog.
>
>I am getting a http 401 authentication error. I have provided a build.properties file in the top level directory and Ant seems to find it ok.
>
>I see the message: "Loading c:\Projects\BookClubEmail\build.properties"
>
>Here's the build.properties file:
>
>manager.password="lydlyd"
>manager.username="diskind"
>
>Here's the text version of the ANT IDEA Message Window:
>
>install
>C:\Projects\BookClubEmail\build.xml:367: java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost:8080/manager/install?path=%2FBookClubEmail&war=file%3A%2F%2FC%3A%5CProjects%5CBookClubEmail%2Fbuild
>C:\Projects\BookClubEmail\build.xml:367: java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost:8080/manager/install?path=%2FBookClubEmail&war=file%3A%2F%2FC%3A%5CProjects%5CBookClubEmail%2Fbuild
>C:\Projects\BookClubEmail\build.xml:367: java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost:8080/manager/install?path=%2FBookClubEmail&war=file%3A%2F%2FC%3A%5CProjects%5CBookClubEmail%2Fbuild
>
>Build completed with 3 errors. Time: 11 s
>
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Ant Build Script Fails to Invoke Manager with "install" command
Posted by David Diskin <da...@verizon.net>.
Can anyone suggest what's wrong? As a relative newbie, I've been
modifying and using the example build.xml file provided with the
tomcat-docs. I am using it from Intellij IDEA. It's working fine,
except I can't get the install target to work. The catalina-ant.jar
file has been added to the Build File Properties Additional Classpath in
IDEA's Ant Dialog.
I am getting a http 401 authentication error. I have provided a
build.properties file in the top level directory and Ant seems to find
it ok.
I see the message: "Loading c:\Projects\BookClubEmail\build.properties"
Here's the build.properties file:
manager.password="lydlyd"
manager.username="diskind"
Here's the text version of the ANT IDEA Message Window:
install
C:\Projects\BookClubEmail\build.xml:367: java.io.IOException: Server
returned HTTP response code: 401 for URL:
http://localhost:8080/manager/install?path=%2FBookClubEmail&war=file%3A%2F%2FC%3A%5CProjects%5CBookClubEmail%2Fbuild
C:\Projects\BookClubEmail\build.xml:367: java.io.IOException: Server
returned HTTP response code: 401 for URL:
http://localhost:8080/manager/install?path=%2FBookClubEmail&war=file%3A%2F%2FC%3A%5CProjects%5CBookClubEmail%2Fbuild
C:\Projects\BookClubEmail\build.xml:367: java.io.IOException: Server
returned HTTP response code: 401 for URL:
http://localhost:8080/manager/install?path=%2FBookClubEmail&war=file%3A%2F%2FC%3A%5CProjects%5CBookClubEmail%2Fbuild
Build completed with 3 errors. Time: 11 s
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Newbie: Java Mail Problem
Posted by David Diskin <da...@verizon.net>.
yes, I stopped and restarted the Tomcat service.
Denis Haskin wrote:
> From the error, looks like it's still trying to connect to an smtp
> server at localhost. Did you restart Tomcat after changing
> mail.smtp.host?
>
> dwh
>
> David Diskin wrote:
>
>> I've just set up Tomcat 4.1.18 on my Windows XP Home PC. I
>> installed it as a service. I have no problem connecting to the
>> Tomcat main web page. I reconfigured conf/server.xml and changed to
>> value of mail.smtp.host to "smtp.verizon.net", my isp mail server.
>> However, when I go to run the jsp send mail example, I get the
>> following exception. Can anyone help on this?
>> ======================================================
>> 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
>>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Newbie: Java Mail Problem
Posted by Denis Haskin <de...@haskinferguson.net>.
From the error, looks like it's still trying to connect to an smtp
server at localhost. Did you restart Tomcat after changing mail.smtp.host?
dwh
David Diskin wrote:
> I've just set up Tomcat 4.1.18 on my Windows XP Home PC. I
> installed it as a service. I have no problem connecting to the Tomcat
> main web page. I reconfigured conf/server.xml and changed to value of
> mail.smtp.host to "smtp.verizon.net", my isp mail server. However,
> when I go to run the jsp send mail example, I get the following
> exception. Can anyone help on this?
> ======================================================
> 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
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Newbie: Java Mail Problem
Posted by Paul Campbell <se...@halcyon.com>.
In/localhost:8080/examples/jsp/mail/sendmail.txt
it notes that the assumption is that no user authentication is required.
Is it reasonable to assume that verizon.net will expect user authentication?
----------------------------------------------------------------------
<title>Example Mail Sending Form</title>
</head>
<body bgcolor="white">
<p>This page will send an electronic mail message via the
<code>javax.mail.Session</code> resource factory that is configured into
the JNDI context for this web application. Before it can be used
successfully, you must take note of the following:</p>
<ul>
<li>The default configuration assumes that there is an SMTP server running
on <strong>localhost</strong>. If this is not the case, edit your
<code>conf/server.xml</code> file and change the value for the
<code>mail.smtp.host</code> parameter to the name of a host that provides
SMTP service for your network.</li>
<li>The application logic assumes that no user authentication is required
by your SMTP server before accepting mail messages to be sent.</li>
At 04:32 PM 12/28/2002 -0500, you wrote:
>I've just set up Tomcat 4.1.18 on my Windows XP Home PC. I installed it as a service. I have no problem connecting to the Tomcat main web page. I reconfigured conf/server.xml and changed to value of mail.smtp.host to "smtp.verizon.net", my isp mail server. However, when I go to run the jsp send mail example, I get the following exception. Can anyone help on this?
>======================================================
>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
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Newbie: Java Mail Problem
Posted by Steve R Burrus <bu...@yahoo.com>.
David, u might call or label yourself a "Newbie", but you got me beat on being
able to connect Tomcat to the Apache Server!! How the hell do you do it?!!
Incidentally, I have the version 4.1.16 of tomcat, and the version 2.04* of the
Apache HTTP server FYI!
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>