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

Migrating database from 3.1 to 4.0 fails while migrating stats on MySQL 5.1

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 4.1-milestone-1, 4.0.1
    • 4.0
    • Old Core
    • None
    • Trivial
    • N/A
    • N/A

    Description

      If the database contains stats, the migration fails with a NullPointerException in R40000XWIKI6990DataMigration on line 437 called from line 751. This is due to the fact that the code on line 741 does the following:

      Map<Long, Long> map = stats.poll();

      and then on line 751:

      convertDbId(stats.poll(), new AbstractIdConversionHibernateCallback()

      But calling poll() on a LinkedList removes the first item. The call on line 751 should pass the map which was previously removed from the head of the list.

      Attachments

        Activity

          People

            sdumitriu Sergiu Dumitriu
            bog.solomon Bogdan Solomon
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: