XWiki Platform
  1. XWiki Platform
  2. XWIKI-9716

Error while migrating SearchSuggestConfig page from 4.1.4 to 5.2.1 with DW

    Details

    • Tests:
      Unit
    • Development Priority:
      High
    • Difficulty:
      Hard
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Steps to reproduce:

      • Setup a XEM 4.1.4 (I used Tomcat + MySQL)
      • Manually import the manager-ui-all XAR
      • shutdown the wiki and replace the war with a XE 5.2.1
      • startup
      • DW kicks in. Select "This is an upgrade" and then select 4.1.4 from the dropdown
      • Click on "Repair"
      • While upgrading, you'll briefly see an error (with red color)
            Importing document [SearchSuggestConfig] in language []...
            Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.xpn.xwiki.objects.LargeStringProperty#<?xml version="1.0" encoding="UTF-8"?> <query>filename:__INPUT__* AND type:attachment</query> ]
            Failed to import document [SearchSuggestConfig] in language []
        

      Same behaviour when upgrading to 5.3 M2 also

        Activity

        Hide
        Vincent Massol added a comment -

        FTR just got the same problem by doing the following:

        • Export a wiki that had been previously migrated to 5.2, as XAR
        • Import the XAR in brand new XE 5.3-SNAPSHOT

        I got:

        2013-11-25 18:33:34,066 [http://localhost:8080/xwiki/bin/import/XWiki/XWikiPreferences?editor=globaladmin&section=Import] ERROR c.x.x.p.p.Package              - Failed to save document XWiki.SearchSuggestConfig 
        com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while saving document xwiki:XWiki.SearchSuggestConfig
        	at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:761) ~[xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na]
        	at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:177) ~[xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na]
        	at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:170) ~[xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na]
        	at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1305) ~[xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na]
        	at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1249) ~[xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na]
        	at com.xpn.xwiki.plugin.packaging.Package.installDocument(Package.java:861) [xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na]
        	at com.xpn.xwiki.plugin.packaging.Package.install(Package.java:657) [xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na]
        	at com.xpn.xwiki.plugin.packaging.PackageAPI.install(PackageAPI.java:310) [xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na]
        	at com.xpn.xwiki.web.ImportAction.render(ImportAction.java:132) [xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na]
        	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:294) [xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na]
        	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:129) [xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na]
        	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) [struts-core-1.3.10.jar:1.3.10]
        	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) [struts-core-1.3.10.jar:1.3.10]
        	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) [struts-core-1.3.10.jar:1.3.10]
        	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) [struts-core-1.3.10.jar:1.3.10]
        	at javax.servlet.http.HttpServlet.service(HttpServlet.java:755) [servlet-api-3.0.jar:na]
        	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) [servlet-api-3.0.jar:na]
        	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669) [jetty-servlet-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1448) [jetty-servlet-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:121) [xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na]
        	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) [jetty-servlet-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:144) [xwiki-platform-wysiwyg-server-5.3-SNAPSHOT.jar:na]
        	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) [jetty-servlet-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:66) [xwiki-platform-webdav-server-5.3-20131120.150455-115.jar:na]
        	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) [jetty-servlet-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208) [xwiki-platform-container-servlet-5.3-20131119.111523-67.jar:na]
        	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) [jetty-servlet-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111) [xwiki-platform-container-servlet-5.3-20131119.111523-67.jar:na]
        	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) [jetty-servlet-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455) [jetty-servlet-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) [jetty-security-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384) [jetty-servlet-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.server.Server.handle(Server.java:368) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:488) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:943) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1004) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861) [jetty-http-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) [jetty-http-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628) [jetty-io-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) [jetty-io-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) [jetty-util-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) [jetty-util-8.1.9.v20130131.jar:8.1.9.v20130131]
        	at java.lang.Thread.run(Thread.java:695) [na:1.6.0_65]
        Caused by: org.hibernate.HibernateException: Failed to commit or rollback transaction. Root cause []
        	at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:983) ~[xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na]
        	at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:751) ~[xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na]
        	... 52 common frames omitted
        Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.xpn.xwiki.objects.StringProperty#<?xml version="1.0" encoding="UTF-8"?>
        
        <query>name:__INPUT__* OR web:__INPUT__*</query>
        ]
        	at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1950) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
        	at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2594) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
        	at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2494) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
        	at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2821) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
        	at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:113) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
        	at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
        	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
        	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:185) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
        	at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
        	at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
        	at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
        	at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
        	at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
        	at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:976) ~[xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na]
        	... 53 common frames omitted
        
        Show
        Vincent Massol added a comment - FTR just got the same problem by doing the following: Export a wiki that had been previously migrated to 5.2, as XAR Import the XAR in brand new XE 5.3-SNAPSHOT I got: 2013-11-25 18:33:34,066 [http://localhost:8080/xwiki/bin/import/XWiki/XWikiPreferences?editor=globaladmin&section=Import] ERROR c.x.x.p.p.Package - Failed to save document XWiki.SearchSuggestConfig com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while saving document xwiki:XWiki.SearchSuggestConfig at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:761) ~[xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na] at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:177) ~[xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na] at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:170) ~[xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na] at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1305) ~[xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na] at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1249) ~[xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na] at com.xpn.xwiki.plugin.packaging.Package.installDocument(Package.java:861) [xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na] at com.xpn.xwiki.plugin.packaging.Package.install(Package.java:657) [xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na] at com.xpn.xwiki.plugin.packaging.PackageAPI.install(PackageAPI.java:310) [xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na] at com.xpn.xwiki.web.ImportAction.render(ImportAction.java:132) [xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na] at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:294) [xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na] at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:129) [xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na] at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) [struts-core-1.3.10.jar:1.3.10] at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) [struts-core-1.3.10.jar:1.3.10] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) [struts-core-1.3.10.jar:1.3.10] at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) [struts-core-1.3.10.jar:1.3.10] at javax.servlet.http.HttpServlet.service(HttpServlet.java:755) [servlet-api-3.0.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) [servlet-api-3.0.jar:na] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669) [jetty-servlet-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1448) [jetty-servlet-8.1.9.v20130131.jar:8.1.9.v20130131] at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:121) [xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) [jetty-servlet-8.1.9.v20130131.jar:8.1.9.v20130131] at org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:144) [xwiki-platform-wysiwyg-server-5.3-SNAPSHOT.jar:na] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) [jetty-servlet-8.1.9.v20130131.jar:8.1.9.v20130131] at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:66) [xwiki-platform-webdav-server-5.3-20131120.150455-115.jar:na] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) [jetty-servlet-8.1.9.v20130131.jar:8.1.9.v20130131] at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208) [xwiki-platform-container-servlet-5.3-20131119.111523-67.jar:na] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) [jetty-servlet-8.1.9.v20130131.jar:8.1.9.v20130131] at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111) [xwiki-platform-container-servlet-5.3-20131119.111523-67.jar:na] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) [jetty-servlet-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455) [jetty-servlet-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) [jetty-security-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384) [jetty-servlet-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.server.Server.handle(Server.java:368) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:488) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:943) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1004) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861) [jetty-http-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) [jetty-http-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) [jetty-server-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628) [jetty-io-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) [jetty-io-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) [jetty-util-8.1.9.v20130131.jar:8.1.9.v20130131] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) [jetty-util-8.1.9.v20130131.jar:8.1.9.v20130131] at java.lang.Thread.run(Thread.java:695) [na:1.6.0_65] Caused by: org.hibernate.HibernateException: Failed to commit or rollback transaction. Root cause [] at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:983) ~[xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na] at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:751) ~[xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na] ... 52 common frames omitted Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.xpn.xwiki.objects.StringProperty#<?xml version="1.0" encoding="UTF-8"?> <query>name:__INPUT__* OR web:__INPUT__*</query> ] at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1950) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2594) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2494) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2821) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:113) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:185) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:976) ~[xwiki-platform-oldcore-5.3-20131120.150413-117.jar:na] ... 53 common frames omitted
        Hide
        Marius Dumitru Florea added a comment - - edited

        XWiki.SearchSuggestSourceClass has a property named 'query' whose type has recently changed from String to TextArea in order to accommodate long queries. The only page having objects of type XWiki.SearchSuggestSourceClass is XWiki.SearchSuggestConfig. Upgrading this page shouldn't pose any problems normally because:

        • the Hibernate store supports migrating String properties to TextArea when the XClass is saved, and
        • the packager plugin imports first the XClasses and then the rest of the documents.

        The issues is that XWiki.SearchSuggestConfig is also a class.. with a property used to enable the search suggest. I guess the initial author of the search suggest feature wanted to avoid creating many pages. XWiki.SearchSuggestConfig is thus imported before the XWiki.SearchSuggestSourceClass is updated and this causes problems in the Hibernate store.

        I talked with Thomas Mortagne and he proposed two solutions:

        • change the Hibernate store to update the property type when an object is saved, if needed. This happens right now only when a class is saved, but in our case the class is saved after the objects.
        • change the XAR plugin to order the documents in the generated zip archive based on various factors: class dependencies, users before groups, users before wiki components, etc.

        I'm not sure I'll have time to work on this for 5.4. I'll continue with the remaining issues on the roadmap and see if there is time left at the end.

        Show
        Marius Dumitru Florea added a comment - - edited XWiki.SearchSuggestSourceClass has a property named 'query' whose type has recently changed from String to TextArea in order to accommodate long queries. The only page having objects of type XWiki.SearchSuggestSourceClass is XWiki.SearchSuggestConfig . Upgrading this page shouldn't pose any problems normally because: the Hibernate store supports migrating String properties to TextArea when the XClass is saved, and the packager plugin imports first the XClasses and then the rest of the documents. The issues is that XWiki.SearchSuggestConfig is also a class.. with a property used to enable the search suggest. I guess the initial author of the search suggest feature wanted to avoid creating many pages. XWiki.SearchSuggestConfig is thus imported before the XWiki.SearchSuggestSourceClass is updated and this causes problems in the Hibernate store. I talked with Thomas Mortagne and he proposed two solutions: change the Hibernate store to update the property type when an object is saved, if needed. This happens right now only when a class is saved, but in our case the class is saved after the objects. change the XAR plugin to order the documents in the generated zip archive based on various factors: class dependencies, users before groups, users before wiki components, etc. I'm not sure I'll have time to work on this for 5.4. I'll continue with the remaining issues on the roadmap and see if there is time left at the end.
        Hide
        Vincent Massol added a comment -

        If it's not done in 5.4 then we need to do it for 5.4.1 I believe since generally speaking we need users on older versions of XWiki to be able to migrate easily to 5.x.

        Show
        Vincent Massol added a comment - If it's not done in 5.4 then we need to do it for 5.4.1 I believe since generally speaking we need users on older versions of XWiki to be able to migrate easily to 5.x.
        Hide
        Marius Dumitru Florea added a comment -

        Fixed by improving the Hibernate store delete the old property value when the new value has a different type.

        Show
        Marius Dumitru Florea added a comment - Fixed by improving the Hibernate store delete the old property value when the new value has a different type.

          People

          • Assignee:
            Marius Dumitru Florea
            Reporter:
            Sorin Burjan
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

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