Put 127.0.0.1 localhost
in your hosts file. John > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 23, 2003 10:20 AM > To: Tomcat Users List > Subject: RE: Null Pointer Exception: SendMailServlet Example > > > > John, > > I think you are right. > resolving localhost doesn't work. > Trying to fix ... > > > Thanks > > Marcus > > 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 [EMAIL PROTECTED] > > > > > > > "Turner, John" > > <[EMAIL PROTECTED]> To: > 'Tomcat Users List' <[EMAIL PROTECTED]> > cc: > > 23.01.2003 15:12 Subject: RE: > Null Pointer Exception: SendMailServlet Example > Please respond to > > "Tomcat Users > > List" > > > > > > > > > > > java.net.InetAddress.getAddressFromNameService(InetAddress.java:1016) > at > java.net.InetAddress.getLocalHost(InetAddress.java:1125) > at > javax.mail.internet.InternetAddress.getLocalAddress(InternetAd > dress.java:472 > > ) > > Looks to me like you have some name resolution problems, such > as not being > able to resolve localhost to 127.0.0.1, or not being able to resolve > whatever mail host you're using to a valid IP address. > > John > > > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, January 23, 2003 8:51 AM > > To: [EMAIL PROTECTED] > > Subject: Null Pointer Exception: SendMailServlet Example > > > > > > 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 [EMAIL PROTECTED] > > > > > > > > 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(InternetAd > > dress.java:472) > > > > at > > javax.mail.internet.UniqueValue.getUniqueMessageIDValue(Unique > > Value.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.internalDoFilt > > er(ApplicationFilterChain.java:247) > > > > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli > > cationFilterChain.java:193) > > > > at > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardW > > rapperValve.java:260) > > > > at > > org.apache.catalina.core.StandardPipeline$StandardPipelineValv > > eContext.invokeNext(StandardPipeline.java:643) > > > > at > > org.apache.catalina.core.StandardPipeline.invoke(StandardPipel > > ine.java:480) > > at > > > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) > > at > > org.apache.catalina.core.StandardContextValve.invoke(StandardC > > ontextValve.java:191) > > > > at > > org.apache.catalina.core.StandardPipeline$StandardPipelineValv > > eContext.invokeNext(StandardPipeline.java:643) > > > > at > > org.apache.catalina.authenticator.AuthenticatorBase.invoke(Aut > > henticatorBase.java:493) > > > > at > > org.apache.catalina.core.StandardPipeline$StandardPipelineValv > > eContext.invokeNext(StandardPipeline.java:641) > > > > at > > org.apache.catalina.core.StandardPipeline.invoke(StandardPipel > > ine.java:480) > > at > > > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) > > at > > org.apache.catalina.core.StandardContext.invoke(StandardContex > > t.java:2415) > > at > > org.apache.catalina.core.StandardHostValve.invoke(StandardHost > > Valve.java:180) > > > > at > > org.apache.catalina.core.StandardPipeline$StandardPipelineValv > > eContext.invokeNext(StandardPipeline.java:643) > > > > at > > org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi > > spatcherValve.java:170) > > > > at > > org.apache.catalina.core.StandardPipeline$StandardPipelineValv > > eContext.invokeNext(StandardPipeline.java:641) > > > > at > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport > > Valve.java:172) > > > > at > > org.apache.catalina.core.StandardPipeline$StandardPipelineValv > > eContext.invokeNext(StandardPipeline.java:641) > > > > at > > org.apache.catalina.core.StandardPipeline.invoke(StandardPipel > > ine.java:480) > > at > > > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) > > at > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEn > > gineValve.java:174) > > > > at > > org.apache.catalina.core.StandardPipeline$StandardPipelineValv > > eContext.invokeNext(StandardPipeline.java:643) > > > > at > > org.apache.catalina.core.StandardPipeline.invoke(StandardPipel > > ine.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(Http11Process > > or.java:432) > > at > > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle > > r.processConnection(Http11Protocol.java:386) > > > > at > > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoi > > nt.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:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- > To unsubscribe, e-mail: < > mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: < > mailto:[EMAIL PROTECTED]> > > > > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
