Re: [xwiki-users] How to get data from XWiki 0.9.840 working on XWiki 1.0 Beta 1?
Hi Fabian, Any news or progress? Ludovic has answered to you but I didn't see any answer from you... (I may have missed it though). Thanks -Vincent On Jan 7, 2007, at 1:13 AM, Ludovic Dubost wrote:
This line looks bad in your log file
15:05:41,526 ERROR http-8080-1 http://localhost:8080/xwiki/bin/view/ Main/WebHome XWikiHibernateBaseStore:updateSchema:334 - Failed updating schema: ERROR: update or delete on "xwikiproperties" violates foreign key constraint "fkdf25ae4f283ee295" on "xwikilongs" Detail: Key (xwp_id,xwp_name)=(-1931600447,editbox_height) is still referenced from table "xwikilongs".
You might want to try cleaning references between xwikilongs and xwikiproperties
Fabian Gorsler a écrit :
Hi Vincent,
thanks for your fast reply. :)
The migration is described in the Release Notes and I've just linked it from the installation page this morning.
The tasks described in the Release Notes don't work for my problem. At the moment I'm not able to display anything with XWiki, I just receive exceptions.
Ha, that would be a problem. We need to track this as this is supposed to be the way to upgrade. What errors are you getting?
org.postgresql.util.PSQLException: ERROR: column xwikidocum0_.xwd_title does not exist
This exception led me to assume that Hibernate mappings have changed. The dump I've set up on my database for testing is identical to the live system which serves the old XWiki.
(The whole log with more exceptions and details is here: http://www.der-moloch.de/files/xwiki-ml/xwiki_stdout.log)
Don't do it manually!
:)
We thought it would work seamlessly but it seems it doesn’t in your case so we need to find out what's not working. Let's work together to resolve this.
This sounds really great. Perhaps I should pass you my whole configuration at first:
- OS: Windows XP SP 2 - Tomcat 5.5.20 - JVM: Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03) - DB: PostgreSQL 8.1.5 (JDBC: postgresql-8.1-408.jdbc3.jar) / UTF-8
The things I did:
- I downloaded xwiki-1.0-beta-1.war and deployed it via Tomcat Manager. - Stopped Tomcat. - Renamed xwiki-1.0-beta-1/ to xwiki/ in webapps-folder of Tomcat. - Added Postgres-JDBC-driver to xwiki/WEB-INF/lib. - Edited hibernate.cfg.xml: Removed MySQL entries, pasted our configuration of the old XWiki and reconfigured some connection settings. - Started Tomcat and tried to open http://localhost:8080/xwiki/bin/view/Main/WebHome.
The connection settings from hibernate.cfg.xml: <property name="connection.url">jdbc:postgresql://localhost/xwikidb</property> <property name="connection.username">xwiki</property> <property name="connection.password">topsecret</property> <property name="connection.driver_class">org.postgresql.Driver</ property> <property
name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionPro vider</property>
<property name="connection.pool_size">50</property> <property name="statement_cache.size">50</property> <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</ property>
Connections to the Postgres-DB are opened and data is transferred. The connection seems to be ok.
Which information do you need additionally? What should I try to do?
Thanks in advance for your help! :)
Best regards, Fabian.
Hi Vincent and Ludovic, I'm sorry, I didn't see the answer. I saw this line in the logs and (now I remember...) wanted to ask, whether it is possible to delete the rows from xwikilongs without serious problems in later progress. Which other tables could be "cleaned"? Are there even more data sets which could be called temporary? The upgrade would be a good idea for cleaning up. After my last post on this thread I didn't test further options to upgrade, because I didn't have time to do it. So there are now new results from my side. BTW: Dandre, who had a problem with upgrading while using Postgres, wrote me a mail and asked if I had any suggestions for his problem. We will now try to solve the problem together and report results to the mailing list. This week I'm not in office, but I hope next week I will have time to test to upgrade (to b3). After problems during upgrade with 1.0b1 we decided to wait for upgrading our wiki (0.9.840 - runs very good (with Postgres 8.1 :-)), but sometimes there are unreproceable errors with file upload) until 1.0 final is released. Best regards, Fabian.
Hi, I finally managed the update from XWiki 0.9.840 to 1.0b3 running on Postgres 8.1. :-) For my situation two SQL commands were necessary in order to have a pretty nice 1.0b3 instance. 1) Have a look at the xwikilongs-table. Write down the row for upload_maxsize. Later you will have to insert the whole row. 2) DELETE FROM xwikilongs; (Be careful!) 3) Deploy the new XWiki version and configure your database in hibernate.cfg.xml. 4) Start the context and access your WebHome. Hibernate will update your database layout, but you will receive a exception, because XWiki can't find your configuration setting for upload_maxsize...;-) 5) INSERT INTO xwikilongs VALUES(PK_OF_THE_PARAM, 'upload_maxsize', VALUE_OF_THE_PARAM); (Replace PK_OF_THE_PARAM and VALUE_OF_THE_PARAM with your values.) 6) Have fun with your upgraded XWiki! :-D Today I have done this procedure twice in order to be sure that it works and both times it worked without any problems. After upgrading I did some tests (attaching files, browsing, etc.) and everything worked really fine. One thing everyone should consider to do: Go to your XWiki directory and delete the skins/default folder in order to replace it with skins/xwiki10b1 in order to have the new skin. Only with the new skin you can access new features like the improved settings editor and so on. If you did not use the default skin with your old XWiki, have a look at the database and run an UPDATE on xwikiprefs.xwd_skin (I think thats the right table/column. I forgot to write it down...). HTH PS: Thanks a lot XWiki-devs and go for the release! After testing this beta release, we now know more than ever that XWiki was the right choice for us! Great work! Best regards, Fabian.
Hi, Fabian, Thank you for sharing your tips. I am also trying to migrate from 0.9.840 to 1b3 using postgresql 8.1. I tried your approach and it did not work for me. I think "upload_maxsize" is a custom property and I didn't have it in my xwikilongs/xwikiproperties table. I keep getting a lot of errors like this in my log files after my upgrade. 16:31:15,498 ERROR http-8080-Processor25 http://localhost:8080/xwiki/bin/view/Ma in/WebHome BasicLazyInitializer:getProxyFactory:130 - CGLIB Enhancement failed: com.xpn.xwiki.objects.classes.DateClass java.lang.NoClassDefFoundError at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyIni tializer.java:116) at org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFacto Did you have this kind of CGLIB errors before? Thanks -Jimmy
Hi,
I finally managed the update from XWiki 0.9.840 to 1.0b3 running on Postgres 8.1. :-) For my situation two SQL commands were necessary in order to have a pretty nice 1.0b3 instance.
1) Have a look at the xwikilongs-table. Write down the row for upload_maxsize. Later you will have to insert the whole row. 2) DELETE FROM xwikilongs; (Be careful!) 3) Deploy the new XWiki version and configure your database in hibernate.cfg.xml. 4) Start the context and access your WebHome. Hibernate will update your database layout, but you will receive a exception, because XWiki can't find your configuration setting for upload_maxsize...;-) 5) INSERT INTO xwikilongs VALUES(PK_OF_THE_PARAM, 'upload_maxsize', VALUE_OF_THE_PARAM); (Replace PK_OF_THE_PARAM and VALUE_OF_THE_PARAM with your values.) 6) Have fun with your upgraded XWiki! :-D
Today I have done this procedure twice in order to be sure that it works and both times it worked without any problems. After upgrading I did some tests (attaching files, browsing, etc.) and everything worked really fine.
One thing everyone should consider to do: Go to your XWiki directory and delete the skins/default folder in order to replace it with skins/xwiki10b1 in order to have the new skin. Only with the new skin you can access new features like the improved settings editor and so on. If you did not use the default skin with your old XWiki, have a look at the database and run an UPDATE on xwikiprefs.xwd_skin (I think thats the right table/column. I forgot to write it down...).
HTH
PS: Thanks a lot XWiki-devs and go for the release! After testing this beta release, we now know more than ever that XWiki was the right choice for us! Great work!
Best regards, Fabian.
Hi Jimmy, On Di, 2007-02-06 at 13:45 -0800, jimmy@comkraft.com wrote:
Did you have this kind of CGLIB errors before?
no, up to now I didn't receive such a kind of exception (for luck, finally it's done. :-D). Are you sure your XWiki JAR/WAR/whatever wasn't corrupted? I think this problem is rather related to Postgres. But this is just a guess. What I forgot to ask for: Are there any documents regarding the database layout? Something like "what data is stored there, how are the relations, which data sets are just temporarily needed, ..." - from my point of view this could be very interesting and helpful. Perhaps anyone of the Devs knows more about that stuff? Best regards, Fabian.
Fabian, My problem was solved. Thanks to Sergiu, it turned out that my problem was caused by a previous bug in the version(from subversion) I used. It didn't fail in the 1.0 b3 version but failed in my 0.9.840 version db. This bug coupled with my xwiki upgrade using postgresql which made it difficult to track down. It is a good idea to suggest a data schema with relationships etc. It will definitely help to track down xwiki/schema upgrade issues. Maybe a schema via tools like HibernateIDE or Jboss IDE (based on the .hbm.xml) will be helpful. Thanks -Jimmy
Hi Jimmy,
On Di, 2007-02-06 at 13:45 -0800, jimmy@comkraft.com wrote:
Did you have this kind of CGLIB errors before?
no, up to now I didn't receive such a kind of exception (for luck, finally it's done. :-D).
Are you sure your XWiki JAR/WAR/whatever wasn't corrupted? I think this problem is rather related to Postgres. But this is just a guess.
What I forgot to ask for: Are there any documents regarding the database layout? Something like "what data is stored there, how are the relations, which data sets are just temporarily needed, ..." - from my point of view this could be very interesting and helpful. Perhaps anyone of the Devs knows more about that stuff?
Best regards, Fabian.
On Feb 7, 2007, at 1:17 AM, Fabian Gorsler wrote:
Hi Jimmy,
[snip]
What I forgot to ask for: Are there any documents regarding the database layout? Something like "what data is stored there, how are the relations, which data sets are just temporarily needed, ..." - from my point of view this could be very interesting and helpful. Perhaps anyone of the Devs knows more about that stuff?
We have this page on xwiki.org (please check the DebGuide for this kind of information): http://www.xwiki.org/xwiki/bin/view/DevGuide/DatabaseSchema I'm pretty sure it's not fully up to date as it was done some time ago but it should still represent a good portion of what's in the database. If someone finds a discrepancy, please help us update it. Thanks -Vincent ___________________________________________________________________________ Yahoo! Mail r�invente le mail ! D�couvrez le nouveau Yahoo! Mail et son interface r�volutionnaire. http://fr.mail.yahoo.com
Hi Fabian, On Feb 6, 2007, at 8:29 PM, Fabian Gorsler wrote:
Hi,
I finally managed the update from XWiki 0.9.840 to 1.0b3 running on Postgres 8.1. :-) For my situation two SQL commands were necessary in order to have a pretty nice 1.0b3 instance.
1) Have a look at the xwikilongs-table. Write down the row for upload_maxsize. Later you will have to insert the whole row. 2) DELETE FROM xwikilongs; (Be careful!) 3) Deploy the new XWiki version and configure your database in hibernate.cfg.xml. 4) Start the context and access your WebHome. Hibernate will update your database layout, but you will receive a exception, because XWiki can't find your configuration setting for upload_maxsize...;-) 5) INSERT INTO xwikilongs VALUES(PK_OF_THE_PARAM, 'upload_maxsize', VALUE_OF_THE_PARAM); (Replace PK_OF_THE_PARAM and VALUE_OF_THE_PARAM with your values.) 6) Have fun with your upgraded XWiki! :-D
Today I have done this procedure twice in order to be sure that it works and both times it worked without any problems. After upgrading I did some tests (attaching files, browsing, etc.) and everything worked really fine.
That's really cool, thanks. Now the next step is to prevent users from having to do this at all I think... We have an updateSchema() method in the XWikiHibernateBaseStore class. Does anyone know why steps 1) and 5) have to be done for it to work with PostGreSQL? Is that something we could add in updateSchema()?
One thing everyone should consider to do: Go to your XWiki directory and delete the skins/default folder in order to replace it with skins/xwiki10b1 in order to have the new skin. Only with the new skin you can access new features like the improved settings editor and so on. If you did not use the default skin with your old XWiki, have a look at the database and run an UPDATE on xwikiprefs.xwd_skin (I think thats the right table/column. I forgot to write it down...).
AFAIK the easiest way to change the skin is to log in as admin, edit your wiki preferences and under skin, use xwiki10b1.
PS: Thanks a lot XWiki-devs and go for the release! After testing this beta release, we now know more than ever that XWiki was the right choice for us! Great work!
Thanks for the kind words and thanks for fixing the PostGreSQL issue! Lots of users are going to praise you :-) -Vincent ___________________________________________________________________________ Yahoo! Mail r�invente le mail ! D�couvrez le nouveau Yahoo! Mail et son interface r�volutionnaire. http://fr.mail.yahoo.com
participants (3)
-
Fabian Gorsler -
jimmy@comkraft.com -
Vincent Massol