james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [jira] Closed: (JAMES-83) JAMES silently consumes java.lang.Error thrown by Maillet.service()
Date Sun, 06 Jun 2004 21:06:01 GMT

   The following issue has been closed.

View the issue:

Here is an overview of the issue:
        Key: JAMES-83
    Summary: JAMES silently consumes java.lang.Error thrown by Maillet.service()
       Type: Bug

     Status: Closed
 Resolution: FIXED

    Project: James
             Mailet API

   Reporter: Roland Turner

    Created: Tue, 4 Feb 2003 6:09 PM
    Updated: Sun, 6 Jun 2004 2:05 PM
Environment: Operating System: Other
Platform: Other

A java.lang.Error indicates a catastrophic, unrecoverable failure for the JVM
itself. It should never be caught, the JVM should be allowed to abort.

For application servers that absolutely insist on attempting to continue to
provide uninterrupted service for other components when one component
experiences such a condition, the error should at the very least be reported to
the administrator and the component marked as offline; silently consuming a
java.lang.Error is Very Bad; continuing to attempt to stuff requests through a
failed component is Extraordinarily Bad.

Catching Throwable is Really Quite Bad.

My particular problem arose from having an error in my build.xml which meant
that a jar needed by the maillet was missing which meant that a
java.lang.NoClassDefFoundError was thrown during class loading while servicing
the first request. JAMES decided to pretend that the Error had not happened and
(a) not log it anywhere then (b) continue to stuff requests through the failed
component. It wasn't until I decided to investigate why multiple threads
appeared to be occupying the same synchronized block that I realised that
something other than an Exception was being thrown and that JAMES was concealing it.

If you're going to try to catch anything more than Exception, then PLEASE handle
them sensibly.

Oh, how to reproduce:

    public void service(Mail mail) { throw new Error(); }

Then notice the complete absence of logging, stdout or stderr clues about what
has happened.

This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:

If you want more information on JIRA, or have a bug to report see:

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

View raw message