tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elw...@fanuc.de
Subject Null Pointer Exception: SendMailServlet Example
Date Thu, 23 Jan 2003 13:50:44 GMT
Hi all,

for me it looks very strange but maybe you can help.
I try to run the SendMailServlet which comes with the Tomcat examples.

I'm using Tomcat 4.1.18 with j2sdk1.4.1_01 on a Mandrake Linux 9.0 server.
After starting Tomcat and submit the SendMail.jsp from the examples I get
the following
Null Pointer exception printed below.
Debuging let me find out that  this happens when Transport.send(message) is
called.
If I try to submit the jsp again the Null Pointer exception doesn't occur,
I think the Transport.send
method or the servlet is still bussy. After restarting Tomcat I have the
same situation.
 First submit results in the Null Pointer exception. Second submit hangs.

Running Tomcat 4.1.18 with same jdk on a Windows 2000 Server the examples
runs without any problems.

Both servers are in the same network and the same smtp server is defined in
server.xml.

Any help is highly appreciated .

Kind regards.

Marcus Elwert
E-Business Consultant
Fanuc Germany GmbH
Bernhäuserstr. 22
73765 Neuhausen / Germany
Phone +49 7158 187 321
Fax       +49 7158 187 422
eMail   Elwert.Marcus@fanuc.de



ENCOUNTERED EXCEPTION: java.lang.NullPointerException
java.lang.NullPointerException
             at java.net.InetAddress.cacheAddress(InetAddress.java:648)
             at java.net.InetAddress.cacheAddress(InetAddress.java:633)
             at
java.net.InetAddress.getAddressFromNameService(InetAddress.java:1016)
             at java.net.InetAddress.getLocalHost(InetAddress.java:1125)
             at
javax.mail.internet.InternetAddress.getLocalAddress(InternetAddress.java:472)

             at
javax.mail.internet.UniqueValue.getUniqueMessageIDValue(UniqueValue.java:70)

             at
javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:1844)
             at
javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1822)
             at javax.mail.Transport.send(Transport.java:80)
             at SendMailServlet.doPost(SendMailServlet.java:78)
             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)









--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message