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

View object pre-loading for components with propertyReplacer defined results in NPE

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0-m2
    • Fix Version/s: 2.2.0-m3, 2.2
    • Component/s: User Interface
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-5450The id property of PropertyReplacer components does not get set.
      KULRICE-8668Parameter search by component throws NPE if there is a parameter with an invalid component
      KULRICE-7015enRuleAttributeService must be defined locally in KEW EMBEDDED mode
      KULRICE-9287KualiLookupableTest fails in CI with Lookup not defined for business object class org.kuali.rice.krad.test.document.bo.Account
      KULRICE-8954Reduce object creation in component lifecycle
      KULRICE-7061Render lookup results by component refresh
      KULRICE-8797Reduce object creation in view lifecycle
      KULRICE-12324NPE in ParameterLookupableHelperServiceImpl if derived component is not found
      KULRICE-9969KRAD Kitchen Sink Navigation select Uif Component navigation Uif Component View results in blank page
      KULRICE-10763AFT Failure: Component 500 Error Lookup not defined for business object class org.kuali.rice.coreservice.impl.component.ComponentBo
    • Rice Module:
      KRAD
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required

      Description

      During KS MyPlan pre-upgrade to Rice 2.2 M2 we experienced NPEs with our KRAD component definitions which have propertyReplacers defined with SpEL #{} syntax in the 'condition' attribute. The condition was being evaluated when the bean was being created and because some of the data being referenced in the condition expression isn't available until a session is available this was causing a null pointer exception. The workaround was to set the page pool size to zero.

        Activity

        Hide
        Jerry Neal (Inactive) added a comment - - edited

        Glenn,

        Would you mind to attach the exception stack trace you are seeing and also your XML configuration that contains the property replacer?

        thanks,
        Jerry

        Show
        Jerry Neal (Inactive) added a comment - - edited Glenn, Would you mind to attach the exception stack trace you are seeing and also your XML configuration that contains the property replacer? thanks, Jerry
        Hide
        Jerry Neal (Inactive) added a comment -

        Also Glenn,

        I noticed you referenced #{} syntax. This is the standard Spring EL syntax that gets evaluated when the beans load. The UIF syntax is @{}. Evaluation of these expressions are deferred until the view is being created (for a request). Just want to verify which syntax is being used.

        thanks,
        Jerry

        Show
        Jerry Neal (Inactive) added a comment - Also Glenn, I noticed you referenced #{} syntax. This is the standard Spring EL syntax that gets evaluated when the beans load. The UIF syntax is @{}. Evaluation of these expressions are deferred until the view is being created (for a request). Just want to verify which syntax is being used. thanks, Jerry
        Hide
        Matt Sargent added a comment -

        Talked in the MyPlan/KRAD Rice checkpoint meeting and Glenn is going to look at wrapping #{} in @{} which should take care of this issue. Please reopen if that doens't fix the issue.

        Show
        Matt Sargent added a comment - Talked in the MyPlan/KRAD Rice checkpoint meeting and Glenn is going to look at wrapping #{} in @{} which should take care of this issue. Please reopen if that doens't fix the issue.
        Hide
        Hemanth Gajula (Inactive) added a comment -

        Attached a text file which has the stacktrace when setting the page pool greater than 0 and property replacer with syntax @{}.Included the xml configuration in the attached text file

        Show
        Hemanth Gajula (Inactive) added a comment - Attached a text file which has the stacktrace when setting the page pool greater than 0 and property replacer with syntax @{}.Included the xml configuration in the attached text file
        Hide
        Hemanth Gajula (Inactive) added a comment -

        Tried with <property name="preloadPoolSize" value="5"/> and the property replacer syntax as #

        {..} instead of @{..}

        it worked fine page loads up, no stacktrace.

        Show
        Hemanth Gajula (Inactive) added a comment - Tried with <property name="preloadPoolSize" value="5"/> and the property replacer syntax as # {..} instead of @{..} it worked fine page loads up, no stacktrace.
        Hide
        Jerry Neal (Inactive) added a comment -

        Reopening Jira to figure out why the @{} syntax is not working.

        Show
        Jerry Neal (Inactive) added a comment - Reopening Jira to figure out why the @{} syntax is not working.
        Hide
        Hemanth Gajula (Inactive) added a comment -

        I tried <property name="preloadPoolSize" value="5"/> and the property replacer syntax as #

        {..}

        page loads up fine but the GlobalVariables.getUserSession() is returning null value,then I tried <property name="preloadPoolSize" value="5"/> and with no property replacer syntax at all(no #{} or @{}) page loads up fine and event the GlobalVariables.getUserSession() is returning values back.

        Show
        Hemanth Gajula (Inactive) added a comment - I tried <property name="preloadPoolSize" value="5"/> and the property replacer syntax as # {..} page loads up fine but the GlobalVariables.getUserSession() is returning null value,then I tried <property name="preloadPoolSize" value="5"/> and with no property replacer syntax at all(no #{} or @{}) page loads up fine and event the GlobalVariables.getUserSession() is returning values back.
        Hide
        Jerry Neal (Inactive) added a comment -

        Hemanth,

        Great. So to verify, things working as desired when you do not add any syntax (#{} or @{})?

        Jerry

        Show
        Jerry Neal (Inactive) added a comment - Hemanth, Great. So to verify, things working as desired when you do not add any syntax (#{} or @{})? Jerry
        Hide
        Jerry Neal (Inactive) added a comment -

        I believe this should be fixed now (at least it works for the property replacers we have).

        You should use the @{} syntax for the condition

        Show
        Jerry Neal (Inactive) added a comment - I believe this should be fixed now (at least it works for the property replacers we have). You should use the @{} syntax for the condition

          People

          • Assignee:
            Jerry Neal (Inactive)
            Reporter:
            Glenn Sudduth (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Structure Helper Panel