How to use ALPN with OpenJDK 8u252

206 views
Skip to first unread message

Tim Fox

unread,
Jul 9, 2020, 5:38:27 AM7/9/20
to Netty discussions
Hi All,

I am trying to use ALPN in Netty with OpenJDK 8u252. Apparently this version of openJDK has backported the Java 9 ALPN APIs so the Jetty ALPN stuff shouldn't be necessary.

According to https://github.com/jetty-project/jetty-alpn-agent

"Starting with OpenJDK 1.8.0_252 the use of jetty-alpn-agent is not strictly required anymore since the standard ALPN APIs have been backported to OpenJDK 1.8.0_252 from Java 9"

However, when I try and start a Netty based server using OpenJDK 8u252 I get the following exception:

java.lang.NoClassDefFoundError: org/eclipse/jetty/alpn/ALPN$Provider
at io.netty.handler.ssl.JettyAlpnSslEngine.newServerEngine(JettyAlpnSslEngine.java:60)
at io.netty.handler.ssl.JdkAlpnApplicationProtocolNegotiator$AlpnWrapper.wrapSslEngine(JdkAlpnApplicationProtocolNegotiator.java:141)
at io.netty.handler.ssl.JdkSslContext.configureAndWrapEngine(JdkSslContext.java:360)
at io.netty.handler.ssl.JdkSslContext.newEngine(JdkSslContext.java:330)

I.e. the Netty code still seems to want to use the Jetty stuff. Any thoughts on how I configure Netty correctly so it doesn't look for the Jetty ALPN stuff when I know I'm using OpenJDK 8u252?



So I guess this must be possible somehow.

Norman Maurer

unread,
Jul 9, 2020, 5:45:15 AM7/9/20
to ne...@googlegroups.com
I am pretty sure the version of netty you are using is not up to date. This was “fixed” in 4.1.49.Final:


Bye
Norman


--
You received this message because you are subscribed to the Google Groups "Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netty+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netty/0c7e73c4-d7cf-40f0-98d6-d3da3b70e020n%40googlegroups.com.

Raja Ngenet

unread,
Mar 6, 2024, 2:27:23 AMMar 6
to Netty discussions
Reply all
Reply to author
Forward
0 new messages