Hi all,

I have attempted to import the Watch application milestone-1.0 into XWiki 1.1.2 Rev 6611 code.
However, i got the error as follwed when i attempted to import it into the database via the UI.

17:27:41,000 ERROR P1-19 http://localhost:8080/xwiki/bin/import/XWiki/Import?editor=import&space=XWiki Package:installDocument:606 - Failed to save document Packager.Watch
17:27:45,828 ERROR P1-19 http://localhost:8080/xwiki/bin/import/XWiki/Import?editor=import&space=XWiki AbstractFlushingEventListener:performExecutions:299 - Could not synchronize database state with session
org.hibernate.StaleStateException: Unexpected row count: 0 expected: 1
    at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:27)
    at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2204)
    at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2118)
    at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2374)
    at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:84)
    at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
    at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
    at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
    at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1009)
    at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:356)
    at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
    at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:697)
    at com.xpn.xwiki.store.XWikiHibernateVersioningStore.resetRCSArchive(XWikiHibernateVersioningStore.java:216)
    at com.xpn.xwiki.doc.XWikiDocument.resetArchive(XWikiDocument.java:3647)
    at com.xpn.xwiki.plugin.packaging.Package.installDocument(Package.java:601)
    at com.xpn.xwiki.plugin.packaging.Package.install(Package.java:525)
    at com.xpn.xwiki.plugin.packaging.PackageAPI.install(PackageAPI.java:197)
    at com.xpn.xwiki.web.ImportAction.render(ImportAction.java:89)
    at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:145)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:616)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
    at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
    at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
    at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
    at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
    at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
    at org.mortbay.http.HttpServer.service(HttpServer.java:954)
    at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
    at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
    at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
    at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
    at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
    at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
17:27:45,843 ERROR P1-19 http://localhost:8080/xwiki/bin/import/XWiki/Import?editor=import&space=XWiki Package:installDocument:606 - Failed to save document WatchCode.LoadingStatus
17:27:51,171 ERROR P1-19 http://localhost:8080/xwiki/bin/import/XWiki/Import?editor=import&space=XWiki AbstractFlushingEventListener:performExecutions:299 - Could not synchronize database state with session
org.hibernate.StaleStateException: Unexpected row count: 0 expected: 1
    at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:27)
    at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2204)
    at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2118)
    at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2374)
    at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:84)
    at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
    at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
    at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
    at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1009)
    at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:356)
    at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
    at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:697)
    at com.xpn.xwiki.store.XWikiHibernateVersioningStore.resetRCSArchive(XWikiHibernateVersioningStore.java:216)
    at com.xpn.xwiki.doc.XWikiDocument.resetArchive(XWikiDocument.java:3647)
    at com.xpn.xwiki.plugin.packaging.Package.installDocument(Package.java:601)
    at com.xpn.xwiki.plugin.packaging.Package.install(Package.java:525)
    at com.xpn.xwiki.plugin.packaging.PackageAPI.install(PackageAPI.java:197)
    at com.xpn.xwiki.web.ImportAction.render(ImportAction.java:89)
    at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:145)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:616)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
    at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
    at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
    at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
    at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
    at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
    at org.mortbay.http.HttpServer.service(HttpServer.java:954)
    at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
    at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
    at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
    at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
    at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
    at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
17:27:51,171 ERROR P1-19 http://localhost:8080/xwiki/bin/import/XWiki/Import?editor=import&space=XWiki Package:installDocument:606 - Failed to save document XWiki.Results
17:27:51,765 ERROR P1-19 http://localhost:8080/xwiki/bin/import/XWiki/Import?editor=import&space=XWiki SimpleLog4JLogSystem:logVelocityMessage:154 - Left side ($request.withversions) of '==' operation has null value. If a reference, it may not be in the context. Operation not possible.  [line 16, column 73]

Most of the time, the files that failed to import are Packager.Watch, WatchCode.LoadingStatus and XWiki.Results document.
May i know what causes these errors to happen?

Regards,
Colin





Real people. Real questions. Real answers. Share what you know.