grouper-users - RE: [grouper-users] RE: Unix GID's in Grouper
Subject: Grouper Users - Open Discussion List
List archive
- From: Chris Hyzer <>
- To: Dirk Kastens <>
- Cc: "" <>
- Subject: RE: [grouper-users] RE: Unix GID's in Grouper
- Date: Thu, 3 Jun 2010 02:05:05 -0400
- Accept-language: en-US
- Acceptlanguage: en-US
First of all, be sure to check the logs when you get an error. There will be
more info there. GSH will tell you where the logs are when it starts up if
you are not sure.
Second, are transactions enabled in your database? i.e. if you insert
something, can you roll it back, or not? It depends on the table type in
mysql.
Third, for reasons I don't know, you cant call group.store() in a post insert
hook, so if you remove that line, it should work. Here is a thorough example:
https://spaces.internet2.edu/display/GrouperWG/Getting+started+with+hooks2
Let me know if it doesn't work.
Thanks,
Chris
-----Original Message-----
From: Dirk Kastens
[mailto:]
Sent: Wednesday, June 02, 2010 6:58 AM
To: Chris Hyzer
Cc:
Subject: Re: [grouper-users] RE: Unix GID's in Grouper
Hi,
Chris Hyzer wrote:
> I think this document should answer all your questions:
>
> https://spaces.internet2.edu/display/GrouperWG/Getting+started+with+hooks
OK, I started from scratch with grouper 1.5.3. I created the groupType
"posixGroup" with the Attribute "gidNumber". Then I created the file
src/test/GroupAddUosHook.java with the content that you have listed on
the web page (I changed the class to GroupAddUosHook, the type to
posixGroup and the gid attribute to gidNumber). I called "ant dist" and
started the grouper shell. When I call the addGroup command I get the
following errors:
gsh 0% group = addGroup("uos", "test", "test");
// Error: unable to evaluate command: Sourced file: inline evaluation
of: ``group = addGroup("uos", "test", "test");'' : Error invoking
compiled command: : Error in compiled command:
java.lang.RuntimeException: State was never stored from db,
Problem in HibernateSession: HibernateSession: isNew: false, isReadonly:
false, grouperTransactionType: READ_WRITE_NEW,
Hook GroupAddUosHook.groupPostInsert id: QJ8A24TP,
Problem in HibernateSession: HibernateSession: isNew: false, isReadonly:
false, grouperTransactionType: READ_WRITE_NEW,
Problem in HibernateSession: HibernateSession: isNew: true, isReadonly:
false, grouperTransactionType: READ_WRITE_NEW
The commands getTypes() and getAttributes() cannot be found.
gsh 1% group.getAttributes()
// Error: unable to evaluate command: Sourced file: inline evaluation
of: ``group.getAttributes();'' : Error in method invocation: Method
getAttributes() not found in class'java.util.LinkedHashSet'
gsh 2% group.getTypes();
// Error: unable to evaluate command: Sourced file: inline evaluation
of: ``group.getTypes();'' : Error in method invocation: Method
getTypes() not found in class'java.util.LinkedHashSet'
The group has been created and it has a gidNumber of "2".
gsh 3% getGroups("uos")
group: name='uos:test' displayName='Uni Osnabrueck:test'
uuid='aefd90fdfec04d5c809c431761e8b416'
gsh 4% getGroupAttr("uos:test", "gidNumber")
2
But, interestingly, I cannot delete the group:
gsh 5% delGroup("uos:test")
// Error: unable to evaluate command: Sourced file: inline evaluation
of: ``delGroup("uos:test");'' : Error invoking compiled command: : Error
in compiled command:
edu.internet2.middleware.grouper.exception.GrouperException: unexpected
condition,
Problem in HibernateSession: HibernateSession: isNew: true, isReadonly:
false, grouperTransactionType: READ_WRITE_NEW
gsh 6% getGroups("uos")
group: name='uos:test' displayName='Uni Osnabrueck:test'
uuid='aefd90fdfec04d5c809c431761e8b416'
Do you have any idea, what could be wrong?
Greetings,
Dirk
- Re: [grouper-users] RE: Unix GID's in Grouper, Dirk Kastens, 06/01/2010
- Re: [grouper-users] RE: Unix GID's in Grouper, Mirko Tasler, 06/01/2010
- <Possible follow-up(s)>
- Re: [grouper-users] RE: Unix GID's in Grouper, Dirk Kastens, 06/02/2010
- RE: [grouper-users] RE: Unix GID's in Grouper, Chris Hyzer, 06/03/2010
- Re: [grouper-users] RE: Unix GID's in Grouper, Dirk Kastens, 06/03/2010
- Message not available
- Re: [grouper-users] RE: Unix GID's in Grouper, Dirk Kastens, 06/04/2010
- Re: [grouper-users] RE: Unix GID's in Grouper, Mirko Tasler, 06/04/2010
- Re: [grouper-users] RE: Unix GID's in Grouper, Dirk Kastens, 06/04/2010
- Re: [grouper-users] RE: Unix GID's in Grouper, GW Brown, Information Systems and Computing, 06/04/2010
- Re: [grouper-users] RE: Unix GID's in Grouper, GW Brown, Information Systems and Computing, 06/07/2010
- Re: [grouper-users] RE: Unix GID's in Grouper, Mirko Tasler, 06/04/2010
- RE: [grouper-users] RE: Unix GID's in Grouper, Chris Hyzer, 06/04/2010
- Re: [grouper-users] RE: Unix GID's in Grouper, Dirk Kastens, 06/07/2010
- RE: [grouper-users] RE: Unix GID's in Grouper, Chris Hyzer, 06/07/2010
- Re: [grouper-users] RE: Unix GID's in Grouper, Dirk Kastens, 06/04/2010
- Re: [grouper-users] RE: Unix GID's in Grouper, Mirko Tasler, 06/04/2010
- Re: [grouper-users] RE: Unix GID's in Grouper, Dirk Kastens, 06/04/2010
- RE: [grouper-users] RE: Unix GID's in Grouper, Chris Hyzer, 06/03/2010
Archive powered by MHonArc 2.6.16.