Announcement Announcement Module
No announcement yet.
Transaction must be running. ACL_ENTRY deleted. Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Transaction must be running. ACL_ENTRY deleted.

    Here is what happened:
    I have all ACL tables in place.
    I have one record in acl_sid table which is the admin.
    admin has administrative access to all object in acl_entry table. (mask = 16)
    I try assign a permission to new user 'user1'.
    Then the system prompt: "...: Transaction must be running."
    I checked my code and I already have @Transaction on.
    I checked the database, it create a new record in acl_sid table with sid = 'user1'.
    But what surprise me is it it deleted the record in acl_entry for admin for the object. Now admin cannot access the object anymore.
    Is this normal? Or I should not do it this way?

    I tried adding a record for 'user1' into acl_sid and assign the permission again. This time all went well with no problem.

            MutableAcl acl;
            ObjectIdentity oid = new ObjectIdentityImpl(Project.class, project.getId());
            try {
                acl = (MutableAcl) mutableAclService.readAclById(oid);
            } catch (NotFoundException nfe) {
                acl = mutableAclService.createAcl(oid);
            acl.insertAce(acl.getEntries().size(), permission, recipient, true);
    Transaction must be running.

  • #2
    What do you have @Transaction annotated on? Are you sure that transactions are working (you should be able to set a breakpoint in the relevant ACL method(s) and see the transaction interceptor in the stack trace, assuming you are using Spring transaction suppport).


    • #3
      Yes. I am using Spring transaction support. I'll put a breakpoint and see what happened.
      	<bean id="transactionManager"
      		<property name="sessionFactory" ref="sessionFactory" />


      • #4
        Hi tcong,

        do you solved your problem? If yes a quick solution would be great!