grouper-users - Re: [grouper-users] save certain member to a group -> MembershipNotFoundException
Subject: Grouper Users - Open Discussion List
List archive
Re: [grouper-users] save certain member to a group -> MembershipNotFoundException
Chronological Thread
- From: Shilen Patel <>
- To: Colin Hudler <>, "" <>
- Subject: Re: [grouper-users] save certain member to a group -> MembershipNotFoundException
- Date: Tue, 7 Feb 2012 13:54:03 +0000
- Accept-language: en-US
Colin,
Do either of these two queries give you anything back?
select * from grouper_memberships m, grouper_fields f, grouper_composites c
where m.owner_id=c.owner and m.field_id=f.id and f.name='members'
and (m.via_composite_id is null or m.mship_type <> 'composite');
select * from grouper_group_set g, grouper_fields f, grouper_composites c
where g.owner_id=c.owner and g.field_id=f.id and f.name='members' and
(g.depth > 0 or g.mship_type <> 'composite');
Thanks!
-- Shilen
On 2/6/12 8:03 PM, "Colin Hudler"
<>
wrote:
>Here's a better stacktrace showing who did it
>
>Caused by:
>edu.internet2.middleware.grouper.exception.MembershipNotFoundException:
>Exception in save: edu.internet2.middleware.grouper.Membership,
>edu.internet2.middleware.grouper.hibernate.ByObject@111cf3c,
>Problem in HibernateSession: HibernateSession: isNew: false, isReadonly:
>false, grouperTransactionType: READ_WRITE_NEW,
>Exception in save: edu.internet2.middleware.grouper.Membership,
>ByObjectStatic, query: ', cacheable: null, cacheRegion: null,
>entityName: ImmediateMembershipEntry, tx type: null
> at
>edu.internet2.middleware.grouper.internal.dao.hib3.Hib3MembershipDAO.findB
>yGroupOwnerAndMemberAndFieldAndType(Hib3MembershipDAO.java:937)
> at
>edu.internet2.middleware.grouper.Membership.fixComposites(Membership.java:
>2141)
> at
>edu.internet2.middleware.grouper.Membership.processPostMembershipSaveOrUpd
>ate(Membership.java:2049)
> at
>edu.internet2.middleware.grouper.Membership.onPostSave(Membership.java:188
>4)
> at
>edu.internet2.middleware.grouper.hibernate.ByObject.save(ByObject.java:202
>)
> at
>edu.internet2.middleware.grouper.hibernate.ByObjectStatic$7.callback(ByObj
>ectStatic.java:466)
> at
>edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibern
>ateSession(HibernateSession.java:500)
> at
>edu.internet2.middleware.grouper.hibernate.ByObjectStatic.save(ByObjectSta
>tic.java:453)
> at
>edu.internet2.middleware.grouper.internal.dao.hib3.Hib3MembershipDAO.save(
>Hib3MembershipDAO.java:1471)
> at
>edu.internet2.middleware.grouper.Membership.internal_addImmediateMembershi
>p(Membership.java:1164)
> at
>edu.internet2.middleware.grouper.Group$2.callback(Group.java:860)
>
>fixComposites is loading with some bad arguments or some
>impartial/corrupt db rows, memberlist or something like that. From this
>it should be possible to follow it backwards.
>
>On 2/6/12 4:12 PM, Colin Hudler wrote:
>> I can't even see exactly where the exception is thrown. Why
>> MembershipNotFoundException for addMember()? I can see it is ByObject
>> save(), but what's really throwing it? Not being able to find it is
>> driving me mad. I thought perhaps doPreSave() in Membership class, but
>> that doesn't seem possible.
>>
>> On 2/6/12 4:01 PM, Colin Hudler wrote:
>>> Shilen,
>>>
>>> Thanks for looking. The two SQL queries returned zero rows. Here's
>>> the output from the GSH command.
>>>
>>> gsh 0% new
>>>
>>>edu.internet2.middleware.grouper.misc.AddMissingGroupSets().saveUpdates(
>>>false).addAllMissingGroupSets();
>>>
>>>
>>> Searching for missing self groupSets for attribute defs
>>> Found 0 missing groupSets
>>>
>>>
>>> Searching for all composite groups to cache for later use
>>> Searching for missing self groupSets for groups
>>> Found 0 missing groupSets
>>>
>>>
>>> Searching for missing self groupSets for stems
>>> Found 0 missing groupSets
>>>
>>>
>>> Searching for missing immediate groupSets where the owner is an
>>> attribute def
>>> Found 0 missing groupSets
>>>
>>>
>>> Searching for missing immediate groupSets where the owner is a group
>>> Found 0 missing groupSets
>>>
>>>
>>> Searching for missing immediate groupSets where the owner is a stem
>>> Found 0 missing groupSets
>>>
>>> On 2/6/12 3:29 PM, Shilen Patel wrote:
>>>> What happens if you run the following using GSH?
>>>>
>>>> new
>>>>
>>>>edu.internet2.middleware.grouper.misc.AddMissingGroupSets().saveUpdates
>>>>(fal
>>>>
>>>> se).addAllMissingGroupSets()
>>>>
>>>> And do either of these SQL queries give you anything back?
>>>>
>>>> select * from grouper_composites where owner not in (select owner_id
>>>> from
>>>> grouper_group_set where mship_type='composite' and depth='0');
>>>> select * from grouper_group_set where mship_type='composite' and
>>>> depth='0'
>>>> and owner_id not in (select owner from grouper_composites);
>>>>
>>>>
>>>> I'm wondering if your database may be missing some groupSets somehow,
>>>> which can lead to odd issues like the ones you've described.
>>>>
>>>> Thanks!
>>>>
>>>> -- Shilen
>>>>
>>>>
>>>> On 2/6/12 3:10 PM, "Colin
>>>> Hudler"<>
>>>> wrote:
>>>>
>>>>> Thanks for asking. It is a nice piece of the puzzle. It finds a lot
>>>>>of
>>>>> "bad" memberships in some composite groups, but nothing is output for
>>>>> this group.
>>>>>
>>>>> The findbad utility is something else I've been puzzling over for a
>>>>> while; it often reports the same bad groups even when they have been
>>>>> freshly recreated and *nothing else* in the registry has changed. It
>>>>> does not consistently identify the same groups as bad between runs,
>>>>> although they are always large composite. A couple of times it output
>>>>> entirely different "bad" groups. However, mostly it identifies the
>>>>> same
>>>>> list, but they seem unfixable.
>>>>>
>>>>> On one occasion, I suspect that the delComposite/addComposite GSH
>>>>> script
>>>>> utterly destroyed the membership for the group referenced below,
>>>>> which I
>>>>> am now attempting to repair. I know that there's more to the story,
>>>>> since that wouldn't be possible in theory. However, I verified that
>>>>> none
>>>>> of our automations modified the group, and the audit log claims the
>>>>> membership was not changed (although it is empty, down from about
>>>>> 18k).
>>>>>
>>>>> On 2/6/12 1:48 PM, Chris Hyzer wrote:
>>>>>> What happens when you run the bad membership finder?
>>>>>>
>>>>>>
>>>>>>
>>>>>>https://spaces.internet2.edu/display/Grouper/Bad+Membership+Finder+Ut
>>>>>>ilit
>>>>>>
>>>>>> y
>>>>>>
>>>>>> Thanks,
>>>>>> Chris
>>>>>>
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From:
>>>>>>
>>>>>> [mailto:]
>>>>>> On Behalf Of Colin
>>>>>> Hudler
>>>>>> Sent: Monday, February 06, 2012 2:36 PM
>>>>>> To:
>>>>>>
>>>>>> Subject: [grouper-users] save certain member to a group ->
>>>>>> MembershipNotFoundException
>>>>>>
>>>>>> Grouper 1.6.3. A group that worked fine until today stopped allowing
>>>>>> addition of some members. I can add many members except a few, but I
>>>>>> don't know why only some cannot be added. Using API, UI, or GSH, the
>>>>>> following error happens:
>>>>>>
>>>>>>
>>>>>> edu/internet2/middleware/grouper/Group.java:877:in `callback':
>>>>>> java.lang.RuntimeException:
>>>>>>
>>>>>>edu.internet2.middleware.grouper.exception.MembershipNotFoundExceptio
>>>>>>n:
>>>>>>
>>>>>> Exception in save: edu.internet2.middleware.grouper.Membership,
>>>>>> edu.internet2.middleware.grouper.hibernate.ByObject@3097aa41,
>>>>>> (NativeException)
>>>>>> Problem in HibernateSession: HibernateSession: isNew: false,
>>>>>> isReadonly:
>>>>>> false, grouperTransactionType: READ_WRITE_NEW,
>>>>>> Exception in save: edu.internet2.middleware.grouper.Membership,
>>>>>> ByObjectStatic, query: ', cacheable: null, cacheRegion: null,
>>>>>> entityName: ImmediateMembershipEntry, tx type: null,
>>>>>> , group name: uc:Reference:affiliations:effective:student, subject:
>>>>>> Subject id: 30876453U, sourceId: ucmcdb, field: members,
>>>>>> Problem in HibernateSession: HibernateSession: isNew: true,
>>>>>> isReadonly:
>>>>>> false, grouperTransactionType: READ_WRITE_NEW
>>>>>> from
>>>>>>
>>>>>>edu/internet2/middleware/grouper/hibernate/HibernateSession.java:500:
>>>>>>in
>>>>>>
>>>>>> `callbackHibernateSession'
>>>>>> from edu/internet2/middleware/grouper/Group.java:832:in
>>>>>> `internal_addMember'
>>>>>> from edu/internet2/middleware/grouper/Group.java:785:in
>>>>>> `addMember'
>>>>>> from edu/internet2/middleware/grouper/Group.java:704:in
>>>>>> `addMember'
>>>>>> from edu/internet2/middleware/grouper/Group.java:667:in
>>>>>> `addMember'
>>>>>> ....
>>>>>>
>>>>>> It always happens and always for the same subjects. Thousands of
>>>>>> other
>>>>>> subjects can be added or removed from the group. Any help?
>>>>>>
>>>>
>>>
>>
>>
>
- [grouper-users] save certain member to a group -> MembershipNotFoundException, Colin Hudler, 02/06/2012
- RE: [grouper-users] save certain member to a group -> MembershipNotFoundException, Chris Hyzer, 02/06/2012
- Re: [grouper-users] save certain member to a group -> MembershipNotFoundException, Colin Hudler, 02/06/2012
- Re: [grouper-users] save certain member to a group -> MembershipNotFoundException, Shilen Patel, 02/06/2012
- Re: [grouper-users] save certain member to a group -> MembershipNotFoundException, Colin Hudler, 02/06/2012
- Re: [grouper-users] save certain member to a group -> MembershipNotFoundException, Colin Hudler, 02/06/2012
- Re: [grouper-users] save certain member to a group -> MembershipNotFoundException, Colin Hudler, 02/06/2012
- Re: [grouper-users] save certain member to a group -> MembershipNotFoundException, Shilen Patel, 02/07/2012
- Re: [grouper-users] save certain member to a group -> MembershipNotFoundException, Colin Hudler, 02/07/2012
- Re: [grouper-users] save certain member to a group -> MembershipNotFoundException, Shilen Patel, 02/07/2012
- Re: [grouper-users] save certain member to a group -> MembershipNotFoundException, Colin Hudler, 02/06/2012
- Re: [grouper-users] save certain member to a group -> MembershipNotFoundException, Colin Hudler, 02/06/2012
- Re: [grouper-users] save certain member to a group -> MembershipNotFoundException, Colin Hudler, 02/06/2012
- Re: [grouper-users] save certain member to a group -> MembershipNotFoundException, Shilen Patel, 02/06/2012
- Re: [grouper-users] save certain member to a group -> MembershipNotFoundException, Colin Hudler, 02/06/2012
- RE: [grouper-users] save certain member to a group -> MembershipNotFoundException, Chris Hyzer, 02/06/2012
Archive powered by MHonArc 2.6.16.