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

PageModelApi serialization results in 500 when setting a folder bean as model

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • High
    • Resolution: Fixed
    • None
    • 5.3.0
    • None
    • None

    Description

      Reproduction:

      In testsuite, to org.hippoecm.hst.demo.components.Archive#doBeforeRender add

      request.setModel("current", currentBean);

      and then visit

      http://localhost:8080/site/resourceapi/news
      

      Cause is an NPE

      [INFO] [talledLocalContainer] Caused by: com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: org.hippoecm.hst.core.pagemodel.model.ComponentWindowModel["components"]->java.util.LinkedHashSet[0]->org.hippoecm.hst.core.pagemodel.model.ComponentWindowModel["components"]->java.util.LinkedHashSet[2]->org.hippoecm.hst.core.pagemodel.model.ComponentWindowModel["models"]->java.util.LinkedHashMap["crBean"])
      [INFO] [talledLocalContainer] 	at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:388) ~[jackson-databind-2.8.8.jar:2.8.8]
      [INFO] [talledLocalContainer] 	at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:348) ~[jackson-databind-2.8.8.jar:2.8.8]
      [INFO] [talledLocalContainer] 	at com.fasterxml.jackson.databind.ser.std.StdSerializer.wrapAndThrow(StdSerializer.java:343) ~[jackson-databind-2.8.8.jar:2.8.8]
      [INFO] [talledLocalContainer] 	at com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeFields(MapSerializer.java:637) ~[jackson-databind-2.8.8.jar:2.8.8]
      [INFO] [talledLocalContainer] 	at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:536) ~[jackson-databind-2.8.8.jar:2.8.8]
      [INFO] [talledLocalContainer] 	at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:30) ~[jackson-databind-2.8.8.jar:2.8.8]
      [INFO] [talledLocalContainer] 	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:704) ~[jackson-databind-2.8.8.jar:2.8.8]
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: