Al 17/01/13 10:19, En/na Denis Gervalle ha escrit:
Hi Àlex,

Sorry for this late reply.
I need a larger extract of your logs to be able to help and probably more
later. You may send it to me privately if you prefer.
Regards,


On Tue, Jan 8, 2013 at 12:19 PM, Àlex Magaz Graça
<[email protected]>wrote:

Hi,

I'm trying to upgrade from XWiki 3.1 to 4.4, but I'm having problems with
the data migration process.

It all goes well up until R40000XWIKI6990, which fails due to a duplicate
key (see below, full Tomcat log also attached). It also fails with safemode
enabled.

ERROR o.h.u.JDBCExceptionReporter    - ERROR: duplicate key value violates
unique constraint "xwikidoc_pkey"

I've tried running SQL commands from XWIKI-8129 [1] jira issue too, but
it doesn't apply any modification in my case. So it doesn't make any
difference.

Older version of XWiki in-between also fail.

The system set up is:

Fedora 14 (x86_64)
Java 1.6.0_20 -- OpenJDK Runtime Environment (IcedTea6 1.9.10)
Tomcat 6
PostgreSQL 8.4.9
XWiki 3.1 (upgraded from 2.2.1 and with no configuration options changes)

Any idea of how to solve this problem?

Thanks,
Àlex

[1] 
http://jira.xwiki.org/browse/**XWIKI-8129<http://jira.xwiki.org/browse/XWIKI-8129>



Hi Denis,

I finally got it solved yesterday. I was able to find the database record that made the migration process fail by rising the log level to debug. I'll explain in case someone else finds a similar problem.

The problem was a wiki page that somehow got duplicated or created twice, but with a slightly different name. Moreover, although the two database records had different document ids, the id migration process assigned the same final id for both of them. The records look like this in the database:

xwd_id | xwd_fullname | xwd_name | xwd_title |
----------+------------------------------------------+----------+------------------------------------+
292584123 | Main.Cursos per a professorat 2011.2012 | 2012 | Cursos per a professorat 2011/2012 | 971984561 | Main\.Cursos per a professorat 2011.2012 | 2012 | Cursos per a professorat 2011/2012 |


xwd_date | xwd_content_update_date | xwd_creation_date | xwd_author | xwd_content_author
---------------------+-------------------------+---------------------+---------------+--------------------+
2011-10-25 20:30:10 | 2011-10-25 20:30:10 | 2011-08-26 13:30:42 | XWiki.user1 | XWiki.user1 2012-11-12 11:25:30 | 2012-11-12 11:25:30 | 2011-12-13 15:41:49 | XWiki.user2 | XWiki.user2


xwd_creator | xwd_web | xwd_version | xwd_parent
----------------+------------------------------------+-------------+-------------
XWiki.user2 | Main.Cursos per a professorat 2011 | 146.1 | Main.BETSEA XWiki.user1 | Main.Cursos per a professorat 2011 | 22.1 | Main.BETSEA


The rest of the fields either have the same values or are empty. As can be seen in xwd_fullname, it looks like the dot on the page name might have confused XWiki. In fact, if get to the page from the web interface, the name of the page is "2012". It is as if XWiki had split the name at the "." and had taken the previous string as the space name. The URL looks like this:

http://intranet-sbd.udl.cat/xwiki/bin/view/Main.Cursos+per+a+professorat+2011/2012

and in the toolbar the following appears:

SPACE: Main.Cursos per a professorat 2011
PAGE: 2012

This is for the first record in the database. I couldn't access the second one from the web interface.

By deleting the page corresponding to the first record, the migration process finishes without problems. Now I'd like to instead remove the references to the second page from the database. Would it be enough to remove the entries with the following commands?

delete FROM xwikidoc where xwd_id=292584123;
delete FROM xwikiattachment where xwa_doc_id=292584123;
delete FROM xwikilinks where xwl_doc_id=292584123;
delete FROM xwikircs where xwr_docid=292584123;

If you think this might be a bug that should be solved, I still can send the logs or provide any information needed.

Thanks,
Àlex
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to