Skip to Content.
Sympa Menu

grouper-dev - RE: [grouper-dev] 2.1.2 hook writer not writing?

Subject: Grouper Developers Forum

List archive

RE: [grouper-dev] 2.1.2 hook writer not writing?


Chronological Thread 
  • From: Jim Fox <>
  • To: Chris Hyzer <>
  • Cc: Grouper Dev <>
  • Subject: RE: [grouper-dev] 2.1.2 hook writer not writing?
  • Date: Wed, 12 Dec 2012 13:09:15 -0800 (PST)



I added some logging and a try/catch around the executeHook and commit statements.

Jim



I will look when I get home (where I had it running), though in the meantime,
when I look at 2.1.2 source (attached), I don't see log lines on the line
numbers listed. E.g. GrouperHooksUtils 498 and 504... any ideas why? :)

Thanks,
Chris

-----Original Message-----
From: Jim Fox
[mailto:]
Sent: Wednesday, December 12, 2012 3:35 PM
To: Chris Hyzer
Cc: Grouper Dev
Subject: RE: [grouper-dev] 2.1.2 hook writer not writing?



Here's what I'm seeing.


In GrouperHooksUtils.schedulePostCommitHooksIfRegistered


There is the call to execute the hook

executeHook(method, hook, finalHooksBean, hooksContext, null,
asychronous);

followed by a call to commit

hibernateSession.commit(GrouperCommitType.COMMIT_NOW);

[ I put an exception catch around the commit. ]


The first statement executes fine, debug log shows:

GrouperHooksUtils.executeHook(498) - START: Hook
UWMembershipHooks.membershipPostCommitAddMember id: RKW6SJT1
HibernateSession.<init>(151) - Not using nested transactions, converting
transaction type to: READ_WRITE_NEW
GrouperHooksUtils.executeHook(504) - END (normal): Hook
UWMembershipHooks.membershipPostCommitAddMember id: RKW6SJT1 (9ms)

and the spy log shows:

1ms, statement: Method.java.invoke() line 601,
GrouperUtil.java.invokeMethod() line 3896,
GrouperHooksUtils.java.executeHook() line 502,
GrouperHooksUtils.java.access$100() line 56,
GrouperHooksUtils.java.callback() line 437,
GrouperHooksUtils.java.afterCompletion() line 427,
Group.java.internal_addMember() line 1115, Group.java.addMember() line
942, Group.java.addMember() line 861
insert into uw_activity (time, action, group_id, data, actors) values
(1355343520114, 'pm', 'a1681c3fcba3f54f759e6c9432004381', 'uwpds imf',
'fox|fox')


Then the commit statement fails:

GrouperHooksUtils$1$1$1.callback(444) - commit:
org.hibernate.TransactionException: Transaction not successfully started


So the commit fails and the next thing spy shows is a rollback.

If I do the commit manually, in the hook, with

HibernateSession.bySqlStatic().executeSql( "commit");

That works.

Jim













Archive powered by MHonArc 2.6.16.

Top of Page