Hi,
Is there any way to get people like this with non-working accounts off the list? It's kind of annoying when posting a message to get all these mailer-program replies in your inbox.
Looks like this guy's address is [EMAIL PROTECTED]
I haven't been able to find anything about this sort of thing in the mailing list guidelines. Is there a human list manager that can be contacted?
Greetings, Frans
[EMAIL PROTECTED] wrote:
The attached message had PERMANENT fatal delivery errors!
After one or more unsuccessful delivery attempts the attached message has been removed from the mail queue on this server. The number and frequency of delivery attempts are determined by local configuration parameters.
YOUR MESSAGE WAS NOT DELIVERED TO ANY OF IT'S RECIPIENTS!
--- Session Transcript ---
Parsing Message <C:\MDAEMON\REMOTEQ\pd50010711509.msg>
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Mysterious null pointer exception
Message-ID: <[EMAIL PROTECTED]>
Route slip host: 194.85.58.3
Route slip port: 25
Attempting SMTP connection to [194.85.58.3 : 25]
Waiting for socket connection...
Socket connection established (10.1.1.20 : 3416 -> 194.85.58.3 : 25)
Waiting for protocol initiation...
<-- 220 tlscom.tlsoft.ru ESMTP Sendmail 8.9.2/8.9.2; Thu, 29 Jul 2004 11:41:01 +0400 (MSK)
--> EHLO tlsoft.ru
<-- 250-tlscom.tlsoft.ru Hello mod1.tlsoft.ru [10.1.1.20], pleased to meet you
<-- 250-EXPN
<-- 250-VERB
<-- 250-8BITMIME
<-- 250-SIZE
<-- 250-DSN
<-- 250-ONEX
<-- 250-ETRN
<-- 250-XUSR
<-- 250 HELP
--> MAIL From:<[EMAIL PROTECTED]> SIZE=8515
<-- 451 <[EMAIL PROTECTED]>... Sender domain must resolve
--> QUIT
Attempting to send message to gateway.
Attempting SMTP connection to [213.247.208.6 : 25]
Waiting for socket connection...
Socket connection established (213.247.208.17 : 3420 -> 213.247.208.6 : 25)
Waiting for protocol initiation...
<-- 220 mx10.1baza.ru ESMTP CommuniGate Pro 4.0.2 is glad to see you!
--> EHLO tlsoft.ru
<-- 250-mx10.1baza.ru no DNS A-data returned tlsoft.ru
<-- 250-HELP
<-- 250-PIPELINING
<-- 250-ETRN
<-- 250-DSN
<-- 250-TURN
<-- 250-ATRN
<-- 250-SIZE 31457280
<-- 250-STARTTLS
<-- 250-AUTH=LOGIN
<-- 250-AUTH LOGIN PLAIN CRAM-MD5 DIGEST-MD5 MSN
<-- 250 EHLO
--> MAIL From:<[EMAIL PROTECTED]> SIZE=8515
<-- 250 [EMAIL PROTECTED] sender accepted
--> RCPT To:<[EMAIL PROTECTED]>
<-- 551 [EMAIL PROTECTED] failed to route the address
--- End Transcript ---
: Message contains [1] file attachments
------------------------------------------------------------------------
Subject: Re: Mysterious null pointer exception From: Frans Flippo <[EMAIL PROTECTED]> Date: Thu, 29 Jul 2004 09:42:09 +0200 To: Tomcat Users List <[EMAIL PROTECTED]>
Try debugging.
You have two options.
1) Insert System.out.println() statements in your code printing out references that might be null. This should point you in the right direction.
2) Use the Java Debugger (jdb) to debug your servlet. Start as jdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=8000
Make sure you've started Tomcat as ./catalina.sh jpda run
(JPDA means debugging is turned on).
Then place a breakpoint in your code in a place you know is still working. Then step through your code from there. (Use 'next' to go to the next line of code on the same level, 'step' to step into a method).
Of course, you could also use a combination of 1) and 2).
Good luck, Frans
Vamsee Kanakala wrote:
Hello list users,
Maybe this is not the best place to ask a general servlet doubt, but I'm hoping someone can point out the mistake I'm making. I'm attaching a servlet file (FetchEmployeeServlet.java), which for some strange reason, gives a Null-Pointer Exception when accessing a function. This tells me that the class is not instantiated or something, but I'm new to servlets, so I can't figure out why.
TIA, Vamsee.
------------------------------------------------------------------------
package com.vamsee.empdb;
import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.sql.*; import javax.sql.*; import java.util.*; import javax.naming.*;
public class FetchEmployeeServlet extends HttpServlet { private Connection conn = null; private ServletContext context; private PreparedStatement pstmt = null;
public void init(ServletConfig config) throws ServletException { super.init(config); context = config.getServletContext();
try {
Context initContext = new InitialContext();
Context envContext = (Context)initContext.lookup("java:comp/env");
if (envContext == null)
throw new Exception("Panic: No Context!");
DataSource ds = (DataSource)envContext.lookup("jdbc/empdb");
if (ds != null) { Connection conn = ds.getConnection(); } } catch (Exception e) { e.printStackTrace(); } }
public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { String jsp; String cmd = req.getParameter("cmd"); String idString = req.getParameter("id"); int id;
try { id = Integer.parseInt(idString); } catch (NumberFormatException e) { id = 0; }
if ("get".equals(cmd)) { EmployeeBean bean = this.fetchEmployee(id); req.setAttribute("employee", bean); jsp = "/employee.jsp"; } else { List list = this.fetchAll(); req.setAttribute("list", list); jsp = "/list.jsp"; } RequestDispatcher dispatcher; dispatcher = context.getRequestDispatcher(jsp); dispatcher.forward(req, res); }
public EmployeeBean makeBean(ResultSet results) throws SQLException {
EmployeeBean bean = new EmployeeBean(results.getInt("id")); bean.setFirstName(results.getString("fname")); bean.setLastName(results.getString("lname")); bean.setEmail(results.getString("email")); bean.setDepartment(results.getString("department")); bean.setImage(results.getString("image"));
return bean; }
public EmployeeBean fetchEmployee(int id) { EmployeeBean bean = null; try { ResultSet results; String sql = "select * from people_table where id = ?"; PreparedStatement pstmt = conn.prepareStatement(sql);
synchronized (pstmt) { pstmt.clearParameters(); pstmt.setInt(1, id); results = pstmt.executeQuery(); }
if (results.next()) bean = makeBean(results);
if (results != null) results.close();
} catch (SQLException se) { se.printStackTrace(); }
return bean; }
public List fetchAll() { List list = new ArrayList(); try {
ResultSet results; Statement st = conn.createStatement(); System.out.println("Okay until create statement"); results = st.executeQuery("select * from people_table"); System.out.println("Okay until execute query");
while (results.next()) list.add(makeBean(results)); } catch (SQLException se) { se.printStackTrace(); } return list; }
public void destroy() { try { if (conn != null) conn.close(); } catch (SQLException e) { } } }
------------------------------------------------------------------------
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Quinity : Your Partner In eBusiness Solution Delivery
Biltstraat 449 3572 AW Utrecht P.O. Box 13097 3507 LB Utrecht The Netherlands
Telephone: (+31) (0)30 2335999 Fax : (+31) (0)30 2335998 WWW : http://www.quinity.com ================================================================ The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Quinity is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt. ================================================================
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
