Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
Description
As of the fix for HSTTWO-4273, now it shows NPE if there's a circular references between hippo documents.
Here's a reproduction steps:
- Build and run the testsuite
- Visit http://localhost:8080/site/wikipedia and create 5 wiki documents.
- Visit one wiki document and add a related document to another wiki document.
- Open the other wiki document and set the related document to the first wiki document.
- Visit resource api URL. e.g, http://localhost:8080/site/resourceapi/wikipedia/wiki-1521140740370/wiki-1521140740372/americansamoa.html
- Now you got NPE:
Caused by: java.lang.NullPointerException at com.fasterxml.jackson.databind.ser.impl.WritableObjectId.writeAsId(WritableObjectId.java:39) at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase._serializeWithObjectId(BeanSerializerBase.java:596) at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:148) at org.hippoecm.hst.core.pagemodel.container.HippoBeanSerializer.serialize(HippoBeanSerializer.java:83) at org.hippoecm.hst.core.pagemodel.container.HippoBeanSerializer.serialize(HippoBeanSerializer.java:31) at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:119) ... 91 more
15.03.2018 15:37:47 WARN http-nio-8080-exec-1 [HstDelegateeFilterBean.doFilter:426] ContainerException for 'Request{ method='GET', scheme='http', host='localhost:8080', requestURI='/site/resourceapi/wikipedia/wiki-1521142573506/wiki-1521142573508/americansamoa.html', queryString='null'}': org.hippoecm.hst.core.container.ContainerException: java.lang.IllegalArgumentException: (was java.lang.NullPointerException) (through reference chain: java.util.LinkedHashMap["u3ac603e964924bcb9db03a54fe25597f"] ->org.hippoecm.hst.core.pagemodel.container.HippoBeanWrapperModel["bean"]->org.hippoecm.hst.demo.beans.WikiBean["relatedDocs"]->java.util.ArrayList[0] ->org.hippoecm.hst.demo.beans.WikiBean["relatedDocs"]- >java.util.ArrayList[0]->org.hippoecm.hst.demo.beans.WikiBean["blocks"]->java.util.ArrayList[0])
Attachments
Issue Links
- is a result of
-
HSTTWO-4273 [SPA++] Always include HippoBean models in content section even when wrapped by somethings
- Closed