IllegalStateException No Server ALPNProcessors!
-
I recently received an email with an exception like,
WARN 2018-10-17T09:58:38,483 (com.serotonin.m2m2.Lifecycle.webServerInitialize:940) - ALPN is enabled in env.properties but couldn't be loaded java.lang.IllegalStateException: No Server ALPNProcessors! at org.eclipse.jetty.alpn.server.ALPNServerConnectionFactory.<init>(ALPNServerConnectionFactory.java:53) ~[jetty-alpn-server-9.4.11.v20180605.jar:9.4.11.v20180605] at com.serotonin.m2m2.Lifecycle.webServerInitialize(Lifecycle.java:938) ~[ma-priv-3.5.2.jar:?] at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:234) ~[ma-priv-3.5.2.jar:?] at com.serotonin.m2m2.Main.main(Main.java:138) ~[ma-priv-3.5.2.jar:?] Suppressed: java.lang.UnsupportedClassVersionError: org/eclipse/jetty/alpn/java/server/JDK9ServerALPNProcessor has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_162] at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_162] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_162] at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) ~[?:1.8.0_162] at java.net.URLClassLoader.access$100(URLClassLoader.java:73) ~[?:1.8.0_162] at java.net.URLClassLoader$1.run(URLClassLoader.java:368) ~[?:1.8.0_162] at java.net.URLClassLoader$1.run(URLClassLoader.java:362) ~[?:1.8.0_162] at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_162] at java.net.URLClassLoader.findClass(URLClassLoader.java:361) ~[?:1.8.0_162] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_162] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338) ~[?:1.8.0_162] at java.lang.ClassLoader.loadClass(ClassLoader.java:411) ~[?:1.8.0_162] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_162] at java.lang.Class.forName0(Native Method) ~[?:1.8.0_162] at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_162] at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:370) ~[?:1.8.0_162] at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) ~[?:1.8.0_162] at java.util.ServiceLoader$1.next(ServiceLoader.java:480) ~[?:1.8.0_162] at org.eclipse.jetty.alpn.server.ALPNServerConnectionFactory.<init>(ALPNServerConnectionFactory.java:60) ~[jetty-alpn-server-9.4.11.v20180605.jar:9.4.11.v20180605] at com.serotonin.m2m2.Lifecycle.webServerInitialize(Lifecycle.java:938) ~[ma-priv-3.5.2.jar:?] at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:234) ~[ma-priv-3.5.2.jar:?] at com.serotonin.m2m2.Main.main(Main.java:138) ~[ma-priv-3.5.2.jar:?] Suppressed: java.lang.IllegalStateException: org.eclipse.jetty.alpn.ALPN must be on JVM boot classpath at org.eclipse.jetty.alpn.openjdk8.server.OpenJDK8ServerALPNProcessor.init(OpenJDK8ServerALPNProcessor.java:45) ~[jetty-alpn-openjdk8-server-9.4.11.v20180605.jar:9.4.11.v20180605] at org.eclipse.jetty.alpn.server.ALPNServerConnectionFactory.<init>(ALPNServerConnectionFactory.java:72) ~[jetty-alpn-server-9.4.11.v20180605.jar:9.4.11.v20180605] at com.serotonin.m2m2.Lifecycle.webServerInitialize(Lifecycle.java:938) ~[ma-priv-3.5.2.jar:?] at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:234) ~[ma-priv-3.5.2.jar:?] at com.serotonin.m2m2.Main.main(Main.java:138) ~[ma-priv-3.5.2.jar:?]
which is caused if you have ALPN and SSL enabled, but haven't moved the appropriate Mango/bin/ext-available/enable-alpn script into Mango/bin/ext-enabled/ to specify the Mango/boot/jetty-alpn-agent.jar as a java agent.