Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1436144

Summary: ALPN boot JAR not reflected when adding to bootclasspath on EAP 6.4
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: matzew
Component: OtherAssignee: jboss-set
Status: CLOSED NOTABUG QA Contact: Pavel Slavicek <pslavice>
Severity: unspecified Docs Contact: eap-docs <eap-docs>
Priority: unspecified    
Version: 6.4.11CC: jason.greene
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-28 00:58:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description matzew 2017-03-27 09:52:23 UTC
Description of problem:

I have a problem when putting the "alpn-boot.jar" to the -Xbootclasspath, it is not working, when running EAP 6.4.11 on OpenJDK7 (131).




Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
I have a github project, that shows the problem, when running EAP on OpenJDK7 (locally I have 131)


https://github.com/matzew/alpn-bootclass-issue

The readme contains instructions

Actual results:

Stack trace that ALPN is not visible from the WAR file:


11:24:56,926 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/http2-apns].[net.wessendorf.wf.apns.RestApp]] (http-127.0.0.1:8080-1) JBWEB000236: Servlet.service() for servlet net.wessendorf.wf.apns.RestApp threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.NoClassDefFoundError: org/eclipse/jetty/alpn/ALPN$Provider
	at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:366) [resteasy-jaxrs-2.3.15.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:237) [resteasy-jaxrs-2.3.15.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:213) [resteasy-jaxrs-2.3.15.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:575) [resteasy-jaxrs-2.3.15.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:542) [resteasy-jaxrs-2.3.15.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:130) [resteasy-jaxrs-2.3.15.Final-redhat-1.jar:]
	at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.15.Final-redhat-1.jar:]
	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.15.Final-redhat-1.jar:]
	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.15.Final-redhat-1.jar:]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.19.Final-redhat-1.jar:7.5.19.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.19.Final-redhat-1.jar:7.5.19.Final-redhat-1]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.19.Final-redhat-1.jar:7.5.19.Final-redhat-1]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.19.Final-redhat-1.jar:7.5.19.Final-redhat-1]
	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.19.Final-redhat-1.jar:7.5.19.Final-redhat-1]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.19.Final-redhat-1.jar:7.5.19.Final-redhat-1]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.19.Final-redhat-1.jar:7.5.19.Final-redhat-1]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.19.Final-redhat-1.jar:7.5.19.Final-redhat-1]
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.19.Final-redhat-1.jar:7.5.19.Final-redhat-1]
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:656) [jbossweb-7.5.19.Final-redhat-1.jar:7.5.19.Final-redhat-1]
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.19.Final-redhat-1.jar:7.5.19.Final-redhat-1]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_131]
Caused by: java.lang.NoClassDefFoundError: org/eclipse/jetty/alpn/ALPN$Provider
	at io.netty.handler.ssl.JdkAlpnApplicationProtocolNegotiator$1.<init>(JdkAlpnApplicationProtocolNegotiator.java:26) [netty-handler-4.1.6.Final.jar:4.1.6.Final]
	at io.netty.handler.ssl.JdkAlpnApplicationProtocolNegotiator.<clinit>(JdkAlpnApplicationProtocolNegotiator.java:24) [netty-handler-4.1.6.Final.jar:4.1.6.Final]
	at io.netty.handler.ssl.JdkSslContext.toNegotiator(JdkSslContext.java:283) [netty-handler-4.1.6.Final.jar:4.1.6.Final]
	at io.netty.handler.ssl.JdkSslClientContext.<init>(JdkSslClientContext.java:261) [netty-handler-4.1.6.Final.jar:4.1.6.Final]
	at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:751) [netty-handler-4.1.6.Final.jar:4.1.6.Final]
	at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:406) [netty-handler-4.1.6.Final.jar:4.1.6.Final]
	at com.relayrides.pushy.apns.ApnsClientBuilder.build(ApnsClientBuilder.java:430) [pushy-0.9.2.jar:]
	at net.wessendorf.wf.apns.ApnsSender.<init>(ApnsSender.java:39) [classes:]
	at net.wessendorf.wf.apns.Endpoint.get(Endpoint.java:12) [classes:]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_131]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_131]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_131]
	at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_131]
	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:168) [resteasy-jaxrs-2.3.15.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269) [resteasy-jaxrs-2.3.15.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227) [resteasy-jaxrs-2.3.15.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216) [resteasy-jaxrs-2.3.15.Final-redhat-1.jar:]
	at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:560) [resteasy-jaxrs-2.3.15.Final-redhat-1.jar:]
	... 19 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.alpn.ALPN$Provider from [Module "deployment.http2-apns.war:main" from Service Module Loader]
	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.7.Final-redhat-1]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.7.Final-redhat-1]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.7.Final-redhat-1]
	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.7.Final-redhat-1]
	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.7.Final-redhat-1]
	... 37 more



Expected results:

It worked, and I am able to connect to an HTTP/2 endpoint from my Java EE War file


Additional info:


Deploying the same on WF 10.1 works out of the box, even w/o no need for the bootclasspath.

Comment 1 matzew 2017-03-27 16:00:11 UTC
Looks like using jboss deployment structure XML file does the trick, since my webapp is using "netty-tcnative-boringssl-static"


So, I have to exclude tomcat classes, as discussed here:
http://stuff4j.blogspot.de/2016/07/using-apple-push-notification.html