Uploaded image for project: 'Apache Roller'
  1. Apache Roller
  2. ROL-1952

Roller 5.0.1 does not work with PostgreSQL 9.1

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.1.0
    • Labels:
      None
    • Environment:
      PostgreSQL 9.1.6
    • Database:
      PostgreSQL 9.1.6
    • JDK Version:
      OpenJDK Runtime Environment (IcedTea7 2.1.3) (7u3-2.1.3-1)
    • O/S Version:
      Debian GNU/Linux testing

      Description

      Roller 5.0.1 cannot be used together with PostgreSQL version 9.1. This is because Roller uses OpenJPA 2.0.1 which is not compatible with PostgreSQL 9.1.
      The problem can be fixed by updating OpenJPA to version 2.2.0. I tried this on trunk and it seems to work for me.

      The exception I get in the log when using the original 5.0.1 bundle is:

      ERROR 2012-11-25 00:00:00,422 TurnoverReferersTask:runTask - unexpected
      exception
      <openjpa-2.0.1-r422266:989424 fatal general error>
      org.apache.openjpa.persistence.PersistenceException: FEHLER: ungültige
      ESCAPE-Zeichenkette
      Hinweis: ESCAPE-Zeichenkette muss null oder ein Zeichen lang sein.

      {prepstmnt 439112063 DELETE FROM referer WHERE id IN (SELECT DISTINCT t0.id FROM referer t0 WHERE (t0.excerpt IS NULL OR t0.excerpt LIKE ? ESCAPE '\\')) [params=?]}

      [code=0, state=22025]
      FailedObject: DELETE FROM referer WHERE id IN (SELECT DISTINCT t0.id
      FROM referer t0 WHERE (t0.excerpt IS NULL OR t0.excerpt LIKE ? ESCAPE
      '
      ')) [java.lang.String]

      (Sorry for my postgresql returing a German error message. It means: “ERROR: invalid ESCAPE sequence. Note: ESCAPE string has to be null or one character long.”)

      The problem is also described in the bug tracker of OpenJPA: https://issues.apache.org/jira/browse/OPENJPA-2056

        Attachments

        1. openjpa.diff
          3 kB
          Matthias Wimmer

          Activity

            People

            • Assignee:
              roller_unassigned Roller Unassigned
              Reporter:
              mawis Matthias Wimmer
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: