Skip to content

Frequently asked questions

Jon Chambers edited this page Jun 5, 2016 · 13 revisions

I'm trying to use Jetty's alpn-boot package, but am seeing a message about "ALPN unsupported." What's wrong?

If alpn-boot isn't set up correctly, you'll probably see an ExceptionInInitializerError that's ultimately caused by something like this:

Caused by: java.lang.RuntimeException: ALPN unsupported. Is your classpatch configured correctly? See http://www.eclipse.org/jetty/documentation/current/alpn-chapter.html#alpn-starting


Usually, this means that `alpn-boot` isn't on your *boot* classpath, which is distinct from your normal classpath. Make sure that you're passing an appropriate `-Xbootclasspath` argument to the JVM that's running your application. Some common pitfalls:

- The profiles from Pushy's own `pom.xml` serve as good examples, but it's important to remember that the only thing they do is set a variable that we ultimately use to set the boot classpath for our unit tests. Copying the profiles into your own project isn't enough; you'll need to make sure that you're actually setting the boot class path when you run your application.
- If your application is running in a container of some kind (Tomcat, for example), you'll need to make sure that the container itself has an appropriate version of `alpn-boot` on its classpath.

### My connections are failing with a `handshake_failure`. What's the problem?

This may mean that your JDK doesn't have the ciphers required by HTTP/2. To the best of our knowledge, only Oracle JDK 8 ships with the requisite ciphers. If you're using something else, you may need to use an alternate JCE provider (like [Bouncy Castle](https://www.bouncycastle.org/)) or a native SSL provider via [`netty-tcnative`](https://github.com/netty/netty-tcnative) (which we recommend as a first choice anyway).