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

JDBCMailRepository broken: SQL and JDBC code out of sync

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.0, 3.3.0, 3.4.0, 3.3.1
    • Fix Version/s: 3.5.0
    • Labels:
      None

      Description

      The table structure as defined in sqlResources.xml and the corresponding JDBC code in server/data/data-jdbc/src/main/java/org/apache/james/mailrepository/jdbc/JDBCMailRepository.java have diverged since the fix for JAMES-2303. There's three issues:

      • these SQL resources were left unmodified:
        • dockerfiles/run/spring/destination/conf/sqlResources.xml
        • server/app/src/main/resources/sqlResources.xml
        • server/data/data-jdbc/src/test/resources/sqlResources-mail.xml
      • the order in server/data/data-jdbc/src/test/resources/sqlResources.xml is wrong:
        • message_body (SQL index: 9, JDBC index: 11)
        • message_attributes (SQL index: 10, JDBC index: 12)
        • per_recipient_headers (SQL index: 11, JDBC index: 9)
        • last_updated timestamp (SQL index: 12, JDBC index: 10)
      • Since this went completely unnoticed for quite some time, adding tests would be appropriate?

      There is a fourth issue which I will bring up when the above issues are adressed. is already filed here under JAMES-2828.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jtconsol Jörg Thomas (ConSol)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 5h 50m
                  5h 50m