Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] exception in group deleteMember

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] exception in group deleteMember


Chronological Thread 
  • From: Jim Fox <>
  • To: "" <>
  • Subject: Re: [grouper-users] exception in group deleteMember
  • Date: Mon, 16 Jul 2018 10:23:19 -0700 (PDT)
  • Ironport-phdr: 9a23:9M26jREYVhnucGPb8LC3xJ1GYnF86YWxBRYc798ds5kLTJ78o8SwAkXT6L1XgUPTWs2DsrQY07SQ6/iocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbAhEmDuwbaluIBmqsA7cqtQYjYx+J6gr1xDHuGFIe+NYxWNpIVKcgRPx7dqu8ZBg7ipdpesv+9ZPXqvmcas4S6dYDCk9PGAu+MLrrxjDQhCR6XYaT24bjwBHAwnB7BH9Q5fxri73vfdz1SWGIcH7S60/VDK/5KlpVRDokj8KOTA5/m/Jl8J/jqFVoByvqBNw34HZe52VOOZkc6/BYd8XX3RNU8BMXCJBGIO8aI4PAvIFM+ZZqon2ulsArRyxBAKxA+7vxDhIh3Dt0Kw0yeshCgHG3A0mH9IBrHTUq9P1OL0MXu+o0anF1DPOZO5V1zfl8IXEbx8sre2WUb5tfsfd11MjGg3bglmKtIDoMTeY2vwQv2SF7OdsT/yjh3Ikpg1rvjSj3MYhh4/UjYwP0F/E7z92wIMtKN24VkF7ZdmkHYNVtyCVMIt2X98iT391tCog0b0Ko4O7fSYQxJs52hHfduSLc4mO4h39SOacOSp0iX15dL6lmhq//lasxvfyW8WqylpGsyRIn93UunAIzRPT68yHSvVn/kem3DaCzw7T6uZLIE0vm6vUMYUhwr4xlpoVvkTDAij2mEPsgKCIa0ok5/Ck6/77bbX+up+cK4h0hxnxMqQ0ncy/HPw4PRYUX2SC5OS8z6Ps/VfiQLhRiv02k7LZsIzBJcgFvKK5AglV0po95BalCTepzsgYkWcdIF1bZR2HktuhB1abav/iCuqnjk7pjSxm3evuP7v9D4/LI2SZ1rrtYPw1v0FGzxcrwMoa+olZEKopIfTvV1X3ucCCSBI1Llrn7fzgDYBf14ZWd2WfSvuXN7P6rlaT5uMpLPWLYskYtCureKtt3OLnkXJswQxVRqKux5ZCMH0=



I can run the query manually, with som e name substitutions

# select ms, m from grouper_memberships as ms, grouper_members as m where
ms.owner_group_id = '881fef48f9e32bedf88b8fe5d96ed250' and ms.member_id =
'737b30aff49747f480806371ca041e7d' and ms.field_id =
'0094f3965ca2419286d3c4c3c9a1fb4e' and ms.member_id = m.id and
ms.mship_type = 'immediate';

and I get:

(449f9478f14d4bca9fa9ffbef01bf74c,737b30aff49747f480806371ca041e7d,881fef48f9e32bedf88b8fe5d96ed250,0094f3965ca2419286d3c4c3c9a1fb4e,881fef48f9e32bed
f88b8fe5d96ed250,,,,T,,,immediate,c9f6837335d64af8a82f37f929e80e56,1531760225755,0,ccdcc16513b642609f1907f9e3667d92)
| (737b30aff49747f480806371ca041e
7d,da74fce621d011d4abd00004ac494ffe,uwpds,person,0,ec28d43704c04a449820c3bd4922f37d,imf,Stenvik,"T.
Erling",,,imf,stenvik,"t. erling",,,imf,"T. Erling
Stenvik",imf)

(1 row)

The expected result. Did I miss some conversion settings? The grouper query
seems to prefer '*Uuid' where the database has just '*_id'

Jim


I am trying to delete a member from a field and getting an "Exception in uniqueResult:"

-------------------------------------------------------------
The call is (Group).deleteMember( (Member), (Field) )

[ Adds always work, it's just deletes that fail ]

SEVERE: Servlet.service() for servlet [gws] in context with path [/gws_grouper] threw exception [Request processing failed; nested exception is edu.internet2.middleware.grouper.exception.MemberDeleteException: Problem in HibernateSession: HibernateSession (72961acc): notNew, notReadonly, READ_WRITE_NEW, activeTransaction, session (531fd45e),
Exception in uniqueResult: (class [Ljava.lang.Object;), ByHqlStatic, query: 'select ms, m from MembershipEntry as ms, Member as m where ms.ownerGroupId = :owner and ms.memberUuid = :member and ms.fieldId = :fuuid and ms.memberUuid = m.uuid and ms.type = 'immediate' ', cacheable: false, cacheRegion: edu.internet2.middleware.grouper.internal.dao.hib3.Hib3MembershipDAO, tx type: null, tx type: nullBind var[0]: 'Param (class java.lang.String): 'owner'->'881fef48f9e32bedf88b8fe5d96ed250', Bind var[1]: 'Param (class java.lang.String): 'member'->'737b30aff49747f480806371ca041e7d'Bind var[2]: 'Param (class java.lang.String): 'fuuid'->'0094f3965ca2419286d3c4c3c9a1fb4e', , , group name: u:fox:spud97, subject: Subject id: da74fce621d011d4abd00004ac494ffe, sourceId: uwpds, field: authorized-senders,
Problem in HibernateSession: HibernateSession (8dd69ee): new, notReadonly, READ_WRITE_NEW, notActiveTransaction, session (531fd45e)] with root cause
org.hibernate.NonUniqueResultException: query did not return a unique result: 2
at org.hibernate.internal.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:971)
at org.hibernate.internal.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:960)
at edu.internet2.middleware.grouper.hibernate.ByHql.uniqueResult(ByHql.java:282)
at edu.internet2.middleware.grouper.hibernate.ByHqlStatic$1.callback(ByHqlStatic.java:365)
at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:701)
at edu.internet2.middleware.grouper.hibernate.ByHqlStatic.uniqueResult(ByHqlStatic.java:356)
at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3MembershipDAO.findByGroupOwnerAndMemberAndFieldAndType(Hib3MembershipDAO.java:1537)
at edu.internet2.middleware.grouper.Membership.internal_delImmediateMembership(Membership.java:1337)
at edu.internet2.middleware.grouper.Group$9.callback(Group.java:2403)
at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:701)
at edu.internet2.middleware.grouper.Group.deleteMember(Group.java:2378)
at edu.internet2.middleware.grouper.Group.deleteMember(Group.java:2191)
at edu.internet2.middleware.grouper.Group.deleteMember(Group.java:2225)
at edu.washington.gws.group.grouper.GrouperGroupFactory.updateFieldMembers(GrouperGroupFactory.java:906)

--------------------------------------------------------------------------------
Everything in the query exists, and I've verified the member being deleted is a row of grouper_memberships for the field.

What's the not unique query looking for??

Thanks,

Jim





Archive powered by MHonArc 2.6.19.

Top of Page