grouper-dev - Re: [grouper-dev] 1.6.0 error deleting member
Subject: Grouper Developers Forum
List archive
- From: Shilen Patel <>
- To: Jim Fox <>
- Cc: "" <>
- Subject: Re: [grouper-dev] 1.6.0 error deleting member
- Date: Thu, 1 Jul 2010 08:29:24 -0400
Ok that helps and I can reproduce this now. Can you run this query?
select count(*) from grouper_group_set where owner_id is null;
If the result is not 0, then the upgrade didn't complete successfully. If you run the following update statements, it should resolve your issue.
update grouper_group_set set owner_id = owner_group_id where owner_group_id is not null;
update grouper_group_set set owner_id = owner_stem_id where owner_stem_id is not null;
update grouper_group_set set owner_id = owner_attr_def_id where owner_attr_def_id is not null;
commit;
If you look in the SQL file that was generated as part of the upgrade, these statements should be in there. I'm guessing they didn't get executed because of the other issue you had with the views.
Let me know if this works or not.
Thanks!
-- Shilen
On 6/30/10 11:21 PM, Jim Fox wrote:
I get, less the title lines:
ff03cc3d98b14695a04cd7fb1d2e90c7:18de84d2450541ffaf5a5b97ac8aded7 |
ff03cc3d98b14695a04cd7fb1d2e90c7 | 18de84d2450541ffaf5a5b97ac8aded7 | 4
6b520f6badb4b9dad0b8c4dc4ba1d8c | 0 | |
| a1681c3fcba3f54f759e6c9432004381 | | 46b520f
6badb4b9dad0b8c4dc4ba1d8c | 1879168ec99c410ea580e44707d14bad |
1879168ec99c410ea580e44707d14bad | | c9f6837335d64af8a82f37f929e8
0e56 | 1277405628450 | c9f6837335d64af8a82f37f929e80e56 | 1274991774342
| 8690cffa8d2c4ae7b9e17c7ec4945607 | 18de84d2450541ffaf5a5b97ac
8aded7 | | 0 | immediate | T |
| | 0 | 8bc5cb1ad
35311d78b049788b57938d5 | uwpds | person |
8690cffa8d2c4ae7b9e17c7ec4945607
(1 row)
The error log follows. It is appears that the error come from a look-up of a
membership. I don't see where any update comes in. I can add members; I can
retrieve and display members; I just can't delete them.
error.log
2010-06-30 15:37:43,602: [main] ERROR JDBCExceptionReporter.logExceptions(78)
- ERROR: cannot update a view
2010-06-30 15:37:43,604: [main] ERROR
AbstractFlushingEventListener.performExecutions(301) - Could not synchronize
database state with session
org.hibernate.exception.GenericJDBCException: could not update:
[MembershipEntry#component[uuid,immediateMembershipId,groupSetId]{groupSetId=18de84d2450541ffaf5a5b97ac8aded7,
immediateMembershipId=ff03cc3d98b14695a04cd7fb1d2e90c7,
uuid=ff03cc3d98b14695a04cd7fb1d2e90c7:18de84d2450541ffaf5a5b97ac8aded7}]
at
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2430)
at
org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2312)
at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2612)
at
org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:96)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at
edu.internet2.middleware.grouper.hibernate.HibUtils.evict(HibUtils.java:250)
at
edu.internet2.middleware.grouper.hibernate.HibUtils.evict(HibUtils.java:243)
at
edu.internet2.middleware.grouper.hibernate.ByHql.uniqueResult(ByHql.java:253)
at
edu.internet2.middleware.grouper.hibernate.ByHqlStatic$1.callback(ByHqlStatic.java:306)
at
edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:496)
at
edu.internet2.middleware.grouper.hibernate.ByHqlStatic.uniqueResult(ByHqlStatic.java:297)
at
edu.internet2.middleware.grouper.internal.dao.hib3.Hib3MembershipDAO.findByGroupOwnerAndMemberAndFieldAndType(Hib3MembershipDAO.java:927)
at
edu.internet2.middleware.grouper.Membership.internal_delImmediateMembership(Membership.java:1245)
at edu.internet2.middleware.grouper.Group$7.callback(Group.java:1738)
at
edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:496)
at
edu.internet2.middleware.grouper.Group.deleteMember(Group.java:1713)
at
edu.internet2.middleware.grouper.Group.deleteMember(Group.java:1526)
at
edu.internet2.middleware.grouper.Group.deleteMember(Group.java:1452)
at
edu.internet2.middleware.grouper.Group.deleteMember(Group.java:1488)
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:404)
at
edu.internet2.middleware.grouper.app.gsh.GrouperShell.grouperShellHelper(GrouperShell.java:216)
at
edu.internet2.middleware.grouper.app.gsh.GrouperShell.main(GrouperShell.java:146)
at
edu.internet2.middleware.grouper.app.gsh.GrouperShellWrapper.main(GrouperShellWrapper.java:16)
Caused by: org.postgresql.util.PSQLException: ERROR: cannot update a view
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1592)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1327)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:192)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:304)
at
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2412)
... 41 more
2010-06-30 15:37:43,614: [main] ERROR ShellHelper.eval(76) - Sourced file:
inline evaluation of: `` g.deleteMember(m1) ;'' : Method Invocation
g.deleteMember
edu.internet2.middleware.grouper.exception.MemberDeleteException: Problem in
HibernateSession: HibernateSession: isNew: false, isReadonly: false,
grouperTransactionType: READ_WRITE_NEW,
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.FindByGroupOwnerAndMemberAndFieldAndType,
tx type: null, tx type: nullBind var[0]: 'Param (class java.lang.String):
'owner'->'a1681c3fcba3f54f759e6c9432004381', Bind var[1]: 'Param (class
java.lang.String): 'member'->'46b520f6badb4b9dad0b8c4dc4ba1d8c'Bind var[2]: 'Param
(class java.lang.String): 'fuuid'->'1879168ec99c410ea580e44707d14bad', , , group
name: u:fox:browser6, subject: Subject id: 8bc5cb1ad35311d78b049788b57938d5, sourceId:
uwpds, field: members,
Problem in HibernateSession: HibernateSession: isNew: true, isReadonly:
false, grouperTransactionType: READ_WRITE_NEW
at edu.internet2.middleware.grouper.Group$7.callback(Group.java:1762)
at
edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:496)
at
edu.internet2.middleware.grouper.Group.deleteMember(Group.java:1713)
at
edu.internet2.middleware.grouper.Group.deleteMember(Group.java:1526)
at
edu.internet2.middleware.grouper.Group.deleteMember(Group.java:1452)
at
edu.internet2.middleware.grouper.Group.deleteMember(Group.java:1488)
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:404)
at
edu.internet2.middleware.grouper.app.gsh.GrouperShell.grouperShellHelper(GrouperShell.java:216)
at
edu.internet2.middleware.grouper.app.gsh.GrouperShell.main(GrouperShell.java:146)
at
edu.internet2.middleware.grouper.app.gsh.GrouperShellWrapper.main(GrouperShellWrapper.java:16)
Caused by: edu.internet2.middleware.grouper.internal.dao.GrouperDAOException:
Problem in HibernateSession: HibernateSession: isNew: false, isReadonly:
false, grouperTransactionType: READ_WRITE_NEW,
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.FindByGroupOwnerAndMemberAndFieldAndType,
tx type: null, tx type: nullBind var[0]: 'Param (class java.lang.String):
'owner'->'a1681c3fcba3f54f759e6c9432004381', Bind var[1]: 'Param (class
java.lang.String): 'member'->'46b520f6badb4b9dad0b8c4dc4ba1d8c'Bind var[2]: 'Param
(class java.lang.String): 'fuuid'->'1879168ec99c410ea580e44707d14bad',
at
edu.internet2.middleware.grouper.hibernate.HibernateSession._internal_hibernateSessionCatch(HibernateSession.java:420)
at
edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:506)
at
edu.internet2.middleware.grouper.hibernate.ByHqlStatic.uniqueResult(ByHqlStatic.java:297)
at
edu.internet2.middleware.grouper.internal.dao.hib3.Hib3MembershipDAO.findByGroupOwnerAndMemberAndFieldAndType(Hib3MembershipDAO.java:927)
at
edu.internet2.middleware.grouper.Membership.internal_delImmediateMembership(Membership.java:1245)
at edu.internet2.middleware.grouper.Group$7.callback(Group.java:1738)
... 23 more
Caused by: org.hibernate.exception.GenericJDBCException: could not update:
[MembershipEntry#component[uuid,immediateMembershipId,groupSetId]{groupSetId=18de84d2450541ffaf5a5b97ac8aded7,
immediateMembershipId=ff03cc3d98b14695a04cd7fb1d2e90c7,
uuid=ff03cc3d98b14695a04cd7fb1d2e90c7:18de84d2450541ffaf5a5b97ac8aded7}]
at
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2430)
at
org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2312)
at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2612)
at
org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:96)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at
edu.internet2.middleware.grouper.hibernate.HibUtils.evict(HibUtils.java:250)
at
edu.internet2.middleware.grouper.hibernate.HibUtils.evict(HibUtils.java:243)
at
edu.internet2.middleware.grouper.hibernate.ByHql.uniqueResult(ByHql.java:253)
at
edu.internet2.middleware.grouper.hibernate.ByHqlStatic$1.callback(ByHqlStatic.java:306)
at
edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:496)
... 27 more
Caused by: org.postgresql.util.PSQLException: ERROR: cannot update a view
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1592)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1327)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:192)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:304)
at
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2412)
... 41 more
On Jun 30, 2010, at 5:41 PM, Shilen Patel wrote:
select membership0_.membership_id as membership1_23_0_,
membership0_.immediate_membership_id as immediate2_23_0_,
membership0_.group_set_id as group3_23_0_, member1_.id as id22_1_,
membership0_.hibernate_version_number as hibernate4_23_0_,
membership0_.owner_id as owner5_23_0_, membership0_.owner_attr_def_id as
owner6_23_0_, membership0_.owner_group_id as owner7_23_0_,
membership0_.owner_stem_id as owner8_23_0_, membership0_.member_id as
member9_23_0_, membership0_.field_id as field10_23_0_,
membership0_.immediate_field_id as immediate11_23_0_,
membership0_.via_composite_id as via12_23_0_,
membership0_.membership_creator_id as membership13_23_0_,
membership0_.membership_create_time as membership14_23_0_,
membership0_.group_set_creator_id as group15_23_0_,
membership0_.group_set_create_time as group16_23_0_,
membership0_.context_id as context17_23_0_,
membership0_.group_set_parent_id as group18_23_0_,
membership0_.via_group_id as via19_23_0_, membership0_.depth as
depth23_0_, membership0_.mship_type as mship21_23_0_,
membership0_.immediate_mship_enabled as immediate22_23_0_,
membership0_.immediate_mship_enabled_time as immediate23_23_0_,
membership0_.immediate_mship_disabled_time as immediate24_23_0_,
member1_.hibernate_version_number as hibernate2_22_1_,
member1_.subject_id as subject3_22_1_, member1_.subject_source as
subject4_22_1_, member1_.subject_type as subject5_22_1_,
member1_.context_id as context6_22_1_ from grouper_memberships_all_v
membership0_, grouper_members member1_ where
membership0_.owner_group_id='a1681c3fcba3f54f759e6c9432004381' and
membership0_.member_id='46b520f6badb4b9dad0b8c4dc4ba1d8c' and
membership0_.field_id='1879168ec99c410ea580e44707d14bad' and
membership0_.member_id=member1_.id and membership0_.mship_type='immediate'
- Re: [grouper-dev] 1.6.0 error deleting member, Shilen Patel, 07/01/2010
- Re: [grouper-dev] 1.6.0 error deleting member, Jim Fox, 07/01/2010
- Re: [grouper-dev] 1.6.0 error deleting member, Jim Fox, 07/01/2010
- Re: [grouper-dev] 1.6.0 error deleting member, Shilen Patel, 07/01/2010
Archive powered by MHonArc 2.6.16.