Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-7763

Database migration (upgrade) fails from 3.5 to 4.0 with PostgreSQL

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.5, 4.0-rc-1
    • Fix Version/s: 3.5.1, 4.0
    • Component/s: Old Core
    • Labels:
      None
    • Environment:
      Windows XP, Tomcat 7.0, PostgreSQL 9.1
    • keywords:
      postgresql, database upgrade
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      Upgrade fails with:

      Caused by: java.sql.BatchUpdateException: Batch entry 1 UPDATE xwikiattachment_archive SET xwa_archive2 = (SELECT oid FROM (SELECT oid, lowrite(lo_open(oid, 131072), xwikiattachment_archive.xwa_archive) FROM lo_create(0) o(oid)) x) was aborted. Call getNextException to see the cause.

      (see attached logs for full stack trace)

      How to reproduce:

      Do a clean install using the WAR method (unpacked xwiki-enterprise-web-3.5.war to webapps). The only modification I made is to hibernate.cfg.xml (commented out the default database, and uncommented the postgres section) and copied postgresql-9.1-901.jdbc4.jar to WEB-INF/lib. Import xwiki-enterprise-ui-all-3.5.xar.

      Stop Tomcat, delete all files from webapps/xwiki. Unpack xwiki-enterprise-web-4.0-rc-1.war to webapps. Copy postgresql-9.1-901.jdbc4.jar to WEB-INF/lib and customized hibernate.cfg.xml again. Start Tomcat again.

        Attachments

          Activity

            People

            • Assignee:
              sdumitriu Sergiu Dumitriu
              Reporter:
              marczi Daniel Marczisovszky
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: