<div><div>Yes I have done that as described in the blog post: <a href="http://undertow.io/blog/2015/03/26/HTTP2-In-Wildfly.html" rel="noreferrer" target="_blank">http://undertow.io/blog/2015/03/26/HTTP2-In-Wildfly.html</a>.</div><div><br></div><div>The script shown in the post fails with output:</div></div><div><div><br></div><div><p style="color:rgb(49,49,49);word-spacing:1px;margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">{</span></p><p style="color:rgb(49,49,49);word-spacing:1px;margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    &quot;outcome&quot; =&gt; &quot;failed&quot;,</span></p><p style="color:rgb(49,49,49);word-spacing:1px;margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    &quot;failure-description&quot; =&gt; {</span></p><p style="color:rgb(49,49,49);word-spacing:1px;margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        &quot;WFLYCTL0080: Failed services&quot; =&gt; {&quot;jboss.undertow.listener.https&quot; =&gt; &quot;org.jboss.msc.service.StartException in service jboss.undertow.listener.https: Failed to start service</span></p><p style="color:rgb(49,49,49);word-spacing:1px;margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    Caused by: java.lang.IllegalStateException: WFLYUT0079: No SSL Context available from security realm. Either the realm is not configured for SSL, or the server has not been reloaded since the SSL config was added.&quot;},</span></p><p style="color:rgb(49,49,49);word-spacing:1px;margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        &quot;WFLYCTL0412: Required services that are not installed:&quot; =&gt; [&quot;jboss.undertow.listener.https&quot;],</span></p><p style="color:rgb(49,49,49);word-spacing:1px;margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        &quot;WFLYCTL0180: Services with missing/unavailable dependencies&quot; =&gt; undefined</span></p><p style="color:rgb(49,49,49);word-spacing:1px;margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    },</span></p><p style="color:rgb(49,49,49);word-spacing:1px;margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    &quot;rolled-back&quot; =&gt; true,</span></p><p style="color:rgb(49,49,49);word-spacing:1px;margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    &quot;response-headers&quot; =&gt; {&quot;process-state&quot; =&gt; &quot;reload-required&quot;}</span></p><p style="color:rgb(49,49,49);word-spacing:1px;margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">}</span></p><p style="color:rgb(49,49,49);word-spacing:1px;margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p></div><div><div class="gmail_quote"><div>On Mon, Apr 24, 2017 at 6:24 AM Stuart Douglas &lt;<a href="mailto:sdouglas@redhat.com" target="_blank">sdouglas@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ah, I just skim read your first email and did not realize you were<br>
talking about the OkHttp client, and not the native Undertow<br>
client/server. Even though Undertow has support for ALPN natively<br>
using other clients will require the jar.<br>
<br>
How have you attempted to add the jar to the boot class path? You<br>
probably want to add it to JAVA_OPTS in standalone.conf.<br>
<br>
Stuart<br>
<br>
On Sat, Apr 22, 2017 at 4:57 AM, Hanan Othman &lt;<a href="mailto:hothman@webalo.com" target="_blank">hothman@webalo.com</a>&gt; wrote:<br>
&gt; So what you mean is that I should be able to use OkHttp inside WildFly<br>
&gt; 10.1 without having to do any additional setup? Might there be a reason<br>
&gt; why this is not what I am seeing currently?<br>
&gt;<br>
&gt; On Fri, Apr 21, 2017 at 12:01 AM, Stuart Douglas &lt;<a href="mailto:sdouglas@redhat.com" target="_blank">sdouglas@redhat.com</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Apr 21, 2017 at 1:17 AM, Hanan Othman &lt;<a href="mailto:hothman@webalo.com" target="_blank">hothman@webalo.com</a>&gt; wrote:<br>
&gt;&gt; &gt; Yes, I am. The same jar works outside of WildFly.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Can you tell me about the other solution that WildFly 10.1 uses?<br>
&gt;&gt;<br>
&gt;&gt; It uses a different approach that does not require replacing the boot<br>
&gt;&gt; class path jars. It should just work out of the box on any Oracle or<br>
&gt;&gt; OpenJDK JVM.<br>
&gt;&gt;<br>
&gt;&gt; Stuart<br>
&gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Thu, Apr 20, 2017 at 4:42 PM, Tomaž Cerar &lt;<a href="mailto:tomaz.cerar@gmail.com" target="_blank">tomaz.cerar@gmail.com</a>&gt;<br>
&gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Hey,<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; are you using proper version of apln-boot jar that applies to your<br>
&gt;&gt; &gt;&gt; exact<br>
&gt;&gt; &gt;&gt; version of jdk?<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Since 10.1, WildFly itself doesn&#39;t use the apln-boot hack anymore<br>
&gt;&gt; &gt;&gt; since,<br>
&gt;&gt; &gt;&gt; but uses different solution in undertow that doesn&#39;t require patching<br>
&gt;&gt; &gt;&gt; jdk<br>
&gt;&gt; &gt;&gt; classes.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; tomaz<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; On Thu, Apr 20, 2017 at 3:58 PM, Hanan Othman &lt;<a href="mailto:hothman@webalo.com" target="_blank">hothman@webalo.com</a>&gt;<br>
&gt;&gt; &gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Hello undertow-dev,<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; I&#39;m trying to use WildFly to send a push notification to iOS devices,<br>
&gt;&gt; &gt;&gt;&gt; which requires the use of HTTP/2. Using OkHttp<br>
&gt;&gt; &gt;&gt;&gt; (<a href="http://square.github.io/okhttp/" rel="noreferrer" target="_blank">http://square.github.io/okhttp/</a>), I was able to send a request<br>
&gt;&gt; &gt;&gt;&gt; successfully<br>
&gt;&gt; &gt;&gt;&gt; in an external java project using the JVM option:<br>
&gt;&gt; &gt;&gt;&gt; -Xbootclasspath/p:&lt;path-to-alpn-boot-jar&gt;.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; After checking the documentation here:<br>
&gt;&gt; &gt;&gt;&gt; <a href="http://undertow.io/blog/2015/03/26/HTTP2-In-Wildfly.html" rel="noreferrer" target="_blank">http://undertow.io/blog/2015/03/26/HTTP2-In-Wildfly.html</a>, I was unable<br>
&gt;&gt; &gt;&gt;&gt; to do<br>
&gt;&gt; &gt;&gt;&gt; the same in WildFly. When I run the server I get:<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; okhttp3.OkHttpClient  -- ALPN callback dropped: SPDY and HTTP/2 are<br>
&gt;&gt; &gt;&gt;&gt; disabled. Is alpn-boot on the boot class path?<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; which leads me to think that it is not actually on the classpath. I<br>
&gt;&gt; &gt;&gt;&gt; have<br>
&gt;&gt; &gt;&gt;&gt; the same configuration as that in the blog post, except having Wildfly<br>
&gt;&gt; &gt;&gt;&gt; 10.0.1.Final instead of Wildfly 9.0.0.Beta1. I have the correct<br>
&gt;&gt; &gt;&gt;&gt; alpn-boot<br>
&gt;&gt; &gt;&gt;&gt; jar version since it already works outside of WildFly, but I do not<br>
&gt;&gt; &gt;&gt;&gt; know<br>
&gt;&gt; &gt;&gt;&gt; what else I could be missing. Thank you very much for your time.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Best,<br>
&gt;&gt; &gt;&gt;&gt; Hanan<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt;&gt; undertow-dev mailing list<br>
&gt;&gt; &gt;&gt;&gt; <a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.jboss.org</a><br>
&gt;&gt; &gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; undertow-dev mailing list<br>
&gt;&gt; &gt; <a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.jboss.org</a><br>
&gt;&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a><br>
&gt;<br>
&gt;<br>
</blockquote></div></div></div>