Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-29692

Fix event listener 'timezoneSelector' when retrieving event context

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 10.10
    • Fix Version/s: None
    • Component/s: Core
    • Tags:
    • Backlog priority:
      700
    • Story Points:
      1

      Description

      When event listener timezoneSelector retrieves the event context, it casts it directly to class org.nuxeo.ecm.core.event.impl.DocumentEventContext without making sure it is actually an instance of it, it could be org.nuxeo.retention.event.RetentionEventContext.

      This happens in the context of a Nuxeo instance running with the nuxeo-retention addon, and when calling automation operation Retention.FireEvent with parameters:

      {"name": "documentModified"}
      
      2020-09-22T13:25:03,669 ERROR [http-nio-0.0.0.0-8080-exec-15] [org.nuxeo.ecm.core.event.impl.EventServiceImpl] Exception during timezoneSelector sync listener execution, continuing to run other listeners
      java.lang.ClassCastException: class org.nuxeo.retention.event.RetentionEventContext cannot be cast to class org.nuxeo.ecm.core.event.impl.DocumentEventContext (org.nuxeo.retention.event.RetentionEventContext and org.nuxeo.ecm.core.event.impl.DocumentEventContext are in unnamed module of loader org.nuxeo.runtime.tomcat.NuxeoWebappClassLoader @1caa9eb6)
      	at org.nuxeo.ecm.user.center.profile.localeProvider.UserLocaleSelectorListener.handleEvent(UserLocaleSelectorListener.java:43) ~[nuxeo-user-profile-jsf-10.10.jar:?]
      	at org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent(EventServiceImpl.java:242) ~[nuxeo-core-event-10.10-HF30.jar:?]
      	at org.nuxeo.retention.operations.FireRetentionEvent.run(FireRetentionEvent.java:67) ~[nuxeo-retention-core-10.10-HF27.jar:?]
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
      	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.doInvoke(InvokableMethod.java:167) ~[nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:179) ~[nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.core.impl.OperationChainCompiler$OperationMethod.invoke(OperationChainCompiler.java:151) ~[nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.core.impl.OperationChainCompiler$CompiledChainImpl.lambda$invoke$0(OperationChainCompiler.java:218) ~[nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.OperationContext.call(OperationContext.java:326) ~[nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.OperationContext.callWithChainParameters(OperationContext.java:291) ~[nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.core.impl.OperationChainCompiler$CompiledChainImpl.invoke(OperationChainCompiler.java:215) ~[nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:115) ~[nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.lambda$run$0(OperationServiceImpl.java:105) ~[nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.OperationContext.call(OperationContext.java:326) [nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.OperationContext.callWithChainParameters(OperationContext.java:291) [nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:105) [nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.server.jaxrs.OperationResource.execute(OperationResource.java:58) [nuxeo-automation-server-10.10-HF29.jar:?]
      	at org.nuxeo.ecm.automation.server.jaxrs.ExecutableResource.doPost(ExecutableResource.java:70) [nuxeo-automation-server-10.10-HF29.jar:?]
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
      	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
      	at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) [jersey-server-1.19.4.jar:1.19.4]
      	at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ObjectOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:258) [jersey-server-1.19.4.jar:1.19.4]
      	at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) [jersey-server-1.19.4.jar:1.19.4]
      	at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) [jersey-server-1.19.4.jar:1.19.4]
      	at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137) [jersey-server-1.19.4.jar:1.19.4]
      	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [jersey-server-1.19.4.jar:1.19.4]
      	at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137) [jersey-server-1.19.4.jar:1.19.4]
      	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [jersey-server-1.19.4.jar:1.19.4]
      	at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) [jersey-server-1.19.4.jar:1.19.4]
      	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [jersey-server-1.19.4.jar:1.19.4]
      	at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) [jersey-server-1.19.4.jar:1.19.4]
      	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542) [jersey-server-1.19.4.jar:1.19.4]
      	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473) [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-HF30.jar:?]
      	at org.nuxeo.ecm.webengine.app.jersey.WebEngineServlet.service(WebEngineServlet.java:56) [nuxeo-webengine-core-10.10-HF30.jar:?]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) [servlet-api-9.0.37.jar:4.0.FR]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat-websocket-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	at org.nuxeo.elasticsearch.ElasticSearchFilter.doFilter(ElasticSearchFilter.java:55) [nuxeo-elasticsearch-core-10.10-HF32.jar:?]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	at org.nuxeo.ecm.webengine.jaxrs.session.SessionCleanupFilter.run(SessionCleanupFilter.java:50) [nuxeo-webengine-jaxrs-10.10-HF08.jar:?]
      	at org.nuxeo.ecm.webengine.jaxrs.HttpFilter.doFilter(HttpFilter.java:49) [nuxeo-webengine-jaxrs-10.10-HF08.jar:?]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	at org.nuxeo.ecm.webengine.app.WebContextFilter.doFilter(WebContextFilter.java:56) [nuxeo-webengine-core-10.10-HF30.jar:?]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	at org.nuxeo.ecm.webengine.jaxrs.context.RequestContextFilter.run(RequestContextFilter.java:48) [nuxeo-webengine-jaxrs-10.10-HF08.jar:?]
      	at org.nuxeo.ecm.webengine.jaxrs.HttpFilter.doFilter(HttpFilter.java:49) [nuxeo-webengine-jaxrs-10.10-HF08.jar:?]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	at org.nuxeo.ecm.webengine.app.HeaderFixFilter.run(HeaderFixFilter.java:62) [nuxeo-webengine-core-10.10-HF30.jar:?]
      	at org.nuxeo.ecm.webengine.jaxrs.HttpFilter.doFilter(HttpFilter.java:49) [nuxeo-webengine-jaxrs-10.10-HF08.jar:?]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	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:193) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoRequestControllerFilter.doFilter(NuxeoRequestControllerFilter.java:134) [nuxeo-platform-web-common-10.10-HF27.jar:?]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilterInternal(NuxeoAuthenticationFilter.java:640) [nuxeo-platform-web-common-10.10-HF27.jar:?]
      	at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilter(NuxeoAuthenticationFilter.java:431) [nuxeo-platform-web-common-10.10-HF27.jar:?]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	at org.nuxeo.ecm.platform.web.common.exceptionhandling.NuxeoExceptionFilter.doFilter(NuxeoExceptionFilter.java:67) [nuxeo-platform-web-common-10.10-HF27.jar:?]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	at org.nuxeo.ecm.platform.web.common.encoding.NuxeoEncodingFilter.doFilter(NuxeoEncodingFilter.java:64) [nuxeo-platform-web-common-10.10-HF27.jar:?]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) [catalina-9.0.37.jar:9.0.37]
      	at org.nuxeo.ecm.restapi.server.APIServlet.service(APIServlet.java:50) [nuxeo-rest-api-server-10.10-HF32.jar:?]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) [servlet-api-9.0.37.jar:4.0.FR]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat-websocket-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	at org.nuxeo.elasticsearch.ElasticSearchFilter.doFilter(ElasticSearchFilter.java:55) [nuxeo-elasticsearch-core-10.10-HF32.jar:?]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoThreadTrackerFilter.doFilter(NuxeoThreadTrackerFilter.java:43) [nuxeo-platform-web-common-10.10-HF27.jar:?]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoStandbyFilter.doFilter(NuxeoStandbyFilter.java:67) [nuxeo-platform-web-common-10.10-HF27.jar:?]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	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:193) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	at org.nuxeo.ecm.platform.ui.web.rest.FancyURLFilter.doFilter(FancyURLFilter.java:120) [nuxeo-platform-ui-web-10.10-HF25.jar:?]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoRequestControllerFilter.doFilter(NuxeoRequestControllerFilter.java:134) [nuxeo-platform-web-common-10.10-HF27.jar:?]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	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-HF27.jar:?]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	at org.nuxeo.ecm.platform.web.common.exceptionhandling.NuxeoExceptionFilter.doFilter(NuxeoExceptionFilter.java:67) [nuxeo-platform-web-common-10.10-HF27.jar:?]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	at org.nuxeo.ecm.platform.web.common.encoding.NuxeoEncodingFilter.doFilter(NuxeoEncodingFilter.java:64) [nuxeo-platform-web-common-10.10-HF27.jar:?]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.valves.rewrite.RewriteValve.invoke(RewriteValve.java:555) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [catalina-9.0.37.jar:9.0.37]
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373) [tomcat-coyote-9.0.37.jar:9.0.37]
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-coyote-9.0.37.jar:9.0.37]
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-coyote-9.0.37.jar:9.0.37]
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589) [tomcat-coyote-9.0.37.jar:9.0.37]
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote-9.0.37.jar:9.0.37]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util-9.0.37.jar:9.0.37]
      	at java.lang.Thread.run(Thread.java:834) [?:?]
      

      Here is the diff to fix this:

      diff --git a/nuxeo-features/nuxeo-user-center/nuxeo-user-profile-jsf/src/main/java/org/nuxeo/ecm/user/center/profile/localeProvider/UserLocaleSelectorListener.java b/nuxeo-features/nuxeo-user-center/nuxeo-user-profile-jsf/src/main/java/org/nuxeo/ecm/user/center/profile/localeProvider/UserLocaleSelectorListener.java
      index 6a3e121bc7f..9777596e319 100644
      --- a/nuxeo-features/nuxeo-user-center/nuxeo-user-profile-jsf/src/main/java/org/nuxeo/ecm/user/center/profile/localeProvider/UserLocaleSelectorListener.java
      +++ b/nuxeo-features/nuxeo-user-center/nuxeo-user-profile-jsf/src/main/java/org/nuxeo/ecm/user/center/profile/localeProvider/UserLocaleSelectorListener.java
      @@ -40,6 +40,9 @@ public class UserLocaleSelectorListener implements EventListener {
       
           @Override
           public void handleEvent(Event event) {
      +        if (!(event.getContext() instanceof DocumentEventContext)) {
      +            return;
      +        }
               DocumentEventContext ctx = (DocumentEventContext) event.getContext();
               DocumentModel userProfileDocument = ctx.getSourceDocument();
       

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: