Resource Menu

posted by Rüdiger Lincke at Aug 28, 2007 4:05 PM
posted by Sebastien Jourdain at Aug 27, 2007 4:13 PM
I'm currently packaging it… It will be LibreSource 2.3…
posted by Rüdiger Lincke at Aug 22, 2007 5:02 PM
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
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
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
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
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
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.



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
I think we did it the way as described in

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
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.


posted by Sebastien Jourdain at Aug 21, 2007 1:23 PM
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)


posted by Sebastien Jourdain at Aug 21, 2007 1:04 PM
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


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
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.


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

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:

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*


  • 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
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.


posted by Sebastien Jourdain at Aug 20, 2007 5:27 PM
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...


posted by Rüdiger Lincke at Aug 20, 2007 5:03 PM
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 ./ 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(, 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 at … 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 at org.libresource.kernel.ejb.NodeBean.ejbHomeGetByPath( at at org.libresource.kernel.ejb.KernelServiceBean.systemLookup( at at org.libresource.membership.ejb.MembershipServiceBean.systemGetProfile( at org.libresource.membership.ejb.MembershipServiceBean.getProfile( at 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
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

-- 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';


-- 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
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