You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by se...@james.apache.org on 2004/08/18 14:46:20 UTC

[jira] Created: (JAMES-318) java.lang.NullPointerException when host is unknown

Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JAMES-318

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JAMES-318
    Summary: java.lang.NullPointerException when host is unknown
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: James
 Components: 
             Remote Delivery
   Versions:
             2.2.0

   Assignee: 
   Reporter: Hes Siemelink

    Created: Wed, 18 Aug 2004 5:44 AM
    Updated: Wed, 18 Aug 2004 5:44 AM

Description:
I encountered the following NullPointerException:

18/08/04 14:29:59 INFO  James.Mailet             : RemoteDelivery: Unknown gateway host: unknown host
18/08/04 14:29:59 INFO  James.Mailet             : RemoteDelivery: This could be a DNS server error or configuration error.
18/08/04 14:29:59 INFO  James.Mailet             : RemoteDelivery: Exception caught in RemoteDelivery.run()
java.lang.NullPointerException
	at org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:409)
	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:912)
	at java.lang.Thread.run(Thread.java:534)


This is caused by logging information about a HostAddress that happens to be null. 

The HostAddress is null because I had a misconfiguration in my config.xml: a gateway server that could not be found.
I fixed the issue for myself by entering the correct host name.

Still, NullPointerExceptions are a bad sign. 

Also, the message seems to disappear from the queue. I can't find it in the spool directory and there is no attempt of delivery after a restart.
In other words, I seem to observe that a message gets lost when this occurs.




---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-318) java.lang.NullPointerException when host is unknown

Posted by se...@james.apache.org.
The following comment has been added to this issue:

     Author: Hes Siemelink
    Created: Thu, 19 Aug 2004 4:10 AM
       Body:
Messages do get lost when this occurs. 
Looking at the exception handling in RemoteDelivery.run() it makes sense, but I think it is unwanted behavior.

I think the best way to solve this is to explicitly check for null:

In RemoteDelivery.deliver(), add the following

            while ( targetServers.hasNext()) {
                try {
                    HostAddress outgoingMailServer = (HostAddress) targetServers.next();

// line 409:                    
+                    if (outgoingMailServer == null) {
+                     continue;
+                    }
                    
                    StringBuffer logMessageBuffer =
                        new StringBuffer(256)
                        .append("Attempting delivery of ")
                        .append(mail.getName())
                        .append(" to host ")
                        .append(outgoingMailServer.getHostName())
                        .append(" at ")
                        .append(outgoingMailServer.getHost())
                        .append(" to addresses ")
                        .append(Arrays.asList(addr));
                    log(logMessageBuffer.toString());

(Sorry, don't have time now to setup cvs/diff/patch)

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/JAMES-318?page=comments#action_37331

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JAMES-318

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JAMES-318
    Summary: java.lang.NullPointerException when host is unknown
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: James
 Components: 
             Remote Delivery
   Versions:
             2.2.0

   Assignee: 
   Reporter: Hes Siemelink

    Created: Wed, 18 Aug 2004 5:44 AM
    Updated: Thu, 19 Aug 2004 4:10 AM

Description:
I encountered the following NullPointerException:

18/08/04 14:29:59 INFO  James.Mailet             : RemoteDelivery: Unknown gateway host: unknown host
18/08/04 14:29:59 INFO  James.Mailet             : RemoteDelivery: This could be a DNS server error or configuration error.
18/08/04 14:29:59 INFO  James.Mailet             : RemoteDelivery: Exception caught in RemoteDelivery.run()
java.lang.NullPointerException
	at org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:409)
	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:912)
	at java.lang.Thread.run(Thread.java:534)


This is caused by logging information about a HostAddress that happens to be null. 

The HostAddress is null because I had a misconfiguration in my config.xml: a gateway server that could not be found.
I fixed the issue for myself by entering the correct host name.

Still, NullPointerExceptions are a bad sign. 

Also, the message seems to disappear from the queue. I can't find it in the spool directory and there is no attempt of delivery after a restart.
In other words, I seem to observe that a message gets lost when this occurs.




---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Resolved: (JAMES-318) java.lang.NullPointerException when host is unknown

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-318?page=all ]
     
Stefano Bagnara resolved JAMES-318:
-----------------------------------

    Fix Version: 2.3.0
     Resolution: Fixed
      Assign To: Noel J. Bergman

According to comments and cvs log this has been fixed by Noel.

> java.lang.NullPointerException when host is unknown
> ---------------------------------------------------
>
>          Key: JAMES-318
>          URL: http://issues.apache.org/jira/browse/JAMES-318
>      Project: James
>         Type: Bug
>   Components: Remote Delivery
>     Versions: 2.2.0
>     Reporter: Hes Siemelink
>     Assignee: Noel J. Bergman
>      Fix For: 2.3.0

>
> I encountered the following NullPointerException:
> 18/08/04 14:29:59 INFO  James.Mailet             : RemoteDelivery: Unknown gateway host: unknown host
> 18/08/04 14:29:59 INFO  James.Mailet             : RemoteDelivery: This could be a DNS server error or configuration error.
> 18/08/04 14:29:59 INFO  James.Mailet             : RemoteDelivery: Exception caught in RemoteDelivery.run()
> java.lang.NullPointerException
> 	at org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:409)
> 	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:912)
> 	at java.lang.Thread.run(Thread.java:534)
> This is caused by logging information about a HostAddress that happens to be null. 
> The HostAddress is null because I had a misconfiguration in my config.xml: a gateway server that could not be found.
> I fixed the issue for myself by entering the correct host name.
> Still, NullPointerExceptions are a bad sign. 
> Also, the message seems to disappear from the queue. I can't find it in the spool directory and there is no attempt of delivery after a restart.
> In other words, I seem to observe that a message gets lost when this occurs.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-318) java.lang.NullPointerException when host is unknown

Posted by se...@james.apache.org.
The following comment has been added to this issue:

     Author: Noel J. Bergman
    Created: Thu, 19 Aug 2004 8:23 PM
       Body:
There is a different fix for this in CVS.  It matches the fix already made for the same reason in the DNSServer code.  The iterator really should not return true if it won't be able to return a valid HostAddress.

This fix will be present in a test build posted tonight.  Please test and let us know if it takes care of the problem in your environment.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/JAMES-318?page=comments#action_37353

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JAMES-318

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JAMES-318
    Summary: java.lang.NullPointerException when host is unknown
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: James
 Components: 
             Remote Delivery
   Versions:
             2.2.0

   Assignee: 
   Reporter: Hes Siemelink

    Created: Wed, 18 Aug 2004 5:44 AM
    Updated: Thu, 19 Aug 2004 8:23 PM

Description:
I encountered the following NullPointerException:

18/08/04 14:29:59 INFO  James.Mailet             : RemoteDelivery: Unknown gateway host: unknown host
18/08/04 14:29:59 INFO  James.Mailet             : RemoteDelivery: This could be a DNS server error or configuration error.
18/08/04 14:29:59 INFO  James.Mailet             : RemoteDelivery: Exception caught in RemoteDelivery.run()
java.lang.NullPointerException
	at org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:409)
	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:912)
	at java.lang.Thread.run(Thread.java:534)


This is caused by logging information about a HostAddress that happens to be null. 

The HostAddress is null because I had a misconfiguration in my config.xml: a gateway server that could not be found.
I fixed the issue for myself by entering the correct host name.

Still, NullPointerExceptions are a bad sign. 

Also, the message seems to disappear from the queue. I can't find it in the spool directory and there is no attempt of delivery after a restart.
In other words, I seem to observe that a message gets lost when this occurs.




---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[jira] Commented: (JAMES-318) java.lang.NullPointerException when host is unknown

Posted by se...@james.apache.org.
The following comment has been added to this issue:

     Author: Noel J. Bergman
    Created: Thu, 19 Aug 2004 8:40 PM
       Body:
This bug was identical to JAMES-236, except for being in the gateway server iterator instead of the MX hosts iterator in the DNSServer code.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/JAMES-318?page=comments#action_37354

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JAMES-318

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JAMES-318
    Summary: java.lang.NullPointerException when host is unknown
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: James
 Components: 
             Remote Delivery
   Versions:
             2.2.0

   Assignee: 
   Reporter: Hes Siemelink

    Created: Wed, 18 Aug 2004 5:44 AM
    Updated: Thu, 19 Aug 2004 8:40 PM

Description:
I encountered the following NullPointerException:

18/08/04 14:29:59 INFO  James.Mailet             : RemoteDelivery: Unknown gateway host: unknown host
18/08/04 14:29:59 INFO  James.Mailet             : RemoteDelivery: This could be a DNS server error or configuration error.
18/08/04 14:29:59 INFO  James.Mailet             : RemoteDelivery: Exception caught in RemoteDelivery.run()
java.lang.NullPointerException
	at org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:409)
	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:912)
	at java.lang.Thread.run(Thread.java:534)


This is caused by logging information about a HostAddress that happens to be null. 

The HostAddress is null because I had a misconfiguration in my config.xml: a gateway server that could not be found.
I fixed the issue for myself by entering the correct host name.

Still, NullPointerExceptions are a bad sign. 

Also, the message seems to disappear from the queue. I can't find it in the spool directory and there is no attempt of delivery after a restart.
In other words, I seem to observe that a message gets lost when this occurs.




---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org