Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] Error with Obliterate Stem

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] Error with Obliterate Stem


Chronological Thread 
  • From: Shilen Patel <>
  • To: Nathan Weyenberg <>
  • Cc: "" <>
  • Subject: Re: [grouper-users] Error with Obliterate Stem
  • Date: Tue, 12 Nov 2013 16:50:08 +0000
  • Accept-language: en-US

OK it looks like you have a membership for a group that was deleted.  I think you need to delete the row with id da587de67eb44468a8ef08057ab17bd8 from grouper_memberships.  delete from grouper_memberships where id='da587de67eb44468a8ef08057ab17bd8';

Thanks!

-- Shilen

From: Nathan Weyenberg <>
Date: Tuesday, November 12, 2013 11:15 AM
To: Shilen Patel <>
Cc: "" <>
Subject: Re: [grouper-users] Error with Obliterate Stem

Here is the full stack trace:

2013-11-12 10:07:16,393: [main] ERROR ShellHelper.eval(76) -  - Sourced file: inline evaluation of: ``for(child : stem.getChildGroups(Stem.Scope.SUB)) { System.out.println("deleting: . . . '' : Method Invocation child.delete
edu.internet2.middleware.grouper.exception.MemberDeleteException: Cant find group by uuid: 3431b0bc686543f8bd49b62154c2f93a,
Exception in delete: edu.internet2.middleware.grouper.Membership, edu.internet2.middleware.grouper.hibernate.ByObject@7e2bd615,
Problem in HibernateSession: HibernateSession: isNew: false, isReadonly: false, grouperTransactionType: READ_WRITE_NEW,
Exception in delete: edu.internet2.middleware.grouper.Membership, ByObjectStatic, query: ', cacheable: null, cacheRegion: null, entityName: ImmediateMembershipEntry, tx type: null,
Problem in HibernateSession: HibernateSession: isNew: false, isReadonly: false, grouperTransactionType: READ_WRITE_NEW,
Problem in HibernateSession: HibernateSession: isNew: true, isReadonly: false, grouperTransactionType: READ_WRITE_NEW
    at edu.internet2.middleware.grouper.Membership$3.callback(Membership.java:1390)
    at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:523)
    at edu.internet2.middleware.grouper.Membership.internal_deleteAllField(Membership.java:1362)
    at edu.internet2.middleware.grouper.Membership.internal_deleteAllFieldType(Membership.java:1469)
    at edu.internet2.middleware.grouper.Group$4.callback(Group.java:1454)
    at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:523)
    at edu.internet2.middleware.grouper.Group.delete(Group.java:1418)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at bsh.Reflect.invokeMethod(Unknown Source)
    at bsh.Reflect.invokeObjectMethod(Unknown Source)
    at bsh.Name.invokeMethod(Unknown Source)
    at bsh.BSHMethodInvocation.eval(Unknown Source)
    at bsh.BSHPrimaryExpression.eval(Unknown Source)
    at bsh.BSHPrimaryExpression.eval(Unknown Source)
    at bsh.BSHBlock.evalBlock(Unknown Source)
    at bsh.BSHBlock.eval(Unknown Source)
    at bsh.BSHBlock.eval(Unknown Source)
    at bsh.BSHEnhancedForStatement.eval(Unknown Source)
    at bsh.Interpreter.eval(Unknown Source)
    at bsh.Interpreter.eval(Unknown Source)
    at bsh.Interpreter.eval(Unknown Source)
    at edu.internet2.middleware.grouper.app.gsh.ShellHelper.eval(ShellHelper.java:48)
    at edu.internet2.middleware.grouper.app.gsh.GrouperShell.run(GrouperShell.java:413)
    at edu.internet2.middleware.grouper.app.gsh.GrouperShell.grouperShellHelper(GrouperShell.java:217)
    at edu.internet2.middleware.grouper.app.gsh.GrouperShell.main(GrouperShell.java:147)
    at edu.internet2.middleware.grouper.app.gsh.GrouperShellWrapper.main(GrouperShellWrapper.java:16)
Caused by: edu.internet2.middleware.grouper.exception.GroupNotFoundException: Cant find group by uuid: 3431b0bc686543f8bd49b62154c2f93a,
Exception in delete: edu.internet2.middleware.grouper.Membership, edu.internet2.middleware.grouper.hibernate.ByObject@7e2bd615,
Problem in HibernateSession: HibernateSession: isNew: false, isReadonly: false, grouperTransactionType: READ_WRITE_NEW,
Exception in delete: edu.internet2.middleware.grouper.Membership, ByObjectStatic, query: ', cacheable: null, cacheRegion: null, entityName: ImmediateMembershipEntry, tx type: null,
Problem in HibernateSession: HibernateSession: isNew: false, isReadonly: false, grouperTransactionType: READ_WRITE_NEW
    at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3GroupDAO.findByUuid(Hib3GroupDAO.java:1189)
    at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3GroupDAO.findByUuid(Hib3GroupDAO.java:1163)
    at edu.internet2.middleware.grouper.Membership.processPostMembershipDelete(Membership.java:1980)
    at edu.internet2.middleware.grouper.Membership.onPostDelete(Membership.java:1897)
    at edu.internet2.middleware.grouper.hibernate.ByObject.delete(ByObject.java:107)
    at edu.internet2.middleware.grouper.hibernate.ByObjectStatic$10.callback(ByObjectStatic.java:641)
    at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:523)
    at edu.internet2.middleware.grouper.hibernate.ByObjectStatic.delete(ByObjectStatic.java:628)
    at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3MembershipDAO.delete(Hib3MembershipDAO.java:1620)
    at edu.internet2.middleware.grouper.Membership$2.callback(Membership.java:523)
    at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:523)
    at edu.internet2.middleware.grouper.Membership.delete(Membership.java:511)
    at edu.internet2.middleware.grouper.Membership$3.callback(Membership.java:1383)
    ... 28 more
2013-11-12 10:07:16,478: [main] INFO  EventLog.info(141) -  - [e2554f814a7748d8987f538e3ae9df18,'GrouperSystem','application'] session: start (4ms)
2013-11-12 10:07:16,511: [main] ERROR ShellHelper.eval(76) -  - Sourced file: inline evaluation of: ``for(childStem : stemList) { System.out.println("deleting: " + childStem.getName( . . . '' : Method Invocation childStem.delete
edu.internet2.middleware.grouper.exception.StemDeleteException: cannot delete stem with child groups,
Problem in HibernateSession: HibernateSession: isNew: true, isReadonly: false, grouperTransactionType: READ_WRITE_NEW
    at edu.internet2.middleware.grouper.Stem$1.callback(Stem.java:544)
    at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:523)
    at edu.internet2.middleware.grouper.Stem.delete(Stem.java:527)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at bsh.Reflect.invokeMethod(Unknown Source)
    at bsh.Reflect.invokeObjectMethod(Unknown Source)
    at bsh.Name.invokeMethod(Unknown Source)
    at bsh.BSHMethodInvocation.eval(Unknown Source)
    at bsh.BSHPrimaryExpression.eval(Unknown Source)
    at bsh.BSHPrimaryExpression.eval(Unknown Source)
    at bsh.BSHBlock.evalBlock(Unknown Source)
    at bsh.BSHBlock.eval(Unknown Source)
    at bsh.BSHBlock.eval(Unknown Source)
    at bsh.BSHEnhancedForStatement.eval(Unknown Source)
    at bsh.Interpreter.eval(Unknown Source)
    at bsh.Interpreter.eval(Unknown Source)
    at bsh.Interpreter.eval(Unknown Source)
    at edu.internet2.middleware.grouper.app.gsh.ShellHelper.eval(ShellHelper.java:48)
    at edu.internet2.middleware.grouper.app.gsh.GrouperShell.run(GrouperShell.java:413)
    at edu.internet2.middleware.grouper.app.gsh.GrouperShell.grouperShellHelper(GrouperShell.java:217)
    at edu.internet2.middleware.grouper.app.gsh.GrouperShell.main(GrouperShell.java:147)
    at edu.internet2.middleware.grouper.app.gsh.GrouperShellWrapper.main(GrouperShellWrapper.java:16)
2013-11-12 10:07:16,526: [main] ERROR ShellHelper.eval(76) -  - Sourced file: inline evaluation of: ``stem.delete();'' : Method Invocation stem.delete
edu.internet2.middleware.grouper.exception.StemDeleteException: cannot delete stem with child stems,
Problem in HibernateSession: HibernateSession: isNew: true, isReadonly: false, grouperTransactionType: READ_WRITE_NEW
    at edu.internet2.middleware.grouper.Stem$1.callback(Stem.java:544)
    at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:523)
    at edu.internet2.middleware.grouper.Stem.delete(Stem.java:527)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at bsh.Reflect.invokeMethod(Unknown Source)
    at bsh.Reflect.invokeObjectMethod(Unknown Source)
    at bsh.Name.invokeMethod(Unknown Source)
    at bsh.BSHMethodInvocation.eval(Unknown Source)
    at bsh.BSHPrimaryExpression.eval(Unknown Source)
    at bsh.BSHPrimaryExpression.eval(Unknown Source)
    at bsh.Interpreter.eval(Unknown Source)
    at bsh.Interpreter.eval(Unknown Source)
    at bsh.Interpreter.eval(Unknown Source)
    at edu.internet2.middleware.grouper.app.gsh.ShellHelper.eval(ShellHelper.java:48)
    at edu.internet2.middleware.grouper.app.gsh.GrouperShell.run(GrouperShell.java:413)
    at edu.internet2.middleware.grouper.app.gsh.GrouperShell.grouperShellHelper(GrouperShell.java:217)
    at edu.internet2.middleware.grouper.app.gsh.GrouperShell.main(GrouperShell.java:147)
    at edu.internet2.middleware.grouper.app.gsh.GrouperShellWrapper.main(GrouperShellWrapper.java:16)


I have one entry for the first query: 

da587de67eb44468a8ef08057ab17bd8 53b265a7721f4a549ff9ccd594dc4233 5a951ba3a16943878b3e3513f79b3027 49db455cac9a46c9bc345889b73e1c90 5a951ba3a16943878b3e3513f79b3027 F 1364878800000 1365138000000 immediate edb27c16e2a5484386439da671cee5c7 1366048690528 1 53b265a7721f4a549ff9ccd594dc4233 3431b0bc686543f8bd49b62154c2f93a g:gsa group 0 d3c test admin and update u:netid:daconner:d3c_test_admin_and_update,u:netid:daconner:d3c test admin and update, u:netid:daconner:d3c_test_admin_and_update new description (3/15/13) d7a746a06d814286a2c8c6dc2b74cac5

and none for the second.

I am still working on getting the full stack trace. It looks as if we are getting errors from our web services put into grouper_error but it appears errors with the API might not be writing.

--Nathan
On Nov 12, 2013, at 8:32 AM, Shilen Patel <> wrote:

Hi,

Can you send the full stacktrace from the logs?  What do you see when you run these queries?

1.  select * from grouper_memberships ms, grouper_members m where ms.member_id = m.id and m.subject_id='3431b0bc686543f8bd49b62154c2f93a'

2.  select * from grouper_groups where id='3431b0bc686543f8bd49b62154c2f93a'

Thanks!

-- Shilen

From: Nathan Weyenberg <>
Date: Monday, November 11, 2013 12:25 PM
To: "" <>
Subject: [grouper-users] Error with Obliterate Stem

Hi,

I have been having issues trying to delete a stem and its relating groups. When using obliterate stem I get the following error: 

Obliterating stem: u:netid:daconner
Obliterating stem: u:netid:daconner:_admin
// Error: unable to evaluate command: Sourced file: inline evaluation of: ``obliterateStem("u", false, false);'' : Error invoking compiled command: : Error in compiled command: edu.internet2.middleware.grouper.exception.MemberDeleteException: Cant find group by uuid: 3431b0bc686543f8bd49b62154c2f93a,
Exception in delete: edu.internet2.middleware.grouper.Membership, edu.internet2.middleware.grouper.hibernate.ByObject@6593e3d0,
Problem in HibernateSession: HibernateSession: isNew: false, isReadonly: false, grouperTransactionType: READ_WRITE_NEW,
Exception in delete: edu.internet2.middleware.grouper.Membership, ByObjectStatic, query: ', cacheable: null, cacheRegion: null, entityName: ImmediateMembershipEntry, tx type: null,
Problem in HibernateSession: HibernateSession: isNew: false, isReadonly: false, grouperTransactionType: READ_WRITE_NEW,
Problem in HibernateSession: HibernateSession: isNew: false, isReadonly: false, grouperTransactionType: READ_WRITE_NEW,
Problem in HibernateSession: HibernateSession: isNew: false, isReadonly: false, grouperTransactionType: READ_WRITE_NEW,
Problem in HibernateSession: HibernateSession: isNew: false, isReadonly: false, grouperTransactionType: READ_WRITE_NEW,
Problem in HibernateSession: HibernateSession: isNew: false, isReadonly: false, grouperTransactionType: READ_WRITE_NEW,
Problem in HibernateSession: HibernateSession: isNew: true, isReadonly: false, grouperTransactionType: READ_WRITE_NEW

I have also tried using the following script for deleting stems:
grouperSession = GrouperSession.startRootSession();
stem = StemFinder.findByName(grouperSession, "u:netid:daconner");
for(child : stem.getChildGroups(Stem.Scope.SUB)) { System.out.println("deleting: " + child.getName()); child.delete();  }
stemList = new ArrayList(stem.getChildStems(Stem.Scope.SUB));
Collections.sort(stemList);
Collections.reverse(stemList);
for(childStem : stemList) { System.out.println("deleting: " + childStem.getName()); childStem.delete(); }
stem.delete();

and got the following error:

stem: name='u:netid:daconner' displayName='u:netid:daconner' uuid='f7d2964808774847a3ed9089348d2c02' 
deleting: u:netid:daconner:_admin:_group_mother_update
// Error: unable to evaluate command: Sourced file: inline evaluation of: ``for(child : stem.getChildGroups(Stem.Scope.SUB)) { System.out.println("deleting: . . . '' : Method Invocation child.delete
// See error log for full stacktrace
// caused by: edu.internet2.middleware.grouper.exception.MemberDeleteException:
// Cant find group by uuid: 3431b0bc686543f8bd49b62154c2f93a,
Exception in delete: edu.internet2.middleware.grouper.Membership, edu.internet2.middleware.grouper.hibernate.ByObject@7a718e31,
Problem in HibernateSession: HibernateSession: isNew: false, isReadonly: false, grouperTransactionType: READ_WRITE_NEW,
Exception in delete: edu.internet2.middleware.grouper.Membership, ByObjectStatic, query: ', cacheable: null, cacheRegion: null, entityName: ImmediateMembershipEntry, tx type: null,
Problem in HibernateSession: HibernateSession: isNew: false, isReadonly: false, grouperTransactionType: READ_WRITE_NEW,
Problem in HibernateSession: HibernateSession: isNew: true, isReadonly: false, grouperTransactionType: READ_WRITE_NEW
// caused by: edu.internet2.middleware.grouper.exception.GroupNotFoundException:
// Cant find group by uuid: 3431b0bc686543f8bd49b62154c2f93a,
Exception in delete: edu.internet2.middleware.grouper.Membership, edu.internet2.middleware.grouper.hibernate.ByObject@7a718e31,
Problem in HibernateSession: HibernateSession: isNew: false, isReadonly: false, grouperTransactionType: READ_WRITE_NEW,
Exception in delete: edu.internet2.middleware.grouper.Membership, ByObjectStatic, query: ', cacheable: null, cacheRegion: null, entityName: ImmediateMembershipEntry, tx type: null,
Problem in HibernateSession: HibernateSession: isNew: false, isReadonly: false, grouperTransactionType: READ_WRITE_NEW
java.util.ArrayList: [Stem[displayName=u:netid:daconner:_admin,name=u:netid:daconner:_admin,uuid=3ee2e03cf9f745eeb8ce39707319abed,creator=7d5075a7291f42869c809fc385a70be8,modifier=edb27c16e2a5484386439da671cee5c7], Stem[displayName=u:netid:daconner:foo_test,name=u:netid:daconner:foo,uuid=ff1ce75d126842bfbdb2b89b2da2650f,creator=7d5075a7291f42869c809fc385a70be8,modifier=edb27c16e2a5484386439da671cee5c7], Stem[displayName=u:netid:daconner:foo_attr1,name=u:netid:daconner:foo_attr1,uuid=9ca713b91e8f4cc5bb3ad34315724bcc,creator=7d5075a7291f42869c809fc385a70be8,modifier=edb27c16e2a5484386439da671cee5c7], Stem[displayName=u:netid:daconner:foo_attr2,name=u:netid:daconner:foo_attr2,uuid=49469d8632c443acbc8c17d32a1c6e51,creator=7d5075a7291f42869c809fc385a70be8,modifier=edb27c16e2a5484386439da671cee5c7], Stem[displayName=u:netid:daconner:foo_attr3,name=u:netid:daconner:foo_attr3,uuid=bec3275dc7a44948b5814ba21021d2d5,creator=7d5075a7291f42869c809fc385a70be8,modifier=edb27c16e2a5484386439da671cee5c7], Stem[displayName=u:netid:daconner:foo_attr3:Administrative Group for foo_attr3,name=u:netid:daconner:foo_attr3:_admin,uuid=f5b987368c78471da7c26eeb72245594,creator=7d5075a7291f42869c809fc385a70be8,modifier=edb27c16e2a5484386439da671cee5c7], Stem[displayName=u:netid:daconner:foo_attr4,name=u:netid:daconner:foo_attr4,uuid=dd924eb93e4944cda4734e5952f09850,creator=7d5075a7291f42869c809fc385a70be8,modifier=edb27c16e2a5484386439da671cee5c7], Stem[displayName=u:netid:daconner:foo_attr4:Administrative Group for foo_attr4,name=u:netid:daconner:foo_attr4:_admin,uuid=ccb1f21517674c41bfbd597a0d64c8b4,creator=7d5075a7291f42869c809fc385a70be8,modifier=edb27c16e2a5484386439da671cee5c7], Stem[displayName=u:netid:daconner:foo_attr5,name=u:netid:daconner:foo_attr5,uuid=8563e0d01aec4368b768c0206d761a73,creator=7d5075a7291f42869c809fc385a70be8,modifier=edb27c16e2a5484386439da671cee5c7], Stem[displayName=u:netid:daconner:foo_attr5:Administrative Group for foo_attr5,name=u:netid:daconner:foo_attr5:_admin,uuid=53547d4f42064892be3b0c2cf6593c21,creator=7d5075a7291f42869c809fc385a70be8,modifier=edb27c16e2a5484386439da671cee5c7], Stem[displayName=u:netid:daconner:foo,name=u:netid:daconner:attributes,uuid=db5d035a235d4001b4d7a5de5afa0d88,creator=7d5075a7291f42869c809fc385a70be8,modifier=edb27c16e2a5484386439da671cee5c7], Stem[displayName=u:netid:daconner:foo:Administrative Group for foo,name=u:netid:daconner:attributes:_admin,uuid=292b43146600443c9000e387b0526285,creator=7d5075a7291f42869c809fc385a70be8,modifier=edb27c16e2a5484386439da671cee5c7], Stem[displayName=u:netid:daconner:2222,name=u:netid:daconner:attributes2,uuid=858e82596ed845cb8033d22184df90bf,creator=7d5075a7291f42869c809fc385a70be8,modifier=edb27c16e2a5484386439da671cee5c7], Stem[displayName=u:netid:daconner:2222:Administrative Group for 2222,name=u:netid:daconner:attributes2:_admin,uuid=e598bf4460674041b76708fad4ae7c9f,creator=7d5075a7291f42869c809fc385a70be8,modifier=edb27c16e2a5484386439da671cee5c7]]
deleting: u:netid:daconner:foo_attr5:_admin
// Error: unable to evaluate command: Sourced file: inline evaluation of: ``for(childStem : stemList) { System.out.println("deleting: " + childStem.getName( . . . '' : Method Invocation childStem.delete
// See error log for full stacktrace
// caused by: edu.internet2.middleware.grouper.exception.StemDeleteException:
// cannot delete stem with child groups,
Problem in HibernateSession: HibernateSession: isNew: true, isReadonly: false, grouperTransactionType: READ_WRITE_NEW
// Error: unable to evaluate command: Sourced file: inline evaluation of: ``stem.delete();'' : Method Invocation stem.delete
// See error log for full stacktrace
// caused by: edu.internet2.middleware.grouper.exception.StemDeleteException:
// cannot delete stem with child stems,
Problem in HibernateSession: HibernateSession: isNew: true, isReadonly: false, grouperTransactionType: READ_WRITE_NEW


I have run the following queries with no results:
select * from grouper_memberships_v where member_id = '3431b0bc686543f8bd49b62154c2f93a';

select * from grouper_stems_v where stem_id = '3431b0bc686543f8bd49b62154c2f93a';

select * from grouper_memberships_all_v where member_id = '3431b0bc686543f8bd49b62154c2f93a';

How can I go about deleting this?



Nathan Weyenberg
UW-Madison DoIT - Middleware


Nathan Weyenberg
UW-Madison DoIT - Middleware


Nathan Weyenberg
UW-Madison DoIT - Middleware




Archive powered by MHonArc 2.6.16.

Top of Page