Re: [xwiki-devs] [xwiki-notifications] Problems with XWiki 3.1
Hi Federico, This looks really strange. The failure happen during the update of the database schema by Hibernate, to conform with the updated hibernate mapping of XWiki 4.x. The errors says that a new foreign key constrains should be added for column agl_id of table feeds_aggregatorurlgroups to the primary key of table feeds_aggregatorurl, but that this last table does not have any primary key which is really weird. Are you sure you have properly imported the database ? You may try to alter the table feeds_aggregatorurl to declare its primary key as agg_id, but I am afraid you we fail on other similar issue for other table as well, since this kind of error is really unexpected. Regards, On Wed, Aug 7, 2013 at 3:17 PM, Federico Moglia < [email protected]> wrote:
Thanks Sergio! I attach the complete log of catalina.out of the moment when I try to access to the new version by the browser. The first exception that I see is: 2013-08-07 09:47:56,657 [http://localhost:9001/xwiki/bin/view/Main/] ERROR .x.x.s.XWikiHibernateBaseStore - Failed updating schema while executing query [alter table feeds_aggregatorurlgroups add constraint FK7B845B068E772CC foreign key (agl_id) references feeds_aggregatorurl] org.postgresql.util.PSQLException: ERROR: there is no primary key for referenced table "feeds_aggregatorurl"
There are more exceptions related with SQL after of this. Could you explain me why is happening? How I can resolve it?
Thank you again!
On Wed, Aug 7, 2013 at 10:12 AM, Federico Moglia < [email protected]> wrote:
Thanks Sergio! I attach the complete log of catalina.out of the moment when I try to access to the new version by the browser. The first exception that I see is: 2013-08-07 09:47:56,657 [http://localhost:9001/xwiki/bin/view/Main/] ERROR .x.x.s.XWikiHibernateBaseStore - Failed updating schema while executing query [alter table feeds_aggregatorurlgroups add constraint FK7B845B068E772CC foreign key (agl_id) references feeds_aggregatorurl] org.postgresql.util.PSQLException: ERROR: there is no primary key for referenced table "feeds_aggregatorurl"
There are more exceptions related with SQL after of this. Could you explain me why is happening? How I can resolve it?
Thank you again!
On Tue, Aug 6, 2013 at 11:55 AM, Sergiu Dumitriu <[email protected]>wrote:
Hi Federico,
The root of the problem seems to be a corrupted database.
Changing rights fails to commit the changes to the database.
Trying to upgrade fails to execute some migrations, mandatory database changes needed for the new version. You should look at the logs that occur while starting the new version, it will say what migration failed to execute and why.
On 08/06/2013 09:23 AM, Federico Moglia wrote:
Hi! I'm Federico and I'm working with XWiki Enterprise 3.1. I have some problems in the app, for example, when I tried to assign rights to any user. Attach screen of error and a txt file with the stack trace of exception.
For try to solve this, I've imported the xwiki database to the version 4.1.1. The restore in PostgreSQL didn't give any errors. But when I tried to access, the application shows me this exception in the browser: Exception while switching to database xwiki Wrapped Exception: Database xwiki needs migration(s), it could not be safely used! (Attach file with the full stack trace) I am using PostgreSQL 9.1. In the file xwiki.cfg, I have configured the migration with the next line: xwiki.store.migration=1. So, I don't understand why fails. Maybe my database is corrupted and this is the cause of the problem. But I don't know how I solve this.
When I tried to import the xwiki in .xar format, the log in catalina.out shows this: 2013-07-26 16:17:43,752 http://localhost:9001/xwiki/bin/get/XWiki/XWikiPreferences?xpage=packageinfo... c.x.x.p.p.Package - Failed to parse document [Disney/GlosarioTecnico.xml] from XML during import, thus it will not be installed. The error was: Error number 2002 in 2: Error parsing xml Wrapped Exception: Truncated ZIP file Nested exception: Truncated ZIP file
The information that I've found in Internet was not very useful to resolve the problem, for this reason, I decided to write you. I hope that you can help me with this.
Thanks!
-- Sergiu Dumitriu http://purl.org/net/sergiu
_______________________________________________ notifications mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/notifications
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO
I tried to import the XWiki in the version 5.1. I have similar SQL exceptions than when I did it with 4.1. I noticed that in the XWiki that I'm using, all the tables of the DB have not defined a primary key. Is it normal? How could it happen this? -- View this message in context: http://xwiki.475771.n2.nabble.com/Re-xwiki-notifications-Problems-with-XWiki... Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi Federico, All tables should have primary keys. You definitely have a issue with your database setup or the way you create the initial database to import. On Fri, Aug 16, 2013 at 3:29 PM, Federico Moglia <[email protected]>wrote:
I tried to import the XWiki in the version 5.1. I have similar SQL exceptions than when I did it with 4.1. I noticed that in the XWiki that I'm using, all the tables of the DB have not defined a primary key. Is it normal? How could it happen this?
-- View this message in context: http://xwiki.475771.n2.nabble.com/Re-xwiki-notifications-Problems-with-XWiki... Sent from the XWiki- Dev mailing list archive at Nabble.com. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO
My original XWiki DB had no defined the primary keys in the tables. I added all the primary keys manually and tried to access to XWiki 4.1. The browser showed an error again. I attached the complete log of when I tried to access. I tested with the version 5.1 and I didn't have success neither. Do you have any idea of how can resolve these errors? Exception in XWiki 4.1 2013-08-21 11:08:30,063 [http://localhost:9001/xwiki-4.1/bin/view/Main/] INFO .HibernateDataMigrationManager - Failed to migrate database [xwiki]... com.xpn.xwiki.store.migration.DataMigrationException: Data migration R40000XWIKI6990 failed Exception in XWiki 5.1 2013-08-27 10:47:49,242 [http://localhost:9001/xwiki-5.1/bin/view/Main/] INFO .HibernateDataMigrationManager - Checking Hibernate mapping and updating schema if needed for wiki [xwiki] 2013-08-27 10:48:11,519 [http://localhost:9001/xwiki-5.1/bin/view/Main/] INFO .HibernateDataMigrationManager - Failed to migrate database [xwiki]... Caused by: org.postgresql.util.PSQLException: ERROR: relation "hibernate_sequence" already exists Exception_after_add_the_primary_keys_in_the_tables_XWiki_4.1.txt <http://xwiki.475771.n2.nabble.com/file/n7586852/Exception_after_add_the_primary_keys_in_the_tables_XWiki_4.1.txt> Exception_after_add_the_primary_keys_in_the_tables_XWiki_5.1.txt <http://xwiki.475771.n2.nabble.com/file/n7586852/Exception_after_add_the_primary_keys_in_the_tables_XWiki_5.1.txt> -- View this message in context: http://xwiki.475771.n2.nabble.com/Re-xwiki-notifications-Problems-with-XWiki... Sent from the XWiki- Dev mailing list archive at Nabble.com.
Could you give me any idea? I couldn't resolve the problem yet. Thanks! -- View this message in context: http://xwiki.475771.n2.nabble.com/Re-xwiki-notifications-Problems-with-XWiki... Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi Federico, Your 4.1 trial looks far better than the 5.1. You should have a look at http://jira.xwiki.org/browse/XWIKI-8129. If you do not care about old statistics in your wiki, you may as well drop all rows in the stats table. Let me know the outcome. Regards, On Thu, Sep 5, 2013 at 2:28 PM, Federico Moglia <[email protected]>wrote:
Could you give me any idea? I couldn't resolve the problem yet.
Thanks!
-- View this message in context: http://xwiki.475771.n2.nabble.com/Re-xwiki-notifications-Problems-with-XWiki... Sent from the XWiki- Dev mailing list archive at Nabble.com. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO
I run the SQL statements that are in the first comment of http://jira.xwiki.org/browse/XWIKI-8129 and no rows were affected. I dropped all the records of the xwikistatsdoc table. I tried to access to XWiki and I obtained the next error: Caused by: com.xpn.xwiki.XWikiException: Error number 3005 in 3: Unable to update schema of database xwiki. Wrapped Exception: Validation Failed: 15 change sets check sum liquibase.xml::R40000-000::sdumitriu is now: 3:5865b5ffacf761b3e6fc03ea5b5c0eee liquibase.xml::R40000-001::sdumitriu is now: 3:d2fe890daecd167bbd977f271a0258fd liquibase.xml::R40000-002::sdumitriu is now: 3:7219597902c65373dac2f179d5987c37 liquibase.xml::R40000-005::sdumitriu is now: 3:a2e91d5e06f21695d158007032ca5005 liquibase.xml::R40000-006::sdumitriu is now: 3:b2105ae86b8bac177f9bf1610dff89c7 liquibase.xml::R40000-025::dgervalle is now: 3:8af140a3c413c7674d137c3766301f63 liquibase.xml::R40000-026::dgervalle is now: 3:55b00554fce13e1ac8704dbac2e34fd1 liquibase.xml::R40000-030::sdumitriu is now: 3:673621ceed663ed4756ea6eb12930de1 liquibase.xml::R40000-031::sdumitriu is now: 3:b747ced3155badaeee10c3d67486d94b liquibase.xml::R40000-032::sdumitriu is now: 3:c4ffdbe79482cc4a2a190cac58e25e72 liquibase.xml::R40000-033::sdumitriu is now: 3:7e241dce1d6e1bad3084aa939faab323 liquibase.xml::R40000-035::sdumitriu is now: 3:b3f09cf2de67420d151ad2350343459d liquibase.xml::R40000-036::sdumitriu is now: 3:9bf713063e6255eaf70882fd9c226288 liquibase.xml::R40000-037::sdumitriu is now: 3:25995410c5be9d273713f0329f4dbd1c liquibase.xml::R40000-038::sdumitriu is now: 3:933a285f3d9ffd20ba0231f811df9efe I attached the complete log of Tomcat. Exception_after_clean_xwikistatsdoc_table_in_XWiki_4.1.txt <http://xwiki.475771.n2.nabble.com/file/n7586956/Exception_after_clean_xwikistatsdoc_table_in_XWiki_4.1.txt> -- View this message in context: http://xwiki.475771.n2.nabble.com/Re-xwiki-notifications-Problems-with-XWiki... Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi Frederico, You have probably not reseted your database properly and left behind the DATABASECHANGELOG and DATABASECHANGELOGLOCK tables while restoring the other table to their pristine state. Be very careful that the migration process create those table during the first schema migration, and that these table should be deleted if you need to start over. Hope this helps, On Mon, Sep 9, 2013 at 4:01 PM, Federico Moglia <[email protected]>wrote:
I run the SQL statements that are in the first comment of http://jira.xwiki.org/browse/XWIKI-8129 and no rows were affected. I dropped all the records of the xwikistatsdoc table. I tried to access to XWiki and I obtained the next error:
Caused by: com.xpn.xwiki.XWikiException: Error number 3005 in 3: Unable to update schema of database xwiki. Wrapped Exception: Validation Failed: 15 change sets check sum liquibase.xml::R40000-000::sdumitriu is now: 3:5865b5ffacf761b3e6fc03ea5b5c0eee liquibase.xml::R40000-001::sdumitriu is now: 3:d2fe890daecd167bbd977f271a0258fd liquibase.xml::R40000-002::sdumitriu is now: 3:7219597902c65373dac2f179d5987c37 liquibase.xml::R40000-005::sdumitriu is now: 3:a2e91d5e06f21695d158007032ca5005 liquibase.xml::R40000-006::sdumitriu is now: 3:b2105ae86b8bac177f9bf1610dff89c7 liquibase.xml::R40000-025::dgervalle is now: 3:8af140a3c413c7674d137c3766301f63 liquibase.xml::R40000-026::dgervalle is now: 3:55b00554fce13e1ac8704dbac2e34fd1 liquibase.xml::R40000-030::sdumitriu is now: 3:673621ceed663ed4756ea6eb12930de1 liquibase.xml::R40000-031::sdumitriu is now: 3:b747ced3155badaeee10c3d67486d94b liquibase.xml::R40000-032::sdumitriu is now: 3:c4ffdbe79482cc4a2a190cac58e25e72 liquibase.xml::R40000-033::sdumitriu is now: 3:7e241dce1d6e1bad3084aa939faab323 liquibase.xml::R40000-035::sdumitriu is now: 3:b3f09cf2de67420d151ad2350343459d liquibase.xml::R40000-036::sdumitriu is now: 3:9bf713063e6255eaf70882fd9c226288 liquibase.xml::R40000-037::sdumitriu is now: 3:25995410c5be9d273713f0329f4dbd1c liquibase.xml::R40000-038::sdumitriu is now: 3:933a285f3d9ffd20ba0231f811df9efe
I attached the complete log of Tomcat. Exception_after_clean_xwikistatsdoc_table_in_XWiki_4.1.txt < http://xwiki.475771.n2.nabble.com/file/n7586956/Exception_after_clean_xwikis...
-- View this message in context: http://xwiki.475771.n2.nabble.com/Re-xwiki-notifications-Problems-with-XWiki... Sent from the XWiki- Dev mailing list archive at Nabble.com. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO
Thank you Denis! I dropped the two tables and the migration finished successfully. I could start up the version 4.1.1 of XWiki with my database. The problem is I have the same issues that in the previous version. For example, when I try to change rights in Wiki Preferences -> Rights or the Default editor to use in my User Preferences to Wysiwyg Attached screens and tomcat log of the exceptions. Hope you can help me with this. Exception_changing_rights_XWiki_4.1.1.txt <http://xwiki.475771.n2.nabble.com/file/n7586972/Exception_changing_rights_XWiki_4.1.1.txt> <http://xwiki.475771.n2.nabble.com/file/n7586972/Exception_when_changing_rights.png> Exception_changing_text_editor_to_Wysiwyg.txt <http://xwiki.475771.n2.nabble.com/file/n7586972/Exception_changing_text_editor_to_Wysiwyg.txt> -- View this message in context: http://xwiki.475771.n2.nabble.com/Re-xwiki-notifications-Problems-with-XWiki... Sent from the XWiki- Dev mailing list archive at Nabble.com.
Has somebody got any idea about this? I want to resolve this problem before this month ends if it's possible. -- View this message in context: http://xwiki.475771.n2.nabble.com/Re-xwiki-notifications-Problems-with-XWiki... Sent from the XWiki- Dev mailing list archive at Nabble.com.
participants (2)
-
Denis Gervalle -
Federico Moglia