Resource Menu


posted by Rüdiger Lincke at Aug 28, 2007 4:05 PM
Quote
cool
posted by Sebastien Jourdain at Aug 27, 2007 4:13 PM
Quote
I'm currently packaging it… It will be LibreSource 2.3…
posted by Rüdiger Lincke at Aug 22, 2007 5:02 PM
Quote
Hehe, I was just about to install subversion

I guess I will continue using So6 then, until SVN migration is supported in the next release.

Can you please be more specific about the next release? Will it be LS Community 3.0, as indicated in your roadmap? Do you already have a release date?

Thank you.

posted by Sebastien Jourdain at Aug 22, 2007 3:33 PM
Quote
Good to ear that...

Thanks for your feed back.

PS: Don't use the subversion part, just wait the next release of september… No migration of subversion is supported…

posted by Rüdiger Lincke at Aug 22, 2007 3:12 PM
Quote
Ok, I fixed the problem.

It had nothing to do with the database.

Maybe something went wrong during installation.

the folder clearbits was missing in: JONAS_4_7_6/work/webapps/jonas/LibreSource-Community-2.2/LibreSource-Web-2.0/pages/images

I copied it from the LibreSource-Web-Static-2.0 folder.

Now it works

posted by Rüdiger Lincke at Aug 22, 2007 1:07 PM
Quote
Hello, I think I migrated now successfully to LS 2.2.

Yet, I wonder why the images bookmark and watch the resource are not displayed next to the resource title.

I guess its because I did not bootstrap, but migrate from an old version. Any idea, where I need to put the image files?

Thank you, Rüdiger

posted by Rüdiger Lincke at Aug 21, 2007 2:19 PM
Quote
Crap, indeed I dumped the old 1.0 database.

I am sorry for bothering you. Nice to know that I am not the only one doing this mistake

Thank you for the email with the conversation tool.

I will let you know once I succeeded.

Thank you again, Rüdiger

posted by Sebastien Jourdain at Aug 21, 2007 1:43 PM
Quote
Are you sure that you dumped the database of Libresource 1.5 and not the old one.

It happend to me during the migration. I mixed up the database… Check in your datasource configuration file of your libresource 1.5 in order to be sure.

Regards,

Seb

PS: The XML import/export don't care about the SQL structure so it can't be that…

posted by Rüdiger Lincke at Aug 21, 2007 1:33 PM
Quote
I think we did it the way as described in http://dev.libresource.org/home/community/forum/48801f65c0a8001e00d993868be4d0b2/4a38ba7fc0a8001e003f71b4cd2b2173.

We exported all data in LS 1.0 to XML, and then imported it in LS 1.5.

Maybe thats the reason why we still got some LS 1.0 data structures.

I hope we can fix that.

posted by Rüdiger Lincke at Aug 21, 2007 1:26 PM
Quote
Thank you for your fast reply and support.

Well, I am running LS 1.5, but I migrated last year February from LS 1.0 to 1.5. The database was originally created with LS 1.0.

Maybe we did something wrong during our migration from LS 1.0 to LS 1.5. I am not 100% sure, but I think we had that time some instructions on how to update the database. Maybe there were not complete, or we did something wrong.

Apart from that, LS 1.5 was running fine with the database as it is. At least I did not experience any big problems. Just with So6, which did not work on all computers of our students for some reasons.

/Rüdiger

posted by Sebastien Jourdain at Aug 21, 2007 1:23 PM
Quote
Ok, I found the program.

For those who need it just send me an e-mail. (It will help me to keep track of the people who has used libresource in version 1.0)

Seb

posted by Sebastien Jourdain at Aug 21, 2007 1:04 PM
Quote
It seems that you are on libresource 1.0 and not 1.5.

The migration from 1.0 to 1.5 is a bite more complexe than the others. For the table that doesn't exist yet, it's not a problem that's the new stuff that we added.

Let me find out the way to update a LS 1.0 to a LS 1.5

Seb

PS: The main problem come from the node_ table and the new fields…

posted by Rüdiger Lincke at Aug 21, 2007 11:28 AM
Quote
Sorry, I just pasted my text file, now it looks a bit weired. Let me know, if I should send you the text file using mail to give you a better layout.

/Rüdiger

posted by Rüdiger Lincke at Aug 21, 2007 11:27 AM
Quote
Hello!

I compared now the table and I prepared a list of differences. If you like I can send you the exported DB schema files using email.

Anyway I found quite some differences not covered by the migration scripts provided at: http://dev.libresource.org/home/doc/migration

Overview differences LS DB Schema 1.5 and
---------------------------------------------
The following lists differences between the database schemas of LS version 1.5 and.
* at the beginning of a line indicates that, it is not covered by migration scripts on homepage.

Changed user management ----------------------- *new: table casusers_ (rename password_digest_ to passworddigest_?) deleted: table libresource_users_ (maybe renamed it to casusers_, but not all attributres?) *new: table subversionuser_ *new: table subversionusers_ *new: table ldapgroupresource_

Modified node handling ---------------------- added colums: table node_, columns: shortname_ character varying, * children_ bytea, updatedate_ timestamp(3) without time zone, creationdate_ timestamp(3) without time zone,

New/changed resources --------------------- *new: table dropboxresource_ added column: table fileresource_, column displayname_ character varying *new: table formresource_ *changed type: table issueresource_, column issueid_, from character varying to integer *added column: table pageresource_, column versionable_ boolean new: table profileresource_ *added column: table synchronizerresource_, column fileencoding_ character varying added columns: table timelineresource_, columns: publicevents_ boolean, * loggedevents_ bytea *new: table subversionrepositoryresource_

Other ----- *new: tables page_history_* (propably not important for migration) *new: table qrtz_blob_triggers *new: table qrtz_calendars *new: table qrtz_cron_triggers *new: table qrtz_fired_triggers *new: table qrtz_job_details *new: table qrtz_job_listeners *new: table qrtz_locks *new: table qrtz_paused_trigger_grps *new: table qrtz_scheduler_state *new: table qrtz_simple_triggers *new: table qrtz_trigger_listeners *new: table qrtz_triggers *changed table: ALTER TABLE ONLY casusers_ ADD CONSTRAINT casusers__pkey PRIMARY KEY (username_); ALTER INDEX public.casusers__pkey OWNER TO postgres; *changed table: ALTER TABLE ONLY dropboxresource_ ADD CONSTRAINT dropboxresource__pkey PRIMARY KEY (id_); ALTER INDEX public.dropboxresource__pkey OWNER TO postgres; *change table: ALTER TABLE ONLY formresource_ ADD CONSTRAINT formresource__pkey PRIMARY KEY (id_); ALTER INDEX public.formresource__pkey OWNER TO postgres; *change table: ALTER TABLE ONLY ldapgroupresource_ ADD CONSTRAINT ldapgroupresource__pkey PRIMARY KEY (id_); ALTER INDEX public.ldapgroupresource__pkey OWNER TO postgres; *change table: ALTER TABLE ONLY profileresource_ ADD CONSTRAINT profileresource__pkey PRIMARY KEY (id_); ALTER INDEX public.profileresource__pkey OWNER TO postgres; *change table: same for all qrtz_* *change table: same for all subversion*

Questions


  • What about the changed type in table issueresource_? Can I do this during migration?
  • What about the bug in wsconnectionresource_? Should it be localhost or my real url?
  • Can I just create all the missing tables as in the Schema of LS 2.2?
  • What about adding children_ in table node_? Which default value?
Please provide me with instructions on how to migrate my old data.

Thank you, Rüdiger

posted by Rüdiger Lincke at Aug 21, 2007 8:56 AM
Quote
Hello Sebastien,

Thank you for your fast answer.

I can not even log in as root. I get directly the exception.

I will follow your suggestions, and bootstrab on an empty database. Then I will compare teh schemas.

I come back to you with the difference.

Rüdiger

posted by Sebastien Jourdain at Aug 20, 2007 5:27 PM
Quote
Hello Rüdiger,

welcome back on LibreSource forum… Normaly from a version 1.5 to 2.x you shouldn't loose any data.

I've never executed the script directly but basicaly by executing by hand SQL query one by one in order to follow the whole process and validate each step it worked without any trouble. But it was some time ago I don't remember much.

Do you manage to login yourself as root ? (even with output error ?) If so try to add at the end of the url "?refreshName"

If it doesn't work, I will need some more informations.

The things you should do then :

  1. Export the SQL schema of the migrated table
  2. Drop your new database. (dropdb libresource)
  3. Create a new empty one.
  4. run jonas and bootstrap it with the default bootstrap
  5. Export the SQL schema of the migrated table
  6. Tell me the table differences…
Good luck and let me know...

Seb

posted by Rüdiger Lincke at Aug 20, 2007 5:03 PM
Quote
Hello, we found finally some time to upgrade our LS installation, to be ready for the autumn semester.

We were running LS 1.5, and now we try to upgrade to LS 2.2 thereby imgrating our data, originally created on a LS 1.0 installation. We also move our LS to a different server (Linux).

On the new server I installed Postgres and created a postgres user and an empty libresource database.

I exported the database on the system running LS 1.5 using the pg_dump command (as described somewhere else in this forum). Then I imported this database into the new database using pg_restore.

So I should have all the relevant data on my new system. Now I used the provided SQL scripts to adapt the database structure from 1.5 to 2.0, and then, in a second step from 2.0 to 2.2.

First problem, the SQL script does not work as it is provided. It specifies a user_ table, but there is no such table in the database. I assume it is the libresource_users_ table which is meant and I modified the script. Also the passworddigest_ column did not exist, and I changed it in the script to password_digest_. After this the first SQL script worked without error. (I added some new line characters after some comments, but dont think it matters.)

Applying the second script worked without problems.

Now I installed LS 2.2 using the java installer. This worked without problems. I can start LS using ./start.sh. This seems to work, except of the usual warnings about missing Trans Attributes:

2007-08-20 14:57:17,854 : SessionDesc.checkTxAttribute : trans-attribute missing for method public abstract boolean org.libresource.LibresourceService.canMapResourceForSecurity(java.net.URI,java.net.URI) throws org.libresource.LibresourceException,java.rmi.RemoteException in session bean LibresourceFormService (set to the default value Supports)

I assume after reading:

The JOnAS Server 'jonas' version 4.7.6 is ready 2007-08-20 14:57:21,395 : Server.start : JOnAS server 'jonas' started on rmi/jeremie

Everything should work.

But if I am now accessing the server over http://localhost:9000, I get quite some exceptions about a missing column children_ in the table/relation node_:

… Caused by: javax.ejb.EJBException: Failed to create bean: ERROR: column "children_" of relation "node_" does not exist

at org.objectweb.jonas_gen.org.libresource.kernel.ejb.JOnASNode_1237537263Bean.ejbPostCreate(JOnASNode_1237537263Bean.java:552) at org.objectweb.jonas_gen.org.libresource.kernel.interfaces.JOnASNode_1237537263LocalHome.create(JOnASNode_1237537263LocalHome.java:148) … 91 more 2007-08-20 15:01:30,850 : JFactory.postInvoke : system exception in business method: java.rmi.RemoteException: RuntimeException thrown by an enterprise Bean; nested exception is: javax.ejb.TransactionRolledbackLocalException: Failed to create bean: ERROR: column "children_" of relation "node_" does not exist

at org.objectweb.jonas_gen.org.libresource.kernel.interfaces.JOnASKernelService_861693235Remote.systemBootstrap(JOnASKernelService_861693235Remote.java:4897) at org.libresource.kernel.ejb.NodeBean.ejbHomeGetByPath(NodeBean.java:133) at org.objectweb.jonas_gen.org.libresource.kernel.interfaces.JOnASNode_1237537263LocalHome.getByPath(JOnASNode_1237537263LocalHome.java:338) at org.libresource.kernel.ejb.KernelServiceBean.systemLookup(KernelServiceBean.java:2462) at org.objectweb.jonas_gen.org.libresource.kernel.interfaces.JOnASKernelService_861693235Remote.systemLookup(JOnASKernelService_861693235Remote.java:1373) at org.libresource.membership.ejb.MembershipServiceBean.systemGetProfile(MembershipServiceBean.java:816) at org.libresource.membership.ejb.MembershipServiceBean.getProfile(MembershipServiceBean.java:878) at org.objectweb.jonas_gen.org.libresource.membership.interfaces.JOnASMembershipService860227629Remote.getProfile(JOnASMembershipService860227629Remote.java:1078) at org.libresource.web.Helper.getConnectedUserProfile(Unknown Source) at org.libresource.web.taglibs.JspFunctions.connectedUser(Unknown Source) ...

I assume it would be enough to add this column, but what are the parameters?

Did I miss something? Are your migration scripts maybe missing something?

Is there a better way to upgrade to LS 2.2 from 1.5 and keeping all the data including the users?

Thank you very much, Rüdiger

posted by Sebastien Jourdain at Dec 13, 2006 11:28 AM
Quote
Hello Rüdiger,

to migrate from 1.5 to 2.0 you should execute some SQL commands. We are working on a small java executable for the futur migration change. Unfortunatly we didn't had the time to make it for this release.

Have fun with the 2.0...

the script is given here

--
-- CAS UPDATE
-- create the new users table
CREATE TABLE casusers_ AS SELECT username_, passworddigest_ FROM user_;

-- update the old users table ALTER TABLE user_ RENAME TO profileresource_; UPDATE node_ SET bindedresourceidentifier_ = replace(bindedresourceidentifier_ , '/User/', '/Profile/'); ALTER TABLE profileresource_ DROP COLUMN passworddigest_ ; ALTER TABLE profileresource_ ADD COLUMN infos_ bytea ; ALTER TABLE profileresource_ RENAME username_ TO id_; ALTER TABLE profileresource_ RENAME jabber_ TO jabberid_;

-- create guest profile INSERT INTO profileresource_ (id_, fullname_, email_, jabberid_) VALUES ('guest', 'Guest', '', '');

-- init users profiles UPDATE profileresource_ SET infos_ = '\\254\\355\\000\\005sr\\000\\021java.util.HashMap\\005\\007\\332\\301\\303\\026`\\321\\003\\000\\002F\\000\\012loadFactorI\\000\\011thresholdxp?@\\000\\000\\000\\000\\000\\014w\\010\\000\\000\\000\\020\\000\\000\\000\\000x';

-- -- OTHERS UPDATES

-- public timeline ALTER TABLE timelineresource_ ADD COLUMN publicevents_ boolean; UPDATE timelineresource_ SET publicevents_ = 'f' ;

-- node creation date ALTER TABLE node_ ADD COLUMN creationdate_ timestamp; UPDATE node_ SET creationdate_ = now();

-- node update date ALTER TABLE node_ ADD COLUMN updatedate_ timestamp; UPDATE node_ SET updatedate_ = now();

-- node shortname ALTER TABLE node_ ADD COLUMN shortname_ varchar;

-- fix bug in wsconnection table UPDATE wsconnectionresource_ SET manager_ = substring(manager_ from char_length('ls://localhost:9000/') for char_length(manager_)) WHERE manager_ LIKE 'ls://localhost:9000/%';

posted by Rüdiger Lincke at Dec 13, 2006 11:00 AM
Quote
Hello, we are currently running LibreSource 1.5, and would like to upgrade to 2.0.

Are there special upgrade instructions available? Or can we just install 2.0 and connect it to the existing database now running on 1.5?

I mean, is the database version compatible between 1.5 and 2.0?

Thank you, Rüdiger