Discussion:
Newbie: Java Mail Problem
David Diskin
2002-12-28 21:32:09 UTC
Permalink
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)
Steve R Burrus
2002-12-28 22:16:59 UTC
Permalink
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
Paul Campbell
2002-12-28 22:16:48 UTC
Permalink
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>
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
Denis Haskin
2002-12-28 22:29:28 UTC
Permalink
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
Post by David Diskin
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
java.net.ConnectException: Connection refused: connect
David Diskin
2002-12-28 22:41:25 UTC
Permalink
yes, I stopped and restarted the Tomcat service.
Post by Denis Haskin
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
Post by David Diskin
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
java.net.ConnectException: Connection refused: connect
--
Shawn Furgason
2002-12-29 05:59:17 UTC
Permalink
David,
A troubleshooting idea. I'd isolate this problem by ensuring you
can communicate directly via javamail. Try a simple test such as this
(in a JSP will work fine)...

String host = "smtp.verizon.net";
String from = "***@verizon.net";
String to = "***@verizon.net";

// Get system properties
Properties props = System.getProperties();

// Setup mail server
props.put("mail.smtp.host", host);

// Get session
Session mailsession = Session.getDefaultInstance(props, null);

// Define message
MimeMessage message = new MimeMessage(mailsession);

// Set the from address
message.setFrom(new InternetAddress(from));

// Set the to address
message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));

// Set the subject
message.setSubject("Test message");

// Set the content
message.setText("Testing");

// Send message
Transport.send(message);

If this works.. then I'd suspect something in TC or your config. If it
doesn't.. you might want to post this info. to the javamail list. Lots
of helpful people over there.

Good luck,
Shawn.
Post by David Diskin
yes, I stopped and restarted the Tomcat service.
Post by Denis Haskin
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
Post by David Diskin
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
java.net.ConnectException: Connection refused: connect
--
--
Burden, Parker
2002-12-30 13:56:46 UTC
Permalink
David-

It looks like something strange is happening with your configuration. I am
not familiar with the example that you are talking about, but if you look at
the exception, it looks like it is trying to connect to port 25 (smtp) of
localhost, and not your verizon SMTP server. Localhost normally resolves to
your own machine (your XP box in this case), and I doubt you have an SMTP
server running there, and thus the connection failure.

Perhaps there is another location you must use to specify the verizon
server? On a related note, be prepared to potentially have problems once
you have the example pointed to the right server. Not all servers allow
"ad-hoc" connections to their SMTP server. If you find yourself in this
boat (it pointing to verizon but still getting connection failures) let me
know and I can try to step you through debugging SMTP connectivity errors.


Parker Burden
Senior Systems Engineer JC4I/INRI/DMS
757-249-1234
***@northropgrumman.com


-----Original Message-----
From: David Diskin [mailto:***@verizon.net]
Sent: Saturday, December 28, 2002 4:32 PM
To: tomcat-***@jakarta.apache.org
Subject: 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(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:493)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.invok
eNext(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.processConne
ction(Http11Protocol.java:386)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:530)
at java.lang.Thread.run(Thread.java:536)
David Diskin
2002-12-30 17:46:40 UTC
Permalink
Parker,

Hi. What a surprise to get a reply from someone I actually know. I
"solved" the problem, but I forgot to notify the list. It turned out
that Tomcat wasn't actually shut down and restarted properly. Now, it
works fine. Have a happy New Year!

David
Post by Burden, Parker
David-
It looks like something strange is happening with your configuration. I am
not familiar with the example that you are talking about, but if you look at
the exception, it looks like it is trying to connect to port 25 (smtp) of
localhost, and not your verizon SMTP server. Localhost normally resolves to
your own machine (your XP box in this case), and I doubt you have an SMTP
server running there, and thus the connection failure.
Perhaps there is another location you must use to specify the verizon
server? On a related note, be prepared to potentially have problems once
you have the example pointed to the right server. Not all servers allow
"ad-hoc" connections to their SMTP server. If you find yourself in this
boat (it pointing to verizon but still getting connection failures) let me
know and I can try to step you through debugging SMTP connectivity errors.
Parker Burden
Senior Systems Engineer JC4I/INRI/DMS
757-249-1234
-----Original Message-----
Sent: Saturday, December 28, 2002 4:32 PM
Subject: 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
java.net.ConnectException: Connection refused: connect
javax.mail.SendFailedException: Sending failed;
localhost, port: 25;
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(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:493)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.invok
eNext(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.processConne
ction(Http11Protocol.java:386)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:530)
at java.lang.Thread.run(Thread.java:536)
--
David Diskin
2002-12-30 17:49:58 UTC
Permalink
I resolved the problem. It turns out that I had not really stopped and
restarted the Tomcat service after reconfiguring server.xml, even though
I thought I had. Now, it works fine. Thanks everyone!

David
Post by Burden, Parker
David-
It looks like something strange is happening with your configuration. I am
not familiar with the example that you are talking about, but if you look at
the exception, it looks like it is trying to connect to port 25 (smtp) of
localhost, and not your verizon SMTP server. Localhost normally resolves to
your own machine (your XP box in this case), and I doubt you have an SMTP
server running there, and thus the connection failure.
Perhaps there is another location you must use to specify the verizon
server? On a related note, be prepared to potentially have problems once
you have the example pointed to the right server. Not all servers allow
"ad-hoc" connections to their SMTP server. If you find yourself in this
boat (it pointing to verizon but still getting connection failures) let me
know and I can try to step you through debugging SMTP connectivity errors.
Parker Burden
Senior Systems Engineer JC4I/INRI/DMS
757-249-1234
-----Original Message-----
Sent: Saturday, December 28, 2002 4:32 PM
Subject: 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
java.net.ConnectException: Connection refused: connect
javax.mail.SendFailedException: Sending failed;
localhost, port: 25;
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(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:493)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.invok
eNext(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.processConne
ction(Http11Protocol.java:386)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:530)
at java.lang.Thread.run(Thread.java:536)
--
Turner, John
2002-12-30 14:39:48 UTC
Permalink
On that note, if you're using Windows 2000 and XP Professional, you can
simply install a SMTP service on your computer. It's part of IIS, though,
which means you'll have to install that if you haven't already.

If you want to see if you have it installed, goto Start->Control
Panel->Administrative Tools. If you have it installed, you should see a
shortcut there that says "Internet Information Services". Open that up, and
you can configure both IIS and any of it's related services, including SMTP.

If you don't have it installed, and want to install it, goto Start->Control
Panel->Add or Remove Programs and click on "Add/Remove Windows Components".
You'll be shown a list of things that you can install, one of which is IIS.

Might be overkill, though, and if you do install it or have it running, you
want to make EXTRA sure your computer isn't visible to the outside world on
port 25. You can configure the SMTP service to deny connections from
anything but localhost, for example.

John




-----Original Message-----
From: Burden, Parker
To: Tomcat Users List
Sent: 12/30/02 8:56 AM
Subject: RE: Newbie: Java Mail Problem

David-

It looks like something strange is happening with your configuration. I
am
not familiar with the example that you are talking about, but if you
look at
the exception, it looks like it is trying to connect to port 25 (smtp)
of
localhost, and not your verizon SMTP server. Localhost normally
resolves to
your own machine (your XP box in this case), and I doubt you have an
SMTP
server running there, and thus the connection failure.

Perhaps there is another location you must use to specify the verizon
server? On a related note, be prepared to potentially have problems
once
you have the example pointed to the right server. Not all servers allow
"ad-hoc" connections to their SMTP server. If you find yourself in this
boat (it pointing to verizon but still getting connection failures) let
me
know and I can try to step you through debugging SMTP connectivity
errors.


Parker Burden
Senior Systems Engineer JC4I/INRI/DMS
757-249-1234
***@northropgrumman.com


-----Original Message-----
From: David Diskin [mailto:***@verizon.net]
Sent: Saturday, December 28, 2002 4:32 PM
To: tomcat-***@jakarta.apache.org
Subject: 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(Applica
tion
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base
.java:493)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
5)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
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.i
nvok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
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:43
2)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onne
ction(Http11Protocol.java:386)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:53
4)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.jav
a:530)
at java.lang.Thread.run(Thread.java:536)



--
To unsubscribe, e-mail:
<mailto:tomcat-user-***@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-***@jakarta.apache.org>
David Diskin
2002-12-31 05:21:15 UTC
Permalink
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
Paul Campbell
2002-12-31 05:54:28 UTC
Permalink
Did you update conf/web.xml to add a manager username/password/role?

401 means unathorized access to a password protected page
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"
manager.password="lydlyd"
manager.username="diskind"
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
--
Loading...