Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] Preparing the Grouper db

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] Preparing the Grouper db


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Earl Lewis <>, "" <>
  • Subject: RE: [grouper-users] Preparing the Grouper db
  • Date: Mon, 18 Mar 2013 15:52:46 +0000
  • Accept-language: en-US
  • Authentication-results: sfpop-ironport04.merit.edu; dkim=neutral (message not signed) header.i=none

Yeah, I think so.  You could try an export, and delete stuff from the XML file before importing (subelements of parent elements) of everything except stems, but it might give you problems…

 

Thanks,

Chris

 

From: [mailto:] On Behalf Of Earl Lewis
Sent: Monday, March 18, 2013 11:36 AM
To:
Subject: Re: [grouper-users] Preparing the Grouper db

 

Chris,

 

What I called seed data I think you might refer to as bootstrapping, e.g. the root folder structure, group types, group fields, etc. 

 

I was able to successfully run an export on hsql and create the import file, however it contained all of the quickstart data (members, memberships, etc.) along with the stems I wanted to preserve. Seems that the export isn't fine-grained enough for my particular purpose. 

 

Would the only other option be your other recommendation, of creating a gsh script via a sql query of grouper_stems?

 

Earl

801-581-3635 (office)

801-554-3596 (mobile)

 

On 3/16/13 8:05 AM, "" <> wrote:

 

I'm not sure what you mean by seed data, can you give an example?   I think after you have played with the quickstart data, you should generally start over with an empty registry, decide on your structure and build it out....

Though as you mentioned, if you did a lot of work in the quickstart, out would be nice to save some of it...

Thanks
Chris

----- Reply message -----
From: "Earl Lewis" <>
To: "" <>
Subject: [grouper-users] Preparing the Grouper db
Date: Fri, Mar 15, 2013 5:01 pm

 

Chris,

 

This is very helpful. I'll play around with it and see what I can get out of the hsql db. 

 

As to the question of "seed data",  if we do choose to start with a fresh empty Oracle database, do we need to seed it with anything specific? Or will Grouper be smart enough to create a basic structure that we can just start adding to? 

 

The reason I ask is that I see in the quickstart.xml that there are several sections for groupTypesMetaData that would seem to be critical, before the "QS University of Bristol" data starts.

 

Earl

801-581-3635 (office)

801-554-3596 (mobile)

 

On 3/15/13 11:22 AM, "Chris Hyzer" <> wrote:

 

The best way is probably to export from hsql and import to oracle with GSH:

 

https://spaces.internet2.edu/display/Grouper/Import-Export

 

This will do all the data, stems and everything else.

 

If you just want some stems, you could query grouper_stems from hsql, and generate a GSH script that looks like this:

 

grouperSession = GrouperSession.startRootSession();

new StemSave(grouperSession).assignName("a:b:c").assignSaveMode(SaveMode.INSERT_OR_UPDATE).assignDisplayExtension(“Friendly extension”).assignDescription(“Some description”).assignCreateParentStemsIfNotExist(true).save();

new StemSave(grouperSession).assignName("a:b:d").assignSaveMode(SaveMode.INSERT_OR_UPDATE).assignDisplayExtension(“Friendly extension2”).assignDescription(“Some description2”).assignCreateParentStemsIfNotExist(true).save();

etc.

 

Ok?

 

Thanks,

Chris

 

 

From: [] On Behalf Of Earl Lewis
Sent: Thursday, March 14, 2013 4:23 PM
To:
Subject: [grouper-users] Preparing the Grouper db

 

We've spent some time messing around with Grouper and the hsql database that installs by default. We've built out a test folder hierarchy in that hsql db and are wondering about moving it to another database backend. We've successfully setup the hibernate connection to talk to an Oracle backend and also been able to get the DDL script to run successfully to create the Oracle schema.

 

In fact, we were actually able to use the hsql db .script file to load data into the Oracle database and this seemed to work, at least initially. We had to disable/re-enable all the primary/foreign key constraints in order for it to load up but that actually seemed to work fine. Once the database was running for a while hibernate started throwing some errors and everything eventually came crashing down. We were seeing an error in the catalina.out logs that looked like this: "java.sql.BatchUpdateException: ORA-00001: unique constraint (GROUPER.MEMBERSHIP_UNIQ_IDX) violated".

 

The database kept running but the Grouper UI stopped running and would not restart  once these errors started.  Obviously there were some troubles with the data that we loaded in and don't necessarily want to try to resolve this particular problem. It seems pretty clear from the error that we were generating conflicting data (groups, members, memberships, etc.) somehow.

 

What I would like to do is salvage the folder structure from our hsql db by trying to load just the "stems" data into the Grouper database. I can truncate all the tables and try it but what I guess I'm wondering is what kind of seed data does Grouper need to be able to allow this kind of "jump start"? If it's not possible so be it, we'll just start with a fresh database and go from there. 

 

One thing I noticed is that in the instructions for "preparing for production" there are clear instructions for getting the Oracle database setup. I followed these and they all worked great. The thing that I didn't see is if there is any sort of seed data required to start with a fresh database (besides setting up the subject source)?

 

 

Earl Lewis

801-581-3635 (office)

801-554-3596 (mobile)




Archive powered by MHonArc 2.6.16.

Top of Page