Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] upgrade 1.6 to 2.1

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] upgrade 1.6 to 2.1


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Jim Fox <>
  • Cc: grouper users list <>
  • Subject: RE: [grouper-users] upgrade 1.6 to 2.1
  • Date: Wed, 6 Jun 2012 16:43:36 +0000
  • Accept-language: en-US

Grouper couldn’t read the grouper_ddl table I think... the correct value
seems to be there...

Chris

-----Original Message-----
From: Jim Fox
[mailto:]

Sent: Wednesday, June 06, 2012 11:48 AM
To: Chris Hyzer
Cc: grouper users list
Subject: RE: [grouper-users] upgrade 1.6 to 2.1



My script was missing all the drops pit creates at the start.
After that they are similar, except that the order of entries is
quite a bit different. Also, when I ran the script I got

Grouper ddl object type 'Grouper' has dbVersion: 0 and java version: 26

Maybe fixing the dbVersion will correct things.

Jim


On Tue, 5 Jun 2012, Chris Hyzer wrote:

> Date: Tue, 5 Jun 2012 11:06:33 -0700
> From: Chris Hyzer
> <>
> To: Jim Fox
> <>
> Cc: Shilen Patel
> <>,
> grouper users list
> <>
> Subject: RE: [grouper-users] upgrade 1.6 to 2.1
>
>
> Attached if my postgres 1.6.3 to 2.1.0 upgrade script if you want to use
> it, but you might want to keep trying to figure out whats wrong a little
> more…
>
>  
>
> #####################################
>
>  
>
> First I create a database and user in postgres:
>
>  
>
> C:\Program Files\PostgreSQL\9.1\bin>psql -U postgres
>
> psql (9.1.3)
>
> postgres=# CREATE USER grouper_upgrade WITH PASSWORD 'XXXXXXXXX';
>
> CREATE ROLE
>
> postgres=# CREATE DATABASE grouper_upgrade;
>
> CREATE DATABASE
>
> postgres=# GRANT ALL PRIVILEGES ON DATABASE grouper_upgrade to
> grouper_upgrade;
>
> GRANT
>
> postgres=#
>
>  
>
> ####################################
>
>  
>
> I installed 1.6.3 into postgres, by downloading the 1.6.3 api, changing
> this:
>
>  
>
> grouper.hibernate.properties:
>
>  
>
> hibernate.dialect               = org.hibernate.dialect.PostgreSQLDialect
>
> hibernate.connection.driver_class = org.postgresql.Driver
>
> hibernate.connection.url = jdbc:postgresql:grouper_upgrade
>
> hibernate.connection.username         = grouper_upgrade
>
> hibernate.connection.password         = XXXXXX
>
>  
>
> grouper.properties:
>
>  
>
> ddlutils.schema = public
>
>  
>
> C:\apps\grouperUpgradePostgres\grouper.apiBinary-1.6.3\bin>gsh -registry
> -check -runscript
>
>  
>
>  
>
> [IMAGE]
>
>  
>
> ##########################################
>
>  
>
> Then I downloaded 2.1.0 api and make similar changes:
>
>  
>
> ##########################################
>
>  
>
> grouper.hibernate.properties:
>
>  
>
> hibernate.connection.url = jdbc:postgresql://localhost:5432/grouper_upgrade
>
> hibernate.connection.username         = grouper_upgrade
>
> hibernate.connection.password         = XXXXXXXXXXXXX
>
>  
>
> grouper.properties:
>
>  
>
> ddlutils.schema = public
>
>  
>
> ##########################################
>
>  
>
> C:\apps\grouperUpgradePostgres\grouper.apiBinary-2.1.0\bin>gsh -registry
> –check
>
>  
>
> ##########################################
>
>  
>
> The most important part, is this:
>
>  
>
> Grouper ddl object type 'Grouper' has dbVersion: 23 and java version: 26
>
>  
>
> ##########################################
>
>  
>
> And I see the stuff I expect:
>
>  
>
> drop table grouper_flat_memberships cascade;
>
>  
>
> drop table grouper_flat_groups cascade;
>
>  
>
> drop table grouper_flat_stems cascade;
>
>  
>
> drop table grouper_flat_attribute_def cascade;
>
>  
>
> insert into grouper_pit_fields
>
>  
>
> ##########################################
>
>  
>
> I run that and now I see the flat tables dropped:
>
>  
>
> [IMAGE]
>
>  
>
>  
>
> -----Original Message-----
> From: Jim Fox
> [mailto:]
> Sent: Monday, June 04, 2012 6:03 PM
> To: Chris Hyzer
> Cc: Shilen Patel; grouper users list
> Subject: RE: [grouper-users] upgrade 1.6 to 2.1
>
>  
>
>  
>
> I did do that.  Same result.  no flats, no pit loads.
>
>  
>
> Jim
>
>  
>
>  
>
> On Mon, 4 Jun 2012, Chris Hyzer wrote:
>
>  
>
> > Date: Mon, 4 Jun 2012 14:03:16 -0700
>
> > From: Chris Hyzer
> > <>
>
> > To: Jim Fox
> > <>
>
> > Cc: Shilen Patel
> > <>,
>
> >     grouper users list
> ><>
>
> > Subject: RE: [grouper-users] upgrade 1.6 to 2.1
>
> >
>
> > Can you try it on the 1.6 to 2.1 upgrade?  :)
>
>
>
> > I think ddlutils is having trouble finding the tables since it doesn't
> > know the schema and it uses jdbc metadata, not sure though...
>
>
>
> > Thanks,
>
> > Chris
>
>
>
> > -----Original Message-----
>
> > From: Jim Fox
> > [mailto:]
>
> > Sent: Monday, June 04, 2012 4:56 PM
>
> > To: Chris Hyzer
>
> > Cc: Shilen Patel; grouper users list
>
> > Subject: RE: [grouper-users] upgrade 1.6 to 2.1
>
>
>
>
>
> > If tried two ways: one with the line commented out and one with
>
>
>
> >  ddlutils.schema = public
>
>
>
> > I think I used the latter on the 1.6 to 1.7 upgrade.
>
>
>
> > Jim
>
>
>
>
>
> > On Mon, 4 Jun 2012, Chris Hyzer wrote:
>
>
>
> >> Date: Mon, 4 Jun 2012 13:46:35 -0700
>
> >> From: Chris Hyzer
> >> <>
>
> >> To: Jim Fox
> >> <>,
> >> Shilen Patel
> >> <>
>
> >> Cc: grouper users list
> >> <>
>
> >> Subject: RE: [grouper-users] upgrade 1.6 to 2.1
>
> >> 
>
> >> You might want to uncomment this in the grouper.properties:
>
> >> 
>
> >> ddlutils.schema = whatever_schema
>
> >> 
>
> >> for the schema in postgres.  Unlike Oracle and Mysql, the postgres
> >> schema is different than the userid right?
>
> >> 
>
> >> Thanks,
>
> >> Chris
>
> >> 
>
> >> Ps. I was just about to ask for grouper_ddl contents too but Shilen beat
> >> me to it :)
>
> >> 
>
> >> -----Original Message-----
>
> >> From:
> >>
> >>
> >> [mailto:]
> >> On Behalf Of Jim Fox
>
> >> Sent: Monday, June 04, 2012 4:30 PM
>
> >> To: Shilen Patel
>
> >> Cc: grouper users list
>
> >> Subject: Re: [grouper-users] upgrade 1.6 to 2.1
>
> >> 
>
> >> 
>
> >> 
>
> >> The test 1.6 database is a copy of my production system (v1.6).
>
> >> I ran the 'gsh -registry -check' on it.  The resulting sql file
>
> >> can be found at:
>
> >> 
>
> >>   
> >>http://urizen4.cac.washington.edu/grouperDdl_20120604_11_09_36_938.sql.txt
>
> >> 
>
> >> 
>
> >> I am using postgres.  My hybernate properties has
>
> >> 
>
> >>   hibernate.connection.url = jdbc:postgresql://localhost/gws1dev
>
> >>   hibernate.dialect =
>
> >>   hibernate.connection.driver_class =
>
> >>    (those are the autodetect options)
>
> >> 
>
> >> Jim
>
> >> 
>
> >> 
>
> >> 
>
> >> On Mon, 4 Jun 2012, Shilen Patel wrote:
>
> >> 
>
> >>> Date: Mon, 4 Jun 2012 13:14:20 -0700
>
> >>> From: Shilen Patel
> >>> <>
>
> >>> To: Jim Fox
> >>> <>,
>
> >>>     grouper users list
> >>><>
>
> >>> Subject: Re: [grouper-users] upgrade 1.6 to 2.1
>
> >>> 
>
> >>> The upgrade should take care of populating those table.  If you want to
>
> >>> send me your upgrade script and let me know what type of database you're
>
> >>> running (postgres?), I can take a look at what's wrong.
>
> >>> 
>
> >>> Thanks!
>
> >>> 
>
> >>> -- Shilen
>
> >>> 
>
> >>> 
>
> >>> On 6/4/12 3:57 PM, "Jim Fox"
> >>> <>
> >>> wrote:
>
> >>> 
>
> >>>> 
>
> >>>> When I did a test upgrade of 1.6 to 1.7 (when the pit tables were
> >>>> added)
>
> >>>> the conversion sql script had entries like these:
>
> >>>> 
>
> >>>>    drop table grouper_flat_memberships cascade;
>
> >>>>    drop table grouper_flat_groups cascade;
>
> >>>>    drop table grouper_flat_stems cascade;
>
> >>>>    drop table grouper_flat_attribute_def cascade;
>
> >>>> 
>
> >>>>    insert into grouper_pit_fields ...
>
> >>>>    insert into grouper_pit_stems ...
>
> >>>>    ...
>
> >>>> 
>
> >>>> 
>
> >>>> When I try a conversion of a test 1.6 to 2.1 I don't see those entries.
>
> >>>> My 1.6 DB has the flat tables and does not have the pit tables.
>
> >>>> 
>
> >>>> Is there another way the tables are being populated nowadays?
>
> >>>> 
>
> >>>> Jim
>
> >>>> 
>
> >>>> 
>
> >>> 
>
> >>> 
>
> >> 
>
>
>
>
>



Archive powered by MHonArc 2.6.16.

Top of Page