Closed rymsha closed 4 years ago
2020-06-11 09:21:15,791 ERROR c.e.x.p.i.e.ExceptionRendererImpl - mimeType cannot be null
com.enonic.xp.web.WebException: mimeType cannot be null
at com.enonic.xp.web.impl.exception.ExceptionMapperImpl.map(ExceptionMapperImpl.java:33)
at com.enonic.xp.portal.handler.BasePortalHandler.handleError(BasePortalHandler.java:60)
at com.enonic.xp.portal.handler.BasePortalHandler.doHandle(BasePortalHandler.java:52)
at com.enonic.xp.web.handler.BaseWebHandler.handle(BaseWebHandler.java:66)
at com.enonic.xp.web.impl.handler.WebHandlerChainImpl.handle(WebHandlerChainImpl.java:30)
at com.enonic.xp.web.impl.trace.TraceWebFilter.doHandle(TraceWebFilter.java:38)
at com.enonic.xp.web.handler.BaseWebHandler.handle(BaseWebHandler.java:66)
at com.enonic.xp.web.impl.handler.WebHandlerChainImpl.handle(WebHandlerChainImpl.java:30)
at com.enonic.xp.web.impl.handler.WebDispatcherImpl.dispatch(WebDispatcherImpl.java:44)
at com.enonic.xp.web.impl.handler.WebDispatcherServlet.doHandle(WebDispatcherServlet.java:142)
at com.enonic.xp.web.impl.handler.WebDispatcherServlet.service(WebDispatcherServlet.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at com.enonic.xp.web.impl.dispatch.mapping.ServletDefinitionImpl.service(ServletDefinitionImpl.java:40)
at com.enonic.xp.web.impl.dispatch.pipeline.ServletPipelineImpl.service(ServletPipelineImpl.java:40)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:45)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:36)
at com.enonic.xp.portal.impl.idprovider.IdProviderFilter.doHandle(IdProviderFilter.java:45)
at com.enonic.xp.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:31)
at com.enonic.xp.web.filter.BaseWebFilter.doFilter(BaseWebFilter.java:33)
at com.enonic.xp.web.impl.dispatch.mapping.FilterDefinitionImpl.doFilter(FilterDefinitionImpl.java:41)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:50)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:36)
at com.enonic.xp.web.impl.auth.BasicAuthFilter.doHandle(BasicAuthFilter.java:34)
at com.enonic.xp.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:31)
at com.enonic.xp.web.filter.BaseWebFilter.doFilter(BaseWebFilter.java:33)
at com.enonic.xp.web.impl.dispatch.mapping.FilterDefinitionImpl.doFilter(FilterDefinitionImpl.java:41)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:50)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:36)
at com.enonic.xp.web.impl.context.ContextFilter.lambda$doHandle$0(ContextFilter.java:33)
at com.enonic.xp.context.ContextImpl.callWith(ContextImpl.java:102)
at com.enonic.xp.web.impl.context.ContextFilter.doHandle(ContextFilter.java:32)
at com.enonic.xp.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:31)
at com.enonic.xp.web.filter.BaseWebFilter.doFilter(BaseWebFilter.java:33)
at com.enonic.xp.web.impl.dispatch.mapping.FilterDefinitionImpl.doFilter(FilterDefinitionImpl.java:41)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:50)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:36)
at com.enonic.xp.web.vhost.impl.VirtualHostFilter.doHandle(VirtualHostFilter.java:60)
at com.enonic.xp.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:31)
at com.enonic.xp.web.filter.BaseWebFilter.doFilter(BaseWebFilter.java:33)
at com.enonic.xp.web.impl.dispatch.mapping.FilterDefinitionImpl.doFilter(FilterDefinitionImpl.java:41)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:50)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:36)
at com.enonic.xp.web.impl.dos.DosFilterWrapper.doFilter(DosFilterWrapper.java:65)
at com.enonic.xp.web.impl.dispatch.mapping.FilterDefinitionImpl.doFilter(FilterDefinitionImpl.java:41)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:50)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:36)
at org.eclipse.jetty.servlets.HeaderFilter.doFilter(HeaderFilter.java:117)
at com.enonic.xp.web.impl.header.HeaderFilterWrapper.doHandle(HeaderFilterWrapper.java:51)
at com.enonic.xp.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:31)
at com.enonic.xp.web.filter.BaseWebFilter.doFilter(BaseWebFilter.java:33)
at com.enonic.xp.web.impl.dispatch.mapping.FilterDefinitionImpl.doFilter(FilterDefinitionImpl.java:41)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:50)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:36)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterPipelineImpl.filter(FilterPipelineImpl.java:39)
at com.enonic.xp.web.impl.dispatch.DispatchServletImpl.service(DispatchServletImpl.java:52)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:551)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:767)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1363)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:489)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1278)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:249)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:500)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.enonic.xp.resource.ResourceProblemException: mimeType cannot be null
at com.enonic.xp.resource.ResourceProblemException$Builder.build(ResourceProblemException.java:131)
at com.enonic.xp.script.impl.util.ErrorHelper.doHandleException(ErrorHelper.java:54)
at com.enonic.xp.script.impl.util.ErrorHelper.handleError(ErrorHelper.java:27)
at com.enonic.xp.script.impl.value.FunctionScriptValue.call(FunctionScriptValue.java:41)
at com.enonic.xp.script.impl.executor.ScriptExportsImpl.executeMethod(ScriptExportsImpl.java:59)
at com.enonic.xp.portal.impl.controller.ControllerScriptImpl.doExecute(ControllerScriptImpl.java:71)
at com.enonic.xp.portal.impl.controller.ControllerScriptImpl.lambda$execute$0(ControllerScriptImpl.java:36)
at com.enonic.xp.trace.Tracer.traceEx(Tracer.java:72)
at com.enonic.xp.trace.Tracer.trace(Tracer.java:51)
at com.enonic.xp.trace.Tracer.trace(Tracer.java:98)
at com.enonic.xp.portal.impl.controller.ControllerScriptImpl.execute(ControllerScriptImpl.java:36)
at com.enonic.xp.portal.impl.rendering.ControllerMappingRenderer.doRender(ControllerMappingRenderer.java:27)
at com.enonic.xp.portal.impl.rendering.ControllerMappingRenderer.doRender(ControllerMappingRenderer.java:14)
at com.enonic.xp.portal.impl.rendering.PostProcessingRenderer.render(PostProcessingRenderer.java:25)
at com.enonic.xp.portal.impl.rendering.RendererDelegateImpl.lambda$render$1(RendererDelegateImpl.java:40)
at java.base/java.util.Optional.map(Optional.java:265)
at com.enonic.xp.portal.impl.rendering.RendererDelegateImpl.render(RendererDelegateImpl.java:40)
at com.enonic.xp.portal.impl.handler.mapping.MappingHandlerWorker.renderController(MappingHandlerWorker.java:69)
at com.enonic.xp.portal.impl.handler.mapping.MappingHandlerWorker.execute(MappingHandlerWorker.java:53)
at com.enonic.xp.portal.impl.handler.mapping.MappingHandler.handleController(MappingHandler.java:95)
at com.enonic.xp.portal.impl.handler.mapping.MappingHandler.doHandle(MappingHandler.java:69)
at com.enonic.xp.portal.impl.handler.mapping.MappingHandler.doHandle(MappingHandler.java:24)
at com.enonic.xp.web.handler.BaseWebHandler.handle(BaseWebHandler.java:66)
at com.enonic.xp.web.impl.handler.WebHandlerChainImpl.handle(WebHandlerChainImpl.java:30)
at com.enonic.xp.web.handler.BaseWebHandler.handle(BaseWebHandler.java:75)
at com.enonic.xp.web.impl.handler.WebHandlerChainImpl.handle(WebHandlerChainImpl.java:30)
at com.enonic.xp.web.handler.BaseWebHandler.handle(BaseWebHandler.java:75)
at com.enonic.xp.web.impl.handler.WebHandlerChainImpl.handle(WebHandlerChainImpl.java:30)
at com.enonic.xp.web.handler.BaseWebHandler.handle(BaseWebHandler.java:75)
at com.enonic.xp.web.impl.handler.WebHandlerChainImpl.handle(WebHandlerChainImpl.java:30)
at com.enonic.xp.portal.handler.BasePortalHandler.doHandle(BasePortalHandler.java:46)
... 88 common frames omitted
Caused by: java.lang.NullPointerException: mimeType cannot be null
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:895)
at com.enonic.xp.image.ReadImageParams$Builder.build(ReadImageParams.java:256)
at com.enonic.app.officeleague.image.ImageHandler.getImageParams(ImageHandler.java:121)
at com.enonic.app.officeleague.image.ImageHandler.process(ImageHandler.java:54)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$2330$1419A$image.L:1#processImage(com.enonic.app.officeleague:/lib/image.js:30)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$2329$465$image_helper.L:1#processImage#L:16(com.enonic.app.officeleague:/site/controllers/image-helper.js:19)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:655)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527)
at jdk.nashorn.javaadapters.java_util_concurrent_Callable.call(Unknown Source)
at com.enonic.xp.context.ContextImpl.callWith(ContextImpl.java:102)
at com.enonic.xp.lib.context.ContextHandlerBean.run(ContextHandlerBean.java:36)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$2149$1216AA$context.L:1#run(com.enonic.app.officeleague:/lib/xp/context.js:56)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$2326$204AAA$image_helper.L:1#processImage(com.enonic.app.officeleague:/site/controllers/image-helper.js:12)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$2320$1001AAAAAA$attachment.L:1#serveAttachment(com.enonic.app.officeleague:/lib/attachment.js:54)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$2310$458A$player_image.L:1#get(com.enonic.app.officeleague:/site/controllers/player-image.js:24)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:657)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.ScriptObjectMirror.call(ScriptObjectMirror.java:120)
at com.enonic.xp.script.impl.value.FunctionScriptValue.call(FunctionScriptValue.java:36)
... 115 common frames omitted
8005 made mimeType required value in
ReadImageParams
in 7.3It is broke office league image rendering. Instead mime type should be optional and fallback to format parameter (it is a very small subset of formats supported)