Uploaded image for project: 'Kuali Rice Development'
  1. Kuali Rice Development
  2. KULRICE-11906

Create Role transaction - adding Responsibility throws org.eclipse.persistence.exceptions.ValidationException

    Details

    • Type: Bug Fix
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Sprint:
      2.4.0-rc1 Sprint 2, 2.4.0-rc1 Sprint 3
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      Create Role transaction - adding Responsibility throws org.eclipse.persistence.exceptions.ValidationException

      Recreate:
      rice-sampleapp > Administration > Role
      create new , search, return value for Default
      enter Description, Namespace, Role Name
      enter Add Responsibility ID: KRSAP10000
      Add

      throws

      Exception [EclipseLink-7242] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.ValidationException
      Exception Description: An attempt was made to traverse a relationship using indirection that had a null Session.  This often occurs when an entity with an uninstantiated LAZY relationship is serialized and that lazy relationship is traversed after serialization.  To avoid this issue, instantiate the LAZY relationship prior to serialization.
      	at org.eclipse.persistence.exceptions.ValidationException.instantiatingValueholderWithNullSession(ValidationException.java:1021)
      	at org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.instantiate(UnitOfWorkValueHolder.java:232)
      	at org.eclipse.persistence.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:89)
      	at org.eclipse.persistence.indirection.IndirectList.buildDelegate(IndirectList.java:252)
      	at org.eclipse.persistence.indirection.IndirectList.getDelegate(IndirectList.java:423)
      	at org.eclipse.persistence.indirection.IndirectList.isEmpty(IndirectList.java:498)
      	at org.apache.commons.collections.CollectionUtils.isEmpty(CollectionUtils.java:979)
      	at org.apache.commons.collections.CollectionUtils.isNotEmpty(CollectionUtils.java:992)
      	at org.kuali.rice.kim.impl.common.attribute.KimAttributeDataBo.toAttributes(KimAttributeDataBo.java:91)
      	at org.kuali.rice.kim.impl.responsibility.ResponsibilityBo.getAttributes(ResponsibilityBo.java:98)
      	at org.kuali.rice.kim.api.responsibility.Responsibility$Builder.create(Responsibility.java:236)
      	at org.kuali.rice.kim.impl.responsibility.ResponsibilityBo.to(ResponsibilityBo.java:111)
      	at org.kuali.rice.kim.impl.responsibility.KimDocumentResponsibilityRule.processAddResponsibility(KimDocumentResponsibilityRule.java:55)
      	at org.kuali.rice.kim.document.rule.IdentityManagementRoleDocumentRule.processAddResponsibility(IdentityManagementRoleDocumentRule.java:784)
      	at org.kuali.rice.kim.impl.responsibility.AddResponsibilityEvent.invokeRuleMethod(AddResponsibilityEvent.java:48) 
      

        Attachments

          Issue Links

            Activity

            Hide
            mztaylor Martin Taylor (Inactive) added a comment -

            Both report error related to traversing relationship

            Show
            mztaylor Martin Taylor (Inactive) added a comment - Both report error related to traversing relationship
            Hide
            sonam Sona Sona (Inactive) added a comment -

            http://en.wikibooks.org/wiki/Java_Persistence/Relationships#Serialization.2C_and_Detaching

            A major issue with lazy relationships, is ensuring that the relationship is still available after the object has been detached, or serialized. For most JPA providers, after serialization any lazy relationship that was not instantiated will be broken, and either throw an error when accessed, or return null.

            Fixed the issue by overriding writeObject to access attributeDetails and roleResponsibilities before serialization.

            Show
            sonam Sona Sona (Inactive) added a comment - http://en.wikibooks.org/wiki/Java_Persistence/Relationships#Serialization.2C_and_Detaching A major issue with lazy relationships, is ensuring that the relationship is still available after the object has been detached, or serialized. For most JPA providers, after serialization any lazy relationship that was not instantiated will be broken, and either throw an error when accessed, or return null. Fixed the issue by overriding writeObject to access attributeDetails and roleResponsibilities before serialization.
            Hide
            jkeller Jonathan Keller added a comment - - edited

            FWIW, I'm making changes to the framework for deep copy support on KULRICE-13088 and KULRICE-13138. I just removed the code added for this JIRA and the above statements do not blow up any more.

            I'm going to back out your change for this JIRA on the premise that it's not necessary, but I wanted you to know unless the problem does appear again.

            Show
            jkeller Jonathan Keller added a comment - - edited FWIW, I'm making changes to the framework for deep copy support on KULRICE-13088 and KULRICE-13138 . I just removed the code added for this JIRA and the above statements do not blow up any more. I'm going to back out your change for this JIRA on the premise that it's not necessary, but I wanted you to know unless the problem does appear again.

              People

              • Assignee:
                sonam Sona Sona (Inactive)
                Reporter:
                cpedersen Corey Pedersen (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 6 hours Original Estimate - 6 hours
                  6h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day
                  1d