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

Duplicate primary key in xwikircs during document save (race condition ?)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Critical
    • None
    • 4.3
    • Old Core
    • Very hard
    • N/A
    • N/A

    Description

      Steps to reproduce:

      • use a clean Tomcat (I am using 7.0.22)
      • download the 4.3 war
      • unpack the 4.3 war in tomcat's webapp dir
      • add the mysql JDBC connector (I am using mysql-connector-java-5.1.22-bin.jar)
      • set your hibernate file to point to the MySQl database (I am using Server version: 5.5.28-0ubuntu0.12.10.1 (Ubuntu))
      • make sure you don't have workspaces database, but only xwiki database with proper grants. I used "grant all privileges on . to xwiki@localhost identified by 'xwiki';" command
      • start Tomcat, skip Distribution Wizard.
      • import the 4.3 XAR manually
      • do not restart the wiki, but install Workspaces from the URL from Main.WebHome

      I get the following error in stacktrace:

      2012-11-27 23:02:56,148 [http://localhost:8080/xwiki/bin/loginsubmit/XWiki/XWikiLogin] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.api.XWiki.parseMessage] in /templates/login.vm@29,33 
      2012-11-27 23:03:11,337 [http://localhost:8080/xwiki/bin/view/WorkspaceManager/Install] INFO  .HibernateDataMigrationManager - [schema] - Running hibernate updates 
      2012-11-27 23:03:42,815 [http://localhost:8080/xwiki/bin/view/WorkspaceManager/Install] WARN  o.h.u.JDBCExceptionReporter    - SQL Error: 1062, SQLState: 23000 
      2012-11-27 23:03:42,851 [http://localhost:8080/xwiki/bin/view/WorkspaceManager/Install] ERROR o.h.u.JDBCExceptionReporter    - Duplicate entry '6152552094868048244-1-2' for key 'PRIMARY' 
      2012-11-27 23:03:42,932 [http://localhost:8080/xwiki/bin/view/WorkspaceManager/Install] WARN  .o.i.DefaultObservationManager - The [org.xwiki.localization.wiki.internal.AbstractDocumentTranslationBundle$1] listener has overwritten a previously registered listener [org.xwiki.localization.wiki.internal.AbstractDocumentTranslationBundle$1] since they both are registered under the same id [localization.bundle.document:xwiki:WorkspaceManager.Translations]. In the future consider removing a Listener first if you really want to register it again. 
      2012-11-27 23:03:43,256 [http://localhost:8080/xwiki/bin/view/WorkspaceManager/Install] WARN  o.h.d.f.TemplateRenderer       - Function template anticipated 4 arguments, but 3 arguments encountered 
      2012-11-27 23:03:43,257 [http://localhost:8080/xwiki/bin/view/WorkspaceManager/Install] WARN  o.h.d.f.TemplateRenderer       - Function template anticipated 4 arguments, but 3 arguments encountered 
      

      I get each time the same duplicate key ! Can't explain how this is possible

      Java version I use

      java version "1.6.0_24"
      OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-0ubuntu1~12.10.1)
      OpenJDK Client VM (build 20.0-b12, mixed mode, sharing)
      
      

      Attachments

        Issue Links

          Activity

            People

              softec Denis Gervalle
              sorinello Sorin Burjan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: