Skip to Content.
Sympa Menu

grouper-dev - Re: [grouper-dev] Error: Row was updated or deleted by another transaction

Subject: Grouper Developers Forum

List archive

Re: [grouper-dev] Error: Row was updated or deleted by another transaction


Chronological Thread 
  • From: Shilen Patel <>
  • To: John Gasper <>, "" <>
  • Subject: Re: [grouper-dev] Error: Row was updated or deleted by another transaction
  • Date: Wed, 11 May 2016 19:18:40 +0000
  • Accept-language: en-US
  • Authentication-results: unicon.net; dkim=none (message not signed) header.d=none;unicon.net; dmarc=none action=none header.from=duke.edu;
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:23

Hi John,

There's another issue related to the transaction isolation level that may be related.  Can you try setting:

hibernate.connection.isolation = 2


in grouper.hibernate.properties?  (This may not help here but worth a try.)

Thanks!

- Shilen

From: John Gasper <>
Date: Wednesday, May 11, 2016 at 2:58 PM
To: "" <>
Subject: [grouper-dev] Error: Row was updated or deleted by another transaction

Hi all,

In a hook I have the following code:

member = MemberFinder.findBySubject(GrouperSession.staticGrouperSession(), group.toSubject(), false);

I get the following nice exception:

edu.internet2.middleware.grouper.exception.GrouperStaleObjectStateException: Problem in HibernateSession: HibernateSession (19719f84): notNew, notReadonly, READ_WRITE_NEW, activeTransaction, session (5766aa84)
        at edu.internet2.middleware.grouper.hibernate.HibernateSession._internal_hibernateSessionCatch(HibernateSession.java:571)
        at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:697)
        at edu.internet2.middleware.grouper.hibernate.ByHqlStatic.uniqueResult(ByHqlStatic.java:323)
        at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3MemberDAO.findBySubject(Hib3MemberDAO.java:296)
        at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3MemberDAO.findBySubject(Hib3MemberDAO.java:202)
        at edu.internet2.middleware.grouper.MemberFinder.internal_findOrCreateBySubject(MemberFinder.java:401)
        at edu.internet2.middleware.grouper.MemberFinder.internal_findBySubject(MemberFinder.java:318)
        at edu.internet2.middleware.grouper.MemberFinder.findBySubject(MemberFinder.java:230)
        at edu.nd.middleware.grouper.membershipHooks.NdJexls.convertGroupToAliases(NdJexls.java:29)
        at sun.reflect.GeneratedMethodAccessor826.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at edu.internet2.middleware.grouperClientExt.org.apache.commons.jexl2.internal.MethodExecutor.execute(MethodExecutor.java:80)
        at edu.internet2.middleware.grouperClientExt.org.apache.commons.jexl2.internal.AbstractExecutor$Method.invoke(AbstractExecutor.java:343)
        at edu.internet2.middleware.grouperClientExt.org.apache.commons.jexl2.Interpreter.call(Interpreter.java:1083)
        at edu.internet2.middleware.grouperClientExt.org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:1115)
        at edu.internet2.middleware.grouperClientExt.org.apache.commons.jexl2.parser.ASTMethodNode.jjtAccept(ASTMethodNode.java:33)
        at edu.internet2.middleware.grouperClientExt.org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:1332)
        at edu.internet2.middleware.grouperClientExt.org.apache.commons.jexl2.parser.ASTReference.jjtAccept(ASTReference.java:33)
        at edu.internet2.middleware.grouperClientExt.org.apache.commons.jexl2.Interpreter.interpret(Interpreter.java:247)
        at edu.internet2.middleware.grouperClientExt.org.apache.commons.jexl2.ExpressionImpl.evaluate(ExpressionImpl.java:80)
        at edu.internet2.middleware.grouperClient.util.GrouperClientUtils.substituteExpressionLanguage(GrouperClientUtils.java:392)
        at edu.internet2.middleware.grouperClient.config.ConfigPropertiesCascadeUtils.substituteExpressionLanguage(ConfigPropertiesCascadeUtils.java:59)
        at edu.nd.middleware.grouper.membershipHooks.ManageDerivativeGroups$1.callback(ManageDerivativeGroups.java:142)
        at edu.internet2.middleware.grouper.GrouperSession.callbackGrouperSession(GrouperSession.java:974)
        at edu.nd.middleware.grouper.membershipHooks.ManageDerivativeGroups.membershipPostAddMember(ManageDerivativeGroups.java:39)
        at sun.reflect.GeneratedMethodAccessor784.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at edu.internet2.middleware.grouper.util.GrouperUtil.invokeMethod(GrouperUtil.java:4068)
        at edu.internet2.middleware.grouper.hooks.logic.GrouperHooksUtils.executeHook(GrouperHooksUtils.java:494)
        at edu.internet2.middleware.grouper.hooks.logic.GrouperHooksUtils.callHooksIfRegistered(GrouperHooksUtils.java:294)
        at edu.internet2.middleware.grouper.hooks.logic.GrouperHooksUtils.callHooksIfRegistered(GrouperHooksUtils.java:233)
        at edu.internet2.middleware.grouper.hooks.logic.GrouperHooksUtils.callHooksIfRegistered(GrouperHooksUtils.java:196)
        at edu.internet2.middleware.grouper.Membership.onPostSave(Membership.java:2023)
        at edu.internet2.middleware.grouper.hibernate.ByObject.save(ByObject.java:217)
        at edu.internet2.middleware.grouper.hibernate.ByObjectStatic$7.callback(ByObjectStatic.java:481)
        at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:687)
        at edu.internet2.middleware.grouper.hibernate.ByObjectStatic.save(ByObjectStatic.java:468)
        at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3MembershipDAO.save(Hib3MembershipDAO.java:2053)
        at edu.internet2.middleware.grouper.Membership.internal_addImmediateMembership(Membership.java:1246)
        at edu.internet2.middleware.grouper.Group$4.callback(Group.java:1392)
        at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:687)
        at edu.internet2.middleware.grouper.Group.internal_addMember(Group.java:1364)
        at edu.internet2.middleware.grouper.Group.addMember(Group.java:938)
        at edu.internet2.middleware.grouper.Group.addMember(Group.java:857)
        at edu.internet2.middleware.grouper.app.loader.GrouperLoaderType.syncOneMemberAddMemberLogic(GrouperLoaderType.java:3736)
        at edu.internet2.middleware.grouper.app.loader.GrouperLoaderType.access$400(GrouperLoaderType.java:112)
        at edu.internet2.middleware.grouper.app.loader.GrouperLoaderType$11$2.callLogic(GrouperLoaderType.java:2386)
        at edu.internet2.middleware.grouper.app.loader.GrouperLoaderType$11$2.callLogic(GrouperLoaderType.java:2382)
        at edu.internet2.middleware.grouper.util.GrouperCallable$1.callback(GrouperCallable.java:164)
        at edu.internet2.middleware.grouper.GrouperSession.callbackGrouperSession(GrouperSession.java:974)
        at edu.internet2.middleware.grouper.util.GrouperCallable.callLogicWithSessionIfExists(GrouperCallable.java:161)
        at edu.internet2.middleware.grouper.util.GrouperCallable.call(GrouperCallable.java:132)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [edu.internet2.middleware.grouper.attr.value.AttributeAssignValue#bf0f785536b4462990fca5604c2350a3]
        at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1950)
        at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2710)
        at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2911)
        at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:97)
        at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:189)
        at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
        at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
        at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
        at edu.internet2.middleware.grouper.hibernate.HibUtils.evict(HibUtils.java:305)
        at edu.internet2.middleware.grouper.hibernate.HibUtils.evict(HibUtils.java:261)
        at edu.internet2.middleware.grouper.hibernate.ByHql.uniqueResult(ByHql.java:285)
        at edu.internet2.middleware.grouper.hibernate.ByHqlStatic$1.callback(ByHqlStatic.java:332)
        at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:687)
        ... 56 more

Any thoughts on how to work around this? I even tried using GroupFinder to requery the group object and get the same thing.

Thanks,
John

-- 
John Gasper
IAM Consultant
Unicon, Inc.
PGP/GPG Key: 0xbafee3ef




Archive powered by MHonArc 2.6.16.

Top of Page