Hi Philippe,
Regarding the failure with your trial in safe mode, it is due to a improper
cleaning of the database before import. During migration, two new tables
are created (DATABASECHANGELOG and DATABASECHANGELOGLOCK). When you restore
an earlier state that came from a version lower than 4.x, you should drop
these tables manually, since the import will not do so for you.
However, even if there is a little chance that the safe mode helps, I doubt
it will. The issue probably came from old garbage records in XWiki
statistical data. I have written the migration to already skip many of
these unexpected records, but it still do not support all of them. If you
do not care about keeping your statistical history, the simplest is to
delete all records in xwikistatsdoc, xwikistatsreferer and xwikistatsvisit.
However, if you want to keep them, you need to do some cleanup.
following two commands on each of the above tables (substitute all
"xwikistatsdoc" with the appropriate table name) before migration:
delete s1 from xwikistatsdoc s1 join xwikistatsdoc s2 on
s1.XWS_NUMBER=s2.XWS_NUMBER and s1.XWS_NAME=s2.XWS_NAME where
s1.XWS_CLASSNAME = 'internal' and (s2.XWS_CLASSNAME != 'internal' or
s2.XWS_CLASSNAME is null);
update xwikistatsdoc set XWS_CLASSNAME = "" where XWS_CLASSNAME =
'internal';
If this does not solve your issue, I would need more information about the
conflicting id. Once the migration has failed, execute:
select XWS_NUMBER,XWS_NAME from xwikistatsdoc where XWS_ID=<put the
conflicting id here>;
You will probably get either a spacename, or a full document name
(space.doc). Take the doc name alone, or the space name alone, and execute:
select XWS_ID,XWS_NUMBER,XWS_NAME,XWS_CLASSNAME from xwikistatsdoc
where XWS_NUMBER=<the number you get in the previous request> and XWS_NAME
like '%<the doc or space name alone>%;
This should returns more than one record. Send results of both request to
me (in private if needed) for diagnosis.
Please let me know the outcome.
Regards,
On Tue, Sep 18, 2012 at 6:53 AM, Philippe Marzouk <phil(a)ozigo.org> wrote:
Hi,
I tried the parameter after restoring the DB from backup.
It went further but I still got an error:
2012-09-18 06:48:25,988 [
http://par-wiki-1.clear2pay.com:8080/xwiki/bin/view/Main/] INFO
h.R40000XWIKI6990DataMigration - [R40000XWIKI6990] - 19 schema updates
required.
2012-09-18 06:48:27,034 [
http://par-wiki-1.clear2pay.com:8080/xwiki/bin/view/Main/] INFO
c.x.x.s.m.liquibase - Successfully acquired change log lock
2012-09-18 06:48:27,191 [
http://par-wiki-1.clear2pay.com:8080/xwiki/bin/view/Main/] INFO
c.x.x.s.m.liquibase - Reading from `DATABASECHANGELOG`
2012-09-18 06:48:27,204 [
http://par-wiki-1.clear2pay.com:8080/xwiki/bin/view/Main/] INFO
c.x.x.s.m.liquibase - Reading from `DATABASECHANGELOG`
2012-09-18 06:48:27,295 [
http://par-wiki-1.clear2pay.com:8080/xwiki/bin/view/Main/] INFO
c.x.x.s.m.liquibase - Successfully released change log lock
2012-09-18 06:48:27,296 [
http://par-wiki-1.clear2pay.com:8080/xwiki/bin/view/Main/] INFO
.HibernateDataMigrationManager - Running migration [R40000XWIKI6990] with
version [40000]
2012-09-18 06:48:27,402 [
http://par-wiki-1.clear2pay.com:8080/xwiki/bin/view/Main/] INFO
h.R40000XWIKI6990DataMigration - [R40000XWIKI6990] - Retrieved 626
document IDs to be converted.
2012-09-18 06:48:27,540 [
http://par-wiki-1.clear2pay.com:8080/xwiki/bin/view/Main/] INFO
h.R40000XWIKI6990DataMigration - [R40000XWIKI6990] - Retrieved 783 object
IDs to be converted.
2012-09-18 06:48:27,622 [
http://par-wiki-1.clear2pay.com:8080/xwiki/bin/view/Main/] INFO
h.R40000XWIKI6990DataMigration - [R40000XWIKI6990] - Retrieved 3 custom
mapped classes to be processed.
2012-09-18 06:48:28,807 [
http://par-wiki-1.clear2pay.com:8080/xwiki/bin/view/Main/] INFO
h.R40000XWIKI6990DataMigration - [R40000XWIKI6990] - Retrieved 20458document statistics
IDs to be converted.
2012-09-18 06:48:28,823 [
http://par-wiki-1.clear2pay.com:8080/xwiki/bin/view/Main/] INFO
h.R40000XWIKI6990DataMigration - [R40000XWIKI6990] - Retrieved 83 referer
statistics IDs to be converted.
2012-09-18 06:48:29,202 [
http://par-wiki-1.clear2pay.com:8080/xwiki/bin/view/Main/] INFO
h.R40000XWIKI6990DataMigration - [R40000XWIKI6990] - Retrieved 36073visit statistics IDs
to be converted.
2012-09-18 06:48:29,231 [
http://par-wiki-1.clear2pay.com:8080/xwiki/bin/view/Main/] INFO
h.R40000XWIKI6990DataMigration - [R40000XWIKI6990] - Converting 626
document IDs in 5 tables and 0 collection tables...
2012-09-18 06:48:30,810 [
http://par-wiki-1.clear2pay.com:8080/xwiki/bin/view/Main/] INFO
h.R40000XWIKI6990DataMigration - [R40000XWIKI6990] - All document IDs has
been converted successfully.
2012-09-18 06:48:30,810 [
http://par-wiki-1.clear2pay.com:8080/xwiki/bin/view/Main/] INFO
h.R40000XWIKI6990DataMigration - [R40000XWIKI6990] - Converting 783 object
IDs in 11 tables, 3 custom mapped tables and 3 collection tables...
2012-09-18 06:48:30,890 [
http://par-wiki-1.clear2pay.com:8080/xwiki/bin/view/Main/] WARN
o.h.u.JDBCExceptionReporter - SQL Error: 1264, SQLState: 22001
2012-09-18 06:48:30,890 [
http://par-wiki-1.clear2pay.com:8080/xwiki/bin/view/Main/] ERROR
o.h.u.JDBCExceptionReporter - Data truncation: Out of range value for
column 'XWL_ID' at row 2
2012-09-18 06:48:30,923 [
http://par-wiki-1.clear2pay.com:8080/xwiki/bin/view/Main/] INFO
.HibernateDataMigrationManager - Failed to migrate database [xwiki]...
com.xpn.xwiki.store.migration.DataMigrationException: Data migration
R40000XWIKI6990 failed
at
com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration.migrate(AbstractHibernateDataMigration.java:111)
~[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
com.xpn.xwiki.store.migration.AbstractDataMigrationManager.startMigrations(AbstractDataMigrationManager.java:621)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
com.xpn.xwiki.store.migration.AbstractDataMigrationManager.startMigrationsForDatabase(AbstractDataMigrationManager.java:546)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
com.xpn.xwiki.store.migration.AbstractDataMigrationManager.startMigrations(AbstractDataMigrationManager.java:493)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.startMigrations(HibernateDataMigrationManager.java:296)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
com.xpn.xwiki.store.migration.AbstractDataMigrationManager.checkDatabase(AbstractDataMigrationManager.java:421)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.setDatabase(XWikiHibernateBaseStore.java:666)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:813)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:746)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:736)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:290)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1438)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1481)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at com.xpn.xwiki.XWiki.getXWikiPreference(XWiki.java:2215)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at com.xpn.xwiki.XWiki.getXWikiPreference(XWiki.java:2247)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
com.xpn.xwiki.render.XWikiMacrosMappingRenderer.loadPreferences(XWikiMacrosMappingRenderer.java:107)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
com.xpn.xwiki.render.XWikiMacrosMappingRenderer.<init>(XWikiMacrosMappingRenderer.java:83)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.<init>(DefaultXWikiRenderingEngine.java:72)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at com.xpn.xwiki.XWiki.resetRenderingEngine(XWiki.java:1114)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:790)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at com.xpn.xwiki.XWiki.<init>(XWiki.java:738)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:399)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at com.xpn.xwiki.XWiki.getXWiki(XWiki.java:486)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:136)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:116)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
[struts-1.2.9.jar:1.2.9]
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
[struts-1.2.9.jar:1.2.9]
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
[struts-1.2.9.jar:1.2.9]
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
[struts-1.2.9.jar:1.2.9]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
[tomcat-servlet-api-3.0.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
[tomcat-servlet-api-3.0.jar:na]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
[tomcat-catalina-7.0.28.jar:7.0.28]
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:120)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:144)
[xwiki-platform-wysiwyg-server-4.1.4.jar:na]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:66)
[xwiki-platform-webdav-server-4.1.4.jar:na]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
[xwiki-platform-container-servlet-4.1.4.jar:na]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
[xwiki-platform-container-servlet-4.1.4.jar:na]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
[tomcat-coyote-7.0.28.jar:7.0.28]
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
[tomcat-coyote-7.0.28.jar:7.0.28]
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
[tomcat-coyote-7.0.28.jar:7.0.28]
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[na:1.6.0_34]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[na:1.6.0_34]
at java.lang.Thread.run(Thread.java:662) [na:1.6.0_34]
Caused by: com.xpn.xwiki.XWikiException: Error number 3005 in 3:
R40000XWIKI6990 migration failed while converting ID from [1076986927] to
[-8609912401745640291]
Wrapped Exception: Error number 0 in 3: Exception while hibernate execute
Wrapped Exception: error performing bulk update
at
com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration.convertDbId(R40000XWIKI6990DataMigration.java:709)
~[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration.hibernateMigrate(R40000XWIKI6990DataMigration.java:1223)
~[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration.migrate(AbstractHibernateDataMigration.java:109)
~[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
... 61 common frames omitted
Caused by: com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception
while hibernate execute
Wrapped Exception: error performing bulk update
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:1214)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.executeWrite(XWikiHibernateBaseStore.java:1322)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration.convertDbId(R40000XWIKI6990DataMigration.java:707)
~[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
... 63 common frames omitted
Caused by: org.hibernate.exception.DataException: error performing bulk
update
at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:102)
~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
at
org.hibernate.hql.ast.exec.MultiTableUpdateExecutor.execute(MultiTableUpdateExecutor.java:182)
~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
at
org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:423)
~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
at
org.hibernate.engine.query.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:283)
~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
at
org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:1288)
~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:117)
~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
at
com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration$AbstractIdConversionHibernateCallback.executeIdUpdate(R40000XWIKI6990DataMigration.java:299)
~[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration$6.doSingleUpdate(R40000XWIKI6990DataMigration.java:1237)
~[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration$AbstractIdConversionHibernateCallback.doUpdate(R40000XWIKI6990DataMigration.java:265)
~[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration$AbstractUpdateHibernateCallback.doInHibernate(R40000XWIKI6990DataMigration.java:218)
~[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:1208)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
... 65 common frames omitted
Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Out of
range value for column 'XWL_ID' at row 2
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3595)
~[mysql-connector-java-5.1.16.jar:na]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)
~[mysql-connector-java-5.1.16.jar:na]
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)
~[mysql-connector-java-5.1.16.jar:na]
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)
~[mysql-connector-java-5.1.16.jar:na]
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625)
~[mysql-connector-java-5.1.16.jar:na]
at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)
~[mysql-connector-java-5.1.16.jar:na]
at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2415)
~[mysql-connector-java-5.1.16.jar:na]
at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2333)
~[mysql-connector-java-5.1.16.jar:na]
at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2318)
~[mysql-connector-java-5.1.16.jar:na]
at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
~[commons-dbcp-1.3.jar:1.3]
at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
~[commons-dbcp-1.3.jar:1.3]
at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
~[commons-dbcp-1.3.jar:1.3]
at
org.hibernate.hql.ast.exec.MultiTableUpdateExecutor.execute(MultiTableUpdateExecutor.java:173)
~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
... 74 common frames omitted
Philippe
On Mon, Sep 17, 2012 at 07:05:37PM +0200, Thomas Mortagne wrote:
Hi,
From what I know there is two migration modes and
by default the
quicker and a bit less safe one is supposed to be enabled. You
could
try to enable the safest one to see if it fixes your issue.
See
http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWikiEnterpris…
Even if it's working, would still be ncie to keep your non migrated
database somewhere to help debug and improve the default migration
mode. I'm sure someone might be interested ;)
On Mon, Sep 17, 2012 at 6:28 PM, Philippe Marzouk <phil(a)ozigo.org>
wrote:
> Hi,
>
> I'm trying tom igrate an xwiki installation at version 2.4 to the
latest
> debian package (4.1.4).
> This is on Tomcat 7 and Mysql 5.5 with Oracle Java 6 update 34.
>
> I get the following error:
>
> 2012-09-17 18:03:32,895 [
https://par-wiki-1.clear2pay.com/xwiki/bin/view/Main/] INFO
.HibernateDataMigrationManager - Running migration [R40000XWIKI6990] with
version [40000]
> 2012-09-17 18:03:33,014 [
https://par-wiki-1.clear2pay.com/xwiki/bin/view/Main/] INFO
h.R40000XWIKI6990DataMigration - [R40000XWIKI6990] - Retrieved 0 document
IDs to be converted.
> 2012-09-17 18:03:33,144 [
https://par-wiki-1.clear2pay.com/xwiki/bin/view/Main/] INFO
h.R40000XWIKI6990DataMigration - [R40000XWIKI6990] - Retrieved 0 object
IDs to be converted.
> 2012-09-17 18:03:33,260 [
https://par-wiki-1.clear2pay.com/xwiki/bin/view/Main/] INFO
h.R40000XWIKI6990DataMigration - [R40000XWIKI6990] - Retrieved 3 custom
mapped classes to be processed.
> 2012-09-17 18:03:34,517 [
https://par-wiki-1.clear2pay.com/xwiki/bin/view/Main/] INFO
h.R40000XWIKI6990DataMigration - [R40000XWIKI6990] - Retrieved 14750
document statistics IDs to be converted.
> 2012-09-17 18:03:34,535 [
https://par-wiki-1.clear2pay.com/xwiki/bin/view/Main/] INFO
h.R40000XWIKI6990DataMigration - [R40000XWIKI6990] - Retrieved 83 referer
statistics IDs to be converted.
> 2012-09-17 18:03:34,852 [
https://par-wiki-1.clear2pay.com/xwiki/bin/view/Main/] INFO
h.R40000XWIKI6990DataMigration - [R40000XWIKI6990] - Retrieved 36076 visit
statistics IDs to be converted.
> 2012-09-17 18:03:34,897 [
https://par-wiki-1.clear2pay.com/xwiki/bin/view/Main/] INFO
h.R40000XWIKI6990DataMigration - [R40000XWIKI6990] - No document IDs to
convert, skipping.
> 2012-09-17 18:03:34,897 [
https://par-wiki-1.clear2pay.com/xwiki/bin/view/Main/] INFO
h.R40000XWIKI6990DataMigration - [R40000XWIKI6990] - No object IDs to
convert, skipping.
> 2012-09-17 18:03:34,898 [
https://par-wiki-1.clear2pay.com/xwiki/bin/view/Main/] INFO
h.R40000XWIKI6990DataMigration - [R40000XWIKI6990] - Converting 14750
document statistics IDs in 1 tables...
> 2012-09-17 18:03:38,742 [
https://par-wiki-1.clear2pay.com/xwiki/bin/view/Main/] WARN
o.h.u.JDBCExceptionReporter - SQL Error: 1062, SQLState: 23000
> 2012-09-17 18:03:38,742 [
https://par-wiki-1.clear2pay.com/xwiki/bin/view/Main/] ERROR
o.h.u.JDBCExceptionReporter - Duplicate entry '5441591690732251370' for
key 'PRIMARY'
> 2012-09-17 18:03:38,856 [
https://par-wiki-1.clear2pay.com/xwiki/bin/view/Main/] INFO
.HibernateDataMigrationManager - Failed to migrate database [xwiki]...
>
com.xpn.xwiki.store.migration.DataMigrationException: Data migration
R40000XWIKI6990 failed
> at
com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration.migrate(AbstractHibernateDataMigration.java:111)
~[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.store.migration.AbstractDataMigrationManager.startMigrations(AbstractDataMigrationManager.java:621)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.store.migration.AbstractDataMigrationManager.startMigrationsForDatabase(AbstractDataMigrationManager.java:546)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.store.migration.AbstractDataMigrationManager.startMigrations(AbstractDataMigrationManager.java:493)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.startMigrations(HibernateDataMigrationManager.java:296)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.store.migration.AbstractDataMigrationManager.checkDatabase(AbstractDataMigrationManager.java:421)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.store.XWikiHibernateBaseStore.setDatabase(XWikiHibernateBaseStore.java:666)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:813)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:746)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:736)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:290)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.XWiki.getDocument(XWiki.java:1438)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.XWiki.getDocument(XWiki.java:1481)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.XWiki.getXWikiPreference(XWiki.java:2215)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.XWiki.getXWikiPreference(XWiki.java:2247)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.render.XWikiMacrosMappingRenderer.loadPreferences(XWikiMacrosMappingRenderer.java:107)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.render.XWikiMacrosMappingRenderer.<init>(XWikiMacrosMappingRenderer.java:83)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.<init>(DefaultXWikiRenderingEngine.java:72)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.XWiki.resetRenderingEngine(XWiki.java:1114)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.XWiki.initXWiki(XWiki.java:790)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.XWiki.<init>(XWiki.java:738)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:399)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.XWiki.getXWiki(XWiki.java:486)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:136)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:116)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
[struts-1.2.9.jar:1.2.9]
> at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
[struts-1.2.9.jar:1.2.9]
> at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
[struts-1.2.9.jar:1.2.9]
> at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
[struts-1.2.9.jar:1.2.9]
> at
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
[tomcat-servlet-api-3.0.jar:na]
> at
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
[tomcat-servlet-api-3.0.jar:na]
> at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
[tomcat-catalina-7.0.28.jar:7.0.28]
> at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
[tomcat-catalina-7.0.28.jar:7.0.28]
> at
com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:120)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
[tomcat-catalina-7.0.28.jar:7.0.28]
> at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
[tomcat-catalina-7.0.28.jar:7.0.28]
> at
org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:144)
[xwiki-platform-wysiwyg-server-4.1.4.jar:na]
> at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
[tomcat-catalina-7.0.28.jar:7.0.28]
> at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
[tomcat-catalina-7.0.28.jar:7.0.28]
> at
com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:66)
[xwiki-platform-webdav-server-4.1.4.jar:na]
> at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
[tomcat-catalina-7.0.28.jar:7.0.28]
> at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
[tomcat-catalina-7.0.28.jar:7.0.28]
> at
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
[xwiki-platform-container-servlet-4.1.4.jar:na]
> at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
[tomcat-catalina-7.0.28.jar:7.0.28]
> at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
[tomcat-catalina-7.0.28.jar:7.0.28]
> at
org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
[xwiki-platform-container-servlet-4.1.4.jar:na]
> at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
[tomcat-catalina-7.0.28.jar:7.0.28]
> at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
[tomcat-catalina-7.0.28.jar:7.0.28]
> at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
[tomcat-catalina-7.0.28.jar:7.0.28]
> at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
[tomcat-catalina-7.0.28.jar:7.0.28]
> at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
[tomcat-catalina-7.0.28.jar:7.0.28]
> at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
[tomcat-catalina-7.0.28.jar:7.0.28]
> at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
[tomcat-catalina-7.0.28.jar:7.0.28]
> at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
[tomcat-catalina-7.0.28.jar:7.0.28]
> at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
[tomcat-catalina-7.0.28.jar:7.0.28]
> at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
[tomcat-catalina-7.0.28.jar:7.0.28]
> at
org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200)
[tomcat-coyote-7.0.28.jar:7.0.28]
> at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
[tomcat-coyote-7.0.28.jar:7.0.28]
> at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
[tomcat-coyote-7.0.28.jar:7.0.28]
> at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[na:1.6.0_34]
> at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[na:1.6.0_34]
> at
java.lang.Thread.run(Thread.java:662) [na:1.6.0_34]
> Caused by: com.xpn.xwiki.XWikiException: Error number 3005 in 3:
R40000XWIKI6990 migration failed
> Wrapped Exception: Error number 0 in 3:
Exception while hibernate
execute
> > Wrapped Exception: could not execute native bulk manipulation query
> at
com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration.hibernateMigrate(R40000XWIKI6990DataMigration.java:1299)
~[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration.migrate(AbstractHibernateDataMigration.java:109)
~[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> ... 61 common frames omitted
> Caused by: com.xpn.xwiki.XWikiException: Error number 0 in 3:
Exception while
hibernate execute
> > Wrapped Exception: could not execute native bulk manipulation query
> at
com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:1214)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.store.XWikiHibernateBaseStore.executeWrite(XWikiHibernateBaseStore.java:1322)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration.hibernateMigrate(R40000XWIKI6990DataMigration.java:1286)
~[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> ... 62 common frames omitted
> Caused by: org.hibernate.exception.ConstraintViolationException: could
not
execute native bulk manipulation query
> at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
> at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
> at
org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:219)
~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
> at
org.hibernate.impl.SessionImpl.executeNativeUpdate(SessionImpl.java:1310)
~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
> at
org.hibernate.impl.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:396)
~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
> at
com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration$AbstractBulkIdConversionHibernateCallback.executeSqlIdUpdate(R40000XWIKI6990DataMigration.java:531)
~[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration$7.doBulkIdUpdate(R40000XWIKI6990DataMigration.java:1294)
~[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration$AbstractBulkIdConversionHibernateCallback.doUpdate(R40000XWIKI6990DataMigration.java:356)
~[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration$AbstractUpdateHibernateCallback.doInHibernate(R40000XWIKI6990DataMigration.java:218)
~[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> at
com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:1208)
[xwiki-platform-legacy-oldcore-4.1.4.jar:na]
> ... 64 common frames omitted
> Caused by:
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:
Duplicate entry '5441591690732251370' for key 'PRIMARY'
> at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
~[na:1.6.0_34]
> at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
~[na:1.6.0_34]
> at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
~[na:1.6.0_34]
> at
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
~[na:1.6.0_34]
> at
com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
~[mysql-connector-java-5.1.16.jar:na]
> at
com.mysql.jdbc.Util.getInstance(Util.java:386)
~[mysql-connector-java-5.1.16.jar:na]
> at
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1040)
~[mysql-connector-java-5.1.16.jar:na]
> at
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)
~[mysql-connector-java-5.1.16.jar:na]
> at
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)
~[mysql-connector-java-5.1.16.jar:na]
> at
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)
~[mysql-connector-java-5.1.16.jar:na]
> at
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)
~[mysql-connector-java-5.1.16.jar:na]
> at
com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625)
~[mysql-connector-java-5.1.16.jar:na]
> at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)
~[mysql-connector-java-5.1.16.jar:na]
> at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2415)
~[mysql-connector-java-5.1.16.jar:na]
> at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2333)
~[mysql-connector-java-5.1.16.jar:na]
> at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2318)
~[mysql-connector-java-5.1.16.jar:na]
> at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
~[commons-dbcp-1.3.jar:1.3]
> at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
~[commons-dbcp-1.3.jar:1.3]
> at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
~[commons-dbcp-1.3.jar:1.3]
> at
org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:210)
~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
... 71 common frames omitted
How can I proceed with the migration ?
Should I try to migrate from 2.4 to another version first ?
Philippe
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
--
Thomas Mortagne
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users