Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-475

SQLException on james trunk after build and without modifications of config.xml

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.0
    • Component/s: None
    • Labels:
      None

      Description

      Here is the problem:

      maurer@debbox:~/stuff/workspace/james-dev$ telnet localhost 25
      Trying 127.0.0.1...
      Connected to localhost.
      Escape character is '^]'.
      220 debbox SMTP Server (JAMES SMTP Server 2.3-dev) ready Sat, 8 Apr 2006 15:04:3 1 +0200 (CEST)
      helo test.de
      250 debbox Hello test.de (localhost [127.0.0.1])
      mail from: <nm@test.de>
      250 2.1.0 Sender <nm@test.de> OK
      rcpt to: <nm@spam-box.de>
      250 2.1.5 Recipient <nm@spam-box.de> OK
      rcpt to: <nm@spam-box.de>
      250 2.1.5 Recipient <nm@spam-box.de> OK
      data
      354 Ok Send data ending with <CRLF>.<CRLF>
      test
      .
      451 4.0.0 Error processing message: Exception spooling message: Exception caught while storing mail Container: ;
      nested exception is:
      SQL Exception: An unexpected exception was thrown;
      nested exception is:
      class javax.mail.MessagingException: Exception caught while storing mail Container: ;
      nested exception is:
      SQL Exception: An unexpected exception was thrown

        Activity

        Hide
        bago Stefano Bagnara added a comment -

        Thank you!
        This is probably related to the new message length calculator (that is not aware of messages with no headers) and the new code to stream the message to db that rely on a precise message length calculation.

        Show
        bago Stefano Bagnara added a comment - Thank you! This is probably related to the new message length calculator (that is not aware of messages with no headers) and the new code to stream the message to db that rely on a precise message length calculation.
        Hide
        bago Stefano Bagnara added a comment -

        I think I've found the problem and it should be related to dbfile only.
        When I introduced the streaming to db (removing full in memory bytearray) I had to add precise message size calculation to store the message to db. I always calc the full message size while with dbfile only store headers to db!

        This bug also show that an exception while storing to db report to the smtp protocol garbage (multiline reply with no multiline smtp convention). We should also fix that!

        Show
        bago Stefano Bagnara added a comment - I think I've found the problem and it should be related to dbfile only. When I introduced the streaming to db (removing full in memory bytearray) I had to add precise message size calculation to store the message to db. I always calc the full message size while with dbfile only store headers to db! This bug also show that an exception while storing to db report to the smtp protocol garbage (multiline reply with no multiline smtp convention). We should also fix that!
        Hide
        bago Stefano Bagnara added a comment -

        Fixed the problem with dbfile and removed the stacktrace from the SMTP response (Now the exception is only logged and the error message sent in the SMTP reply is always generic)

        Show
        bago Stefano Bagnara added a comment - Fixed the problem with dbfile and removed the stacktrace from the SMTP response (Now the exception is only logged and the error message sent in the SMTP reply is always generic)
        Hide
        danny@apache.org Danny Angus added a comment -

        Closing issue fixed in released version.

        Show
        danny@apache.org Danny Angus added a comment - Closing issue fixed in released version.

          People

          • Assignee:
            bago Stefano Bagnara
            Reporter:
            norman Norman Maurer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development