You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Norman Maurer <nm...@spam-box.de> on 2006/02/14 08:26:21 UTC

NullPointer on Remotedelivery

Hi guys,

i just log in  my mailet log and see this error: 

l1139901678401-5 to host 127.0.0.1 at 127.0.0.1 for addresses
[vpopmail@hxxx]
14/02/06 08:21:19 INFO  James.Mailet: RemoteDelivery: Exception caught
in RemoteDelivery.run()
java.lang.NullPointerException
        at
com.sun.mail.smtp.SMTPTransport.convertTo8Bit(SMTPTransport.java:702)
at com.sun.mail.smtp.SMTPTransport.convertTo8Bit(SMTPTransport.java:712)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:521)
        at
org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:533)
        at
org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:1083)
        at java.lang.Thread.run(Thread.java:595)

what can be the problem ?
I use the latest james trunk version

bye





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


Re: NullPointer on Remotedelivery

Posted by Stefano Bagnara <ap...@bago.org>.
Norman Maurer wrote:
> Hi guys,
> 
> i just log in  my mailet log and see this error: 
> 
> l1139901678401-5 to host 127.0.0.1 at 127.0.0.1 for addresses
> [vpopmail@hxxx]
> 14/02/06 08:21:19 INFO  James.Mailet: RemoteDelivery: Exception caught
> in RemoteDelivery.run()
> java.lang.NullPointerException
>         at
> com.sun.mail.smtp.SMTPTransport.convertTo8Bit(SMTPTransport.java:702)
> at com.sun.mail.smtp.SMTPTransport.convertTo8Bit(SMTPTransport.java:712)
> at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:521)
>         at
> org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:533)
>         at
> org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:1083)
>         at java.lang.Thread.run(Thread.java:595)
> 
> what can be the problem ?
> I use the latest james trunk version


Javamail 1.3.2 SMTPTransport@702:
"if (enc.equalsIgnoreCase("quoted-printable") ||"
Probably you're trying to send a message with no encoding. Btw It should 
not throw an NPE!

Please post here the message your are trying to send so we can debug the 
problem.

Thank you for reporting it.

Stefano

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


Re: NullPointer on Remotedelivery

Posted by Stefano Bagnara <ap...@bago.org>.
Norman Maurer wrote:
> Its a message i get and send it to the main mailserver..
> 
> Where should the message located ?
> 
> deadletter table ?

Unfortunately generic exceptions in the delivery process ends in message 
purging:

} catch (Exception e) {
// Prevent unexpected exceptions from causing looping by removing
// message from outgoing.
// DO NOT CHNANGE THIS to catch Error!  For example, if there were an 
OutOfMemory condition
// caused because something else in the server was abusing memory, we 
would not want to
// start purging the outgoing spool!
outgoing.remove(key);
throw e;
}
} catch (Throwable e) {
if (!destroyed) log("Exception caught in RemoteDelivery.run()", e);
}


If you can find a message to reproduce the issue please post it here:
http://issues.apache.org/jira/browse/JAMES-419?page=all
We already found this javamail 1.3.2 bug and applied a workaround, but 
probably there are more conditions hitting the bug.


Stefano

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


Re: NullPointer on Remotedelivery

Posted by Norman Maurer <nm...@spam-box.de>.
Damn ok.. 


Am Dienstag, den 14.02.2006, 10:27 +0100 schrieb Stefano Bagnara:
> Norman Maurer wrote:
> > Its a message i get and send it to the main mailserver..
> > 
> > Where should the message located ?
> > 
> > deadletter table ?
> 
> Unfortunately generic exceptions in the delivery process ends in message 
> purging:
> 
> } catch (Exception e) {
> // Prevent unexpected exceptions from causing looping by removing
> // message from outgoing.
> // DO NOT CHNANGE THIS to catch Error!  For example, if there were an 
> OutOfMemory condition
> // caused because something else in the server was abusing memory, we 
> would not want to
> // start purging the outgoing spool!
> outgoing.remove(key);
> throw e;
> }
> } catch (Throwable e) {
> if (!destroyed) log("Exception caught in RemoteDelivery.run()", e);
> }
> 
> 
> If you can find a message to reproduce the issue please post it here:
> http://issues.apache.org/jira/browse/JAMES-419?page=all
> We already found this javamail 1.3.2 bug and applied a workaround, but 
> probably there are more conditions hitting the bug.
> 
> 
> Stefano
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 
> 


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


Re: NullPointer on Remotedelivery

Posted by Stefano Bagnara <ap...@bago.org>.
Norman Maurer wrote:
> But why not put the message to the error-processor so it wold be easier
> to trigger such errors.

Is not so easy: read the comment of the catch.

Eg: Now the NPE is a bug in javamail, but we can't know what to do: if 
the NPE was from the "store" of the repository then storing the message 
in the error-processor would end in an infinite loop.

We probably should change our behaviour only when the exception is 
caused by the "delivery" call.

I'll try to put in this improvement for 2.3.0a2. But I would also like 
to find out the NPE problem while working on that code.

Stefano

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


Re: NullPointer on Remotedelivery

Posted by Stefano Bagnara <ap...@bago.org>.
Norman Maurer wrote:
> Got again a Nullpointer..
> 
> is there no solution to store the email that do this ?

I plan to improve the exception handling in that code, but I don't know 
WHEN. I'm extremely busy right now. At the time I simply added this task 
to my TODO.

Stefano


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


Re: NullPointer on Remotedelivery

Posted by Norman Maurer <nm...@spam-box.de>.
Got again a Nullpointer..

is there no solution to store the email that do this ?


17/02/06 18:27:43 INFO  James.Mailet: RemoteDelivery: Exception caught
in RemoteDelivery.run()
java.lang.NullPointerException
        at
com.sun.mail.smtp.SMTPTransport.convertTo8Bit(SMTPTransport.java:702)
        at
com.sun.mail.smtp.SMTPTransport.convertTo8Bit(SMTPTransport.java:712)
        at
com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:521)
        at
org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:533)
        at
org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:1083)
        at java.lang.Thread.run(Thread.java:595)


Its quite hard to debug if the email is gone :-(

bye


Am Dienstag, den 14.02.2006, 14:03 +0100 schrieb Stefano Bagnara:
> Norman Maurer wrote:
> > But why not put the message to the error-processor so it wold be easier
> > to trigger such errors.
> 
> Is not so easy: read the comment of the catch.
> 
> Eg: Now the NPE is a bug in javamail, but we can't know what to do: if 
> the NPE was from the "store" of the repository then storing the message 
> in the error-processor would end in an infinite loop.
> 
> We probably should change our behaviour only when the exception is 
> caused by the "delivery" call.
> 
> I'll try to put in this improvement for 2.3.0a2. But I would also like 
> to find out the NPE problem while working on that code.
> 
> Stefano
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 
> 



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


Re: NullPointer on Remotedelivery

Posted by Norman Maurer <nm...@spam-box.de>.
But why not put the message to the error-processor so it wold be easier
to trigger such errors.

bye

Am Dienstag, den 14.02.2006, 10:36 +0100 schrieb Norman Maurer:
> Damn ok.. 
> 
> 
> Am Dienstag, den 14.02.2006, 10:27 +0100 schrieb Stefano Bagnara:
> > Norman Maurer wrote:
> > > Its a message i get and send it to the main mailserver..
> > > 
> > > Where should the message located ?
> > > 
> > > deadletter table ?
> > 
> > Unfortunately generic exceptions in the delivery process ends in message 
> > purging:
> > 
> > } catch (Exception e) {
> > // Prevent unexpected exceptions from causing looping by removing
> > // message from outgoing.
> > // DO NOT CHNANGE THIS to catch Error!  For example, if there were an 
> > OutOfMemory condition
> > // caused because something else in the server was abusing memory, we 
> > would not want to
> > // start purging the outgoing spool!
> > outgoing.remove(key);
> > throw e;
> > }
> > } catch (Throwable e) {
> > if (!destroyed) log("Exception caught in RemoteDelivery.run()", e);
> > }
> > 
> > 
> > If you can find a message to reproduce the issue please post it here:
> > http://issues.apache.org/jira/browse/JAMES-419?page=all
> > We already found this javamail 1.3.2 bug and applied a workaround, but 
> > probably there are more conditions hitting the bug.
> > 
> > 
> > Stefano
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> > For additional commands, e-mail: server-user-help@james.apache.org
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 
> 


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


Re: NullPointer on Remotedelivery

Posted by Norman Maurer <nm...@spam-box.de>.
Its a message i get and send it to the main mailserver..

Where should the message located ?

deadletter table ?

bye


Am Dienstag, den 14.02.2006, 09:45 +0100 schrieb Stefano Bagnara:
> Norman Maurer wrote:
> > Hi guys,
> > 
> > i just log in  my mailet log and see this error: 
> > 
> > l1139901678401-5 to host 127.0.0.1 at 127.0.0.1 for addresses
> > [vpopmail@hxxx]
> > 14/02/06 08:21:19 INFO  James.Mailet: RemoteDelivery: Exception caught
> > in RemoteDelivery.run()
> > java.lang.NullPointerException
> >         at
> > com.sun.mail.smtp.SMTPTransport.convertTo8Bit(SMTPTransport.java:702)
> > at com.sun.mail.smtp.SMTPTransport.convertTo8Bit(SMTPTransport.java:712)
> > at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:521)
> >         at
> > org.apache.james.transport.mailets.RemoteDelivery.deliver(RemoteDelivery.java:533)
> >         at
> > org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:1083)
> >         at java.lang.Thread.run(Thread.java:595)
> > 
> > what can be the problem ?
> > I use the latest james trunk version
> 
> 
> Javamail 1.3.2 SMTPTransport@702:
> "if (enc.equalsIgnoreCase("quoted-printable") ||"
> Probably you're trying to send a message with no encoding. Btw It should 
> not throw an NPE!
> 
> Please post here the message your are trying to send so we can debug the 
> problem.
> 
> Thank you for reporting it.
> 
> Stefano
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 
> 


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