-
Type:
Clean up
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 10.10-HF54, 2021.12
-
Fix Version/s: 10.10-HF58, 2021.15
-
Component/s: Rest API
-
Release Notes Summary:Nuxeo default enrichers do not produce warns on empty document models.
-
Tags:
-
Upgrade notes:
-
Sprint:nxplatform #51, nxplatform #52, nxplatform #53
-
Story Points:1
Since this commit, most default JSON enrichers produces a warn that quite pollutes logs when fetching an empty document model (typically at document creation in Web UI).
Typically:
2021-12-01T11:12:32,419 WARN [AbstractJsonEnricher] The following error occured with enricher: tags java.lang.IllegalArgumentException: null reference at org.nuxeo.ecm.core.api.AbstractSession.resolveReference(AbstractSession.java:332) ~[nuxeo-core-10.10-HF54.jar:?] at org.nuxeo.ecm.core.api.AbstractSession.exists(AbstractSession.java:858) ~[nuxeo-core-10.10-HF54.jar:?] at org.nuxeo.ecm.platform.tag.FacetedTagService.doGetTags(FacetedTagService.java:161) ~[nuxeo-platform-tag-core-10.10-HF21.jar:?] at org.nuxeo.ecm.platform.tag.AbstractTagService.lambda$getTags$2(AbstractTagService.java:153) ~[nuxeo-platform-tag-core-10.10-HF21.jar:?] at org.nuxeo.ecm.core.api.CoreInstance$2.run(CoreInstance.java:206) ~[nuxeo-core-api-10.10-HF54.jar:?] at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:119) ~[nuxeo-core-api-10.10-HF54.jar:?] at org.nuxeo.ecm.core.api.CoreInstance.doPrivileged(CoreInstance.java:208) ~[nuxeo-core-api-10.10-HF54.jar:?] at org.nuxeo.ecm.platform.tag.AbstractTagService.getTags(AbstractTagService.java:153) ~[nuxeo-platform-tag-core-10.10-HF21.jar:?] at org.nuxeo.ecm.platform.tag.io.TagsJsonEnricher.write(TagsJsonEnricher.java:55) ~[nuxeo-platform-tag-core-10.10-HF21.jar:?] at org.nuxeo.ecm.platform.tag.io.TagsJsonEnricher.write(TagsJsonEnricher.java:41) ~[nuxeo-platform-tag-core-10.10-HF21.jar:?] at org.nuxeo.ecm.core.io.marshallers.json.enrichers.AbstractJsonEnricher.write(AbstractJsonEnricher.java:70) [nuxeo-core-io-10.10-HF54.jar:?] at org.nuxeo.ecm.core.io.marshallers.json.enrichers.AbstractJsonEnricher.write(AbstractJsonEnricher.java:46) [nuxeo-core-io-10.10-HF54.jar:?] at org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter.write(AbstractJsonWriter.java:81) [nuxeo-core-io-10.10-HF54.jar:?] at org.nuxeo.ecm.core.io.marshallers.json.ExtensibleEntityJsonWriter.write(ExtensibleEntityJsonWriter.java:100) [nuxeo-core-io-10.10-HF54.jar:?] at org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter.write(AbstractJsonWriter.java:81) [nuxeo-core-io-10.10-HF54.jar:?] at org.nuxeo.ecm.webengine.jaxrs.coreiodelegate.PartialCoreIODelegate.writeTo(PartialCoreIODelegate.java:113) [nuxeo-webengine-jaxrs-10.10-HF44.jar:?] at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:302) [jersey-server-1.19.4.jar:1.19.4] at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1510) [jersey-server-1.19.4.jar:1.19.4] at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419) [jersey-server-1.19.4.jar:1.19.4] at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409) [jersey-server-1.19.4.jar:1.19.4] at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409) [jersey-servlet-1.19.4.jar:1.19.4] at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558) [jersey-servlet-1.19.4.jar:1.19.4] at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733) [jersey-servlet-1.19.4.jar:1.19.4] at org.nuxeo.ecm.webengine.app.jersey.WebEngineServlet.containerService(WebEngineServlet.java:72) [nuxeo-webengine-core-10.10-HF44.jar:?] at org.nuxeo.ecm.webengine.app.jersey.WebEngineServlet.service(WebEngineServlet.java:56) [nuxeo-webengine-core-10.10-HF44.jar:?] at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) [servlet-api-9.0.54.jar:4.0.FR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat-websocket-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.nuxeo.elasticsearch.ElasticSearchFilter.doFilter(ElasticSearchFilter.java:59) [nuxeo-elasticsearch-core-10.10-HF52.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.nuxeo.ecm.webengine.jaxrs.session.SessionCleanupFilter.run(SessionCleanupFilter.java:50) [nuxeo-webengine-jaxrs-10.10-HF44.jar:?] at org.nuxeo.ecm.webengine.jaxrs.HttpFilter.doFilter(HttpFilter.java:49) [nuxeo-webengine-jaxrs-10.10-HF44.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.nuxeo.ecm.webengine.app.WebContextFilter.doFilter(WebContextFilter.java:56) [nuxeo-webengine-core-10.10-HF44.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.nuxeo.ecm.webengine.jaxrs.context.RequestContextFilter.run(RequestContextFilter.java:48) [nuxeo-webengine-jaxrs-10.10-HF44.jar:?] at org.nuxeo.ecm.webengine.jaxrs.HttpFilter.doFilter(HttpFilter.java:49) [nuxeo-webengine-jaxrs-10.10-HF44.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.nuxeo.ecm.webengine.app.HeaderFixFilter.run(HeaderFixFilter.java:62) [nuxeo-webengine-core-10.10-HF44.jar:?] at org.nuxeo.ecm.webengine.jaxrs.HttpFilter.doFilter(HttpFilter.java:49) [nuxeo-webengine-jaxrs-10.10-HF44.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.nuxeo.ecm.core.management.jtajca.internal.Log4jWebFilter.doFilter(Log4jWebFilter.java:69) [nuxeo-core-management-jtajca-10.10.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoRequestControllerFilter.doFilter(NuxeoRequestControllerFilter.java:134) [nuxeo-platform-web-common-10.10-HF52.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilterInternal(NuxeoAuthenticationFilter.java:640) [nuxeo-platform-web-common-10.10-HF52.jar:?] at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilter(NuxeoAuthenticationFilter.java:431) [nuxeo-platform-web-common-10.10-HF52.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.nuxeo.ecm.platform.web.common.exceptionhandling.NuxeoExceptionFilter.doFilter(NuxeoExceptionFilter.java:40) [nuxeo-platform-web-common-10.10-HF52.jar:?] at javax.servlet.http.HttpFilter.doFilter(HttpFilter.java:57) [servlet-api-9.0.54.jar:4.0.FR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.nuxeo.ecm.platform.web.common.encoding.NuxeoEncodingFilter.doFilter(NuxeoEncodingFilter.java:64) [nuxeo-platform-web-common-10.10-HF52.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:711) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:385) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:313) [catalina-9.0.54.jar:9.0.54] at org.nuxeo.ecm.restapi.server.APIServlet.service(APIServlet.java:50) [nuxeo-rest-api-server-10.10-HF54.jar:?] at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) [servlet-api-9.0.54.jar:4.0.FR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat-websocket-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.nuxeo.elasticsearch.ElasticSearchFilter.doFilter(ElasticSearchFilter.java:59) [nuxeo-elasticsearch-core-10.10-HF52.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoThreadTrackerFilter.doFilter(NuxeoThreadTrackerFilter.java:43) [nuxeo-platform-web-common-10.10-HF52.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoStandbyFilter.doFilter(NuxeoStandbyFilter.java:67) [nuxeo-platform-web-common-10.10-HF52.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.nuxeo.ecm.core.management.jtajca.internal.Log4jWebFilter.doFilter(Log4jWebFilter.java:69) [nuxeo-core-management-jtajca-10.10.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.nuxeo.ecm.platform.ui.web.rest.FancyURLFilter.doFilter(FancyURLFilter.java:120) [nuxeo-platform-ui-web-10.10-HF54.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.nuxeo.ecm.platform.web.common.idempotency.NuxeoIdempotentFilter.doFilter(NuxeoIdempotentFilter.java:114) [nuxeo-platform-web-common-10.10-HF52.jar:?] at javax.servlet.http.HttpFilter.doFilter(HttpFilter.java:57) [servlet-api-9.0.54.jar:4.0.FR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoRequestControllerFilter.doFilter(NuxeoRequestControllerFilter.java:134) [nuxeo-platform-web-common-10.10-HF52.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:209) [cors-filter-2.6.jar:2.6] at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:244) [cors-filter-2.6.jar:2.6] at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoCorsCsrfFilter.doFilter(NuxeoCorsCsrfFilter.java:258) [nuxeo-platform-web-common-10.10-HF52.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.nuxeo.ecm.platform.web.common.exceptionhandling.NuxeoExceptionFilter.doFilter(NuxeoExceptionFilter.java:40) [nuxeo-platform-web-common-10.10-HF52.jar:?] at javax.servlet.http.HttpFilter.doFilter(HttpFilter.java:57) [servlet-api-9.0.54.jar:4.0.FR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.nuxeo.ecm.platform.web.common.encoding.NuxeoEncodingFilter.doFilter(NuxeoEncodingFilter.java:64) [nuxeo-platform-web-common-10.10-HF52.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.valves.rewrite.RewriteValve.invoke(RewriteValve.java:555) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [catalina-9.0.54.jar:9.0.54] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357) [catalina-9.0.54.jar:9.0.54] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382) [tomcat-coyote-9.0.54.jar:9.0.54] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-coyote-9.0.54.jar:9.0.54] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:895) [tomcat-coyote-9.0.54.jar:9.0.54] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1722) [tomcat-coyote-9.0.54.jar:9.0.54] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote-9.0.54.jar:9.0.54] at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) [tomcat-util-9.0.54.jar:9.0.54] at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) [tomcat-util-9.0.54.jar:9.0.54] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util-9.0.54.jar:9.0.54] at java.lang.Thread.run(Thread.java:829) [?:?]
Our enrichers should gently handle empty document model use cases and do not produce error logs.
Here is the list of the enrichers to clean:
- firstAccessibleAncestor
- permissions
- publications
- tags
- breadcrumb
- hasContent
- renditions
- runnableWorkflows