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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1-milestone-1, 4.0.1
    • Component/s: Old Core
    • Labels:
      None
    • Difficulty:
      Trivial
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      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

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

              Dates

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