grouper-users - RE: Groups with duplicate names
Subject: Grouper Users - Open Discussion List
List archive
- From: Paul Gazda <>
- To: Chris Hyzer <>, Grouper Users Mailing List <>
- Subject: RE: Groups with duplicate names
- Date: Tue, 19 May 2009 10:05:12 -0700
- Accept-language: en-US
- Acceptlanguage: en-US
Great! Thanks for the quick
response and fix. Paul Gazda From: Chris Hyzer [mailto:] OK, I
see. I put a check in to prevent that if you want to get latest grouper
API branch 1.4, so it is no longer possible. And
like I said, in grouper 1.5 there is a db constraint. So you should
expect to never get more than one group back with a group_name_exact unless
there is a DB corruption (what I consider this case). Btw,
you used to be able to do the same thing in GSH/API also, and I fixed that too.
(But again, in 1.5 its less of an issue) gsh 0%
grouperSession = GrouperSession.startRootSession(); edu.internet2.middleware.grouper.GrouperSession:
9a2471e9d2ca4946ad1cb10909b8c3a7,'GrouperSystem','application' gsh 1%
group = GroupFinder.findByName(grouperSession, "aStem:aGroup"); group:
name='aStem:aGroup' displayName='aStem:aGroup'
uuid='56b46639daf940a1a29398b08e982657' gsh 2%
group.setExtension("aGroup4"); gsh 3%
group.store(); gsh 4%
exit https://bugs.internet2.edu/jira/browse/GRP-278 Regards, Chris From: Paul Gazda [mailto:] Chris, We are
not running load balanced. Just one server. But the example in your reply was
not exactly what I did. I first
saved 2 differently named groups. Then I modified the second group to have the
same name as the first group using --saveMode=UPDATE and --groupLookupUuid to
find the group to modify. That results in the two groups having the same name
and the query behavior I described. Thanks. Paul Gazda From: Chris Hyzer [mailto:] I
tried this and couldn’t reproduce. (see output below). Are
you on the latest 1.4 branch that has caching enabled, and are you running a
load balanced array of web service servers? I wonder if it is possible
that server1 queries for the group, gets a negative that it exists, caches
that, then server2 adds the group, then server1 queries to see if the group is
there, returns a negative from cache, then adds the group again. Grouper
1.5 has a unique index on group name, so this wont be possible, fyi. Its
not possible for grouper 1.4 to do this. Anyways,
I made a tweak to the latest 1.4 so that when adding a group, the query that
sees if the group exists is not cached. If you think this might be the
issue, you might want to get latest the latest API, put it in your WS, and try
again. If
that isn’t the problem, then we probably need to keep looking, let me
know. C:\mchyzer\isc\dev\grouper_v1_4\grouperClient\dist\institution\grouperClient.institution-1.4.1>
java -jar grouperClient .jar
--operation=groupSaveWs --name=edu:testing1234 --saveMode=INSERT Success:
T: code: SUCCESS_INSERTED: edu:testing1234 C:\mchyzer\isc\dev\grouper_v1_4\grouperClient\dist\institution\grouperClient.institution-1.4.1>
java -jar grouperClient .jar
--operation=groupSaveWs --name=edu:testing1234 --saveMode=INSERT Error
with grouper client, check the logs: Bad response from web service: resultCode:
PROBLEM_SAVING_GROUPS, There were 0
successes and 1 failures of saving groups. edu.internet2.middleware.grouper.exception.GroupAddAlreadyExistsException:
group already exists with name: 'edu:testing1 234', Problem
in HibernateSession: HibernateSession: isNew: true, isReadonly: false,
grouperTransactionType: READ_WRITE_NEW Error
0, result index: 0, code: GROUP_ALREADY_EXISTS, message:
edu.internet2.middleware.grouper.exception.GroupAddAlread yExistsException:
group already exists with name: 'edu:testing1234', Problem
in HibernateSession: HibernateSession: isNew: true, isReadonly: false,
grouperTransactionType: READ_WRITE_NEW May
19, 2009 7:38:20 AM edu.internet2.middleware.grouperClient.GrouperClient main SEVERE:
Bad response from web service: resultCode: PROBLEM_SAVING_GROUPS, There were 0
successes and 1 failures of savin g
groups. edu.internet2.middleware.grouper.exception.GroupAddAlreadyExistsException:
group already exists with name: 'edu:testing1 234', Problem
in HibernateSession: HibernateSession: isNew: true, isReadonly: false,
grouperTransactionType: READ_WRITE_NEW Error
0, result index: 0, code: GROUP_ALREADY_EXISTS, message:
edu.internet2.middleware.grouper.exception.GroupAddAlread yExistsException:
group already exists with name: 'edu:testing1234', Problem
in HibernateSession: HibernateSession: isNew: true, isReadonly: false,
grouperTransactionType: READ_WRITE_NEW edu.internet2.middleware.grouperClient.ws.GcWebServiceError:
Bad response from web service: resultCode: PROBLEM_SAVING_G ROUPS,
There were 0 successes and 1 failures of saving groups. edu.internet2.middleware.grouper.exception.GroupAddAlreadyExistsException:
group already exists with name: 'edu:testing1 234', Problem
in HibernateSession: HibernateSession: isNew: true, isReadonly: false,
grouperTransactionType: READ_WRITE_NEW Error
0, result index: 0, code: GROUP_ALREADY_EXISTS, message:
edu.internet2.middleware.grouper.exception.GroupAddAlread yExistsException:
group already exists with name: 'edu:testing1234', Problem
in HibernateSession: HibernateSession: isNew: true, isReadonly: false,
grouperTransactionType: READ_WRITE_NEW
at
edu.internet2.middleware.grouperClient.ws.GrouperClientWs.handleFailure(GrouperClientWs.java:238)
at
edu.internet2.middleware.grouperClient.api.GcGroupSave.execute(GcGroupSave.java:163)
at
edu.internet2.middleware.grouperClient.GrouperClient.groupSave(GrouperClient.java:1223)
at edu.internet2.middleware.grouperClient.GrouperClient.main(GrouperClient.java:289) C:\mchyzer\isc\dev\grouper_v1_4\grouperClient\dist\institution\grouperClient.institution-1.4.1> From: Paul Gazda [mailto:] I have found that using
GrouperClient I can create 2 groups with the exact same name, and then when I
do a findGroupsWs query in GrouperClient, I only get one of the groups
returned. It seems like I should not be able to create 2 groups with the exact
same name, or I should get both groups back when I query. Details: Create group 1 with name
“ENT:pagTestDup1” using groupSaveWs --saveMode=INSERT Create group 2 with name
“ENT:pagTestDup2” using groupSaveWs --saveMode=INSERT Modify the name of group 2
to be the same as group 1 with this command: groupSaveWs
--name=ENTE:pagTestDup1 --saveMode=UPDATE
--groupLookupUuid=13014a29-68f1-27fd-bf17-86af6af4af4d Then, when I do a query: findGroupsWs --queryFilterType=FIND_BY_GROUP_NAME_APPROXIMATE
--groupName=ENT:pagTestD, I only get group 1 returned in the result. However,
if I query by each group’s uuid, I see each group is there with the exact
same name. This scenario came about because I
was trying to determine whether I should ever expect to get more than 1 group
returned when I do a findGroups query with
–queryFilterType=FIND_BY_GROUP_NAME_EXACT. Paul Gazda |
- Groups with duplicate names, Paul Gazda, 05/18/2009
- RE: Groups with duplicate names, Chris Hyzer, 05/19/2009
- RE: Groups with duplicate names, Paul Gazda, 05/19/2009
- RE: Groups with duplicate names, Chris Hyzer, 05/19/2009
- RE: Groups with duplicate names, Paul Gazda, 05/19/2009
- RE: Groups with duplicate names, Chris Hyzer, 05/19/2009
- RE: Groups with duplicate names, Paul Gazda, 05/19/2009
- RE: Groups with duplicate names, Chris Hyzer, 05/19/2009
Archive powered by MHonArc 2.6.16.