Hi,
At our client we use hippo 11.2.4 and the Relevance module. On our server we get errormessages like these:
29.10.2018 12:59:04 ERROR http-nio-8080-exec-47 [TargetingUpdateValve.invoke:73] Error while updating targeting data
java.lang.NullPointerException
at java.util.Arrays.stream(Arrays.java:5004)
at java.util.stream.Stream.of(Stream.java:1000)
at org.onehippo.forge.bundledcollectors.CookieCollector.extractTerms(CookieCollector.java:45)
at com.onehippo.cms7.targeting.collectors.AbstractTermsCollector.getTargetingRequestData(AbstractTermsCollector.java:37)
at com.onehippo.cms7.targeting.collectors.AbstractTermsCollector.getTargetingRequestData(AbstractTermsCollector.java:17)
at com.onehippo.cms7.targeting.TargetingServiceImpl.updateVisitorTargetingData(TargetingServiceImpl.java:208)
at com.onehippo.cms7.targeting.TargetingServiceImpl.obtainTargetingState(TargetingServiceImpl.java:115)
at com.onehippo.cms7.targeting.hst.container.TargetingUpdateValve.obtainTargetingState(TargetingUpdateValve.java:122)
at com.onehippo.cms7.targeting.hst.container.TargetingUpdateValve.invoke(TargetingUpdateValve.java:57)
at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288)
at org.hippoecm.hst.core.container.LocalizationValve.invoke(LocalizationValve.java:96)
at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:288)
at nl.unive.customvalve.RedirectZakelijkValve.invoke(RedirectZakelijkValve.java:85)
After some research of the code, this is what I found.
- Arrays.java:5004 ==> stream(array, 0, array.length) ==> null for value ‘array’ results in NPE
- called by Stream.of(values) ==> has a NotNull annnotation
- CookieCollector.java:45 ==> Stream.of(request.getCookies()) ==> request.getCookies() can be null (see https://tomcat.apache.org/tomcat-8.0-doc/servletapi/javax/servlet/http/HttpServletRequest.html#getCookies())
There should be a check here for null value before feeding it to Stream.of().
I am willing to make a pullrequest in the code repository of that collector, but couldn’t find it in bloomreach git repository(https://github.com/search?p=2&q=Bloomreach&type=Repositories).
Am I looking in the wrong place or is this closed source?
If I can’t change the code, where can I submit a bug report?