Kuali Rice Development
  1. Kuali Rice Development
  2. KULRICE-2572

proxy="true" on EntityPrivacyPreferences causes OJB errors


    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0
    • Component/s: Development
    • Labels:
    • Similar issues:
      KULRICE-8336Poor performance saving routing data
      KULRICE-5135fix ojb proxies for classes with protected setters
      KULRICE-4221Make sure that these JPA changes aren't negatively affecting OJB
      KULRICE-6577KRAD Infrastructure not handling null OJB proxies?
      KULRICE-9102Determine how best to handle linking to DocumentHeader using JPA as was done with OJB
      KULRICE-4961Issue using ojb patch5 in KFS
      KULRICE-4973fix dtd validation errors in rice ojb files
      KULRICE-11417Fix the mixing of OJB and JPA in KEW Rule Maintenance
      KULRICE-8332Errors on passing a non-OJB-bound object into PersistenceServiceStructureImplBase.getBusinessObjectAttributeClass
      KULRICE-13176ApplicationDocumentStatus missing properties for OJB-mapped documentTypeId and statusName properties


      I noticed that the OJB mappings for KimEntityImpl were changed to set proxy="true" on the relationship to the EntityPrivacyPreferences.

      The issue with this is that if the entity does not have any privacy preferences (i.e. no rows in the privacy table). The the following code throws an exception:

      EntityPrivacyPreferences prefs = entity.getPrivacyPreferences();
      if (prefs != null) {

      That throws the following errors:

      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:585)
      at org.apache.ojb.broker.core.proxy.AbstractIndirectionHandler.invoke(AbstractIndirectionHandler.java:353)

      It's an NPE because in this case prefs really should have been null, but because a proxy was used, OJB had no way of knowing that so it NPEs when trying to materializing the underlying preferences which don't exist.

      This is currently causing Document Search to blow up since it uses the privacy preferences when displaying names.


        Eric Westfall added a comment -

        Bulk change of all Rice 1.0 issues to closed after public release.

        Eric Westfall added a comment - Bulk change of all Rice 1.0 issues to closed after public release.


          • Assignee:
            Jonathan Keller
            Eric Westfall
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created:

              Structure Helper Panel