Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-4601

NPE when resolving referenced bean if the reference is a gallery image set in case if there is no backing HstRequestContext

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      When a HST bean has something like

      public HippoGalleryImageSet getImage() {
              return getLinkedBean(IMAGE, HippoGalleryImageSet.class);
      }
      

      then when this getImage is invoked but there is not HstRequestContext on the thread local, the NPE below happens

      hst content beans should always also work without HstRequestContext

      INFO] [talledLocalContainer] 23.05.2019 17:10:11 ERROR
      ThreadPoolTaskScheduler-1 [DynamicObjectConverterImpl.getObject:138] e
      [INFO] [talledLocalContainer] java.lang.NullPointerException: null
      [INFO] [talledLocalContainer] at
      org.hippoecm.hst.content.beans.dynamic.DynamicBeanDefinitionService.getGalleryImageSetTypeClass(DynamicBeanDefinitionService.java:212)
      ~[hst-content-beans-13.2.1-contentfeed-SNAPSHOT.jar:13.2.1-contentfeed-SNAPSHOT]
      [INFO] [talledLocalContainer] at
      org.hippoecm.hst.content.beans.dynamic.DynamicBeanDefinitionService.addBeanMethodImageLink(DynamicBeanDefinitionService.java:244)
      ~[hst-content-beans-13.2.1-contentfeed-SNAPSHOT.jar:13.2.1-contentfeed-SNAPSHOT]
      [INFO] [talledLocalContainer] at
      org.hippoecm.hst.content.beans.builder.AbstractBeanBuilderService.generateMethodsByNodes(AbstractBeanBuilderService.java:159)
      ~[hst-content-beans-13.2.1-contentfeed-SNAPSHOT.jar:13.2.1-contentfeed-SNAPSHOT]
      [INFO] [talledLocalContainer] at
      org.hippoecm.hst.content.beans.dynamic.DynamicBeanDefinitionService.generateBeanDefinition(DynamicBeanDefinitionService.java:150)
      ~[hst-content-beans-13.2.1-contentfeed-SNAPSHOT.jar:13.2.1-contentfeed-SNAPSHOT]
      [INFO] [talledLocalContainer] at
      org.hippoecm.hst.content.beans.dynamic.DynamicBeanDefinitionService.createDocumentBeanDef(DynamicBeanDefinitionService.java:88)
      ~[hst-content-beans-13.2.1-contentfeed-SNAPSHOT.jar:13.2.1-contentfeed-SNAPSHOT]
      [INFO] [talledLocalContainer] at
      org.hippoecm.hst.content.beans.dynamic.DynamicBeanDefinitionService.createDocumentBeanDef(DynamicBeanDefinitionService.java:80)
      ~[hst-content-beans-13.2.1-contentfeed-SNAPSHOT.jar:13.2.1-contentfeed-SNAPSHOT]
      [INFO] [talledLocalContainer] at
      org.hippoecm.hst.content.beans.manager.DynamicObjectConverterImpl.createDynamicBeanDefinition(DynamicObjectConverterImpl.java:164)
      ~[hst-content-beans-13.2.1-contentfeed-SNAPSHOT.jar:13.2.1-contentfeed-SNAPSHOT]
      [INFO] [talledLocalContainer] at
      org.hippoecm.hst.content.beans.manager.DynamicObjectConverterImpl.createDynamicBeanDefinition(DynamicObjectConverterImpl.java:153)
      ~[hst-content-beans-13.2.1-contentfeed-SNAPSHOT.jar:13.2.1-contentfeed-SNAPSHOT]
      [INFO] [talledLocalContainer] at
      org.hippoecm.hst.content.beans.manager.DynamicObjectConverterImpl.getObject(DynamicObjectConverterImpl.java:122)
      [hst-content-beans-13.2.1-contentfeed-SNAPSHOT.jar:13.2.1-contentfeed-SNAPSHOT]
      [INFO] [talledLocalContainer] at
      org.hippoecm.hst.content.beans.standard.HippoMirror.getReferencedBean(HippoMirror.java:73)
      [hst-content-beans-13.2.1-contentfeed-SNAPSHOT.jar:13.2.1-contentfeed-SNAPSHOT]
      [INFO] [talledLocalContainer] at

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aschrijvers Ard Schrijvers
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: