10.8.1 - exception when saving page using Firefox 62.0.3

I am testing XWiki 10.8.1. Whenever I try to edit and save a page using Firefox 62.0.3 (either edit existing page or enter something into a new blank page and save), I get the following exception:

HTTP Status 500 – Internal Server Error

Type Exception Report

Message Failed to load component for type [interface org.xwiki.wysiwyg.filter.MutableServletRequestFactory] for hint [HTTP/2.0]

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

java.lang.RuntimeException: Failed to load component for type [interface org.xwiki.wysiwyg.filter.MutableServletRequestFactory] for hint [HTTP/2.0]
	com.xpn.xwiki.web.Utils.getComponent(Utils.java:755)
	org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:93)
	org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
	org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
	org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
	org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:134)

Root Cause

org.xwiki.component.manager.ComponentLookupException: Can't find descriptor for the component with type [interface org.xwiki.wysiwyg.filter.MutableServletRequestFactory] and hint [HTTP/2.0]
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:207)
	org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83)
	com.xpn.xwiki.web.Utils.getComponent(Utils.java:753)
	org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:93)
	org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
	org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
	org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
	org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:134)

Note The full stack trace of the root cause is available in the server logs.

The Tomcat localhost log file contains the following:

22-Oct-2018 12:46:50.000 SEVERE [https-openssl-apr-443-exec-6] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [action] in context with path [/xwiki] threw exception
 java.lang.RuntimeException: Failed to load component for type [interface org.xwiki.wysiwyg.filter.MutableServletRequestFactory] for hint [HTTP/2.0]
	at com.xpn.xwiki.web.Utils.getComponent(Utils.java:755)
	at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:93)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:134)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:607)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	at org.apache.coyote.http2.StreamProcessor.service(StreamProcessor.java:337)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.http2.StreamProcessor.process(StreamProcessor.java:72)
	at org.apache.coyote.http2.StreamRunnable.run(StreamRunnable.java:35)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Unknown Source)
Caused by: org.xwiki.component.manager.ComponentLookupException: Can't find descriptor for the component with type [interface org.xwiki.wysiwyg.filter.MutableServletRequestFactory] and hint [HTTP/2.0]
	at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:207)
	at org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83)
	at com.xpn.xwiki.web.Utils.getComponent(Utils.java:753)
	... 31 more

Internet Explorer 11, Chrome 70.0.3538.67, and Edge (I tested 41.16299.726.0) do not exhibit this behavior.

This only happens in Firefox.

Please advise.

Thanks

Bill

I updated the server JVM to 1.8.0_192 and Firefox to 63.0 but the same problem still occurs. Application server is Tomcat 9.0.12 (Windows x64).

AFAIK there’s no HTTP/2.0 implementation for MutableServletRequestFactory… I can see only HTTP/1.0 and HTTP/2.0.

Did you configure HTTP/2.0 somewhere?

thanks

ok I’ve checked the code and we have:

            MutableServletRequestFactory mreqFactory =
                Utils.getComponent((Type) MutableServletRequestFactory.class, req.getProtocol());

This means that this code is fragile ATM and works only if the request is a HTTP/1.0 or 1.1 request, i.e. XWiki doesn’t work with HTTP/2.0 which is a pity, we can fix this quickly though.

Would you mind creating a jira issue for this at https://jira.xwiki.org?

Thanks

Vincent thank you, you are correct.

Firefox has http2 enabled by default. I changed Firefox preference network.http.spdy.enabled.http2 to false and restarted the browser, and it no longer throws the exception.

I will create JIRA issue but not sure how to word it? Perhaps “Support HTTP/2.0”?

yep, sounds good, or rather “XWiki fails when HTTP/2.0 is used” since it’s a bug.

Thanks

Thank you Vincent!

Issue created in JIRA - Loading...

Confirmed, fixed in 10.9.

Thank you Vincent!

Thanks for confirming.