java.lang.IncompatibleClassChangeError and javax.net.ssl.SSLException errors
ShawnClake opened this issue · 11 comments
I receive this error when trying to launch a Minecraft server with this plugin
[20:39:28] [DiscordSRV - Initialization/INFO]: [DiscordSRV] DiscordSRV is up-to-date. (06b77741bbc622d715d3ee44158b0e2516453dac)
[20:39:28] [DiscordSRV - Initialization/INFO]: [DiscordSRV] Language initialized as English
[20:39:28] [DiscordSRV - Initialization/INFO]: [DiscordSRV] §8===============================================================================
[20:39:28] [DiscordSRV - Initialization/INFO]: [DiscordSRV] §a Need a server host? Try PebbleHost! Plans starting at $1/GB!
[20:39:28] [DiscordSRV - Initialization/INFO]: [DiscordSRV] §a Use promo code "DISCORDSRV" at checkout for 15% off your first three bills!
[20:39:28] [DiscordSRV - Initialization/INFO]: [DiscordSRV] §8===============================================================================
[20:39:28] [DiscordSRV - Initialization/WARN]: java.lang.IncompatibleClassChangeError: Inconsistent constant pool data in classfile for class github/scarsz/discordsrv/dependencies/okhttp3/Authenticator. Method lambda$static$0(Lgithub/scarsz/discordsrv/dependencies/okhttp3/Route;Lgithub/scarsz/discordsrv/dependencies/okhttp3/Response;)Lgithub/scarsz/discordsrv/dependencies/okhttp3/Request; at index 35 is CONSTANT_MethodRef and should be CONSTANT_InterfaceMethodRef
[20:39:28] [DiscordSRV - Initialization/WARN]: at github.scarsz.discordsrv.dependencies.okhttp3.Authenticator.<clinit>(Authenticator.java:100)
[20:39:28] [DiscordSRV - Initialization/WARN]: at github.scarsz.discordsrv.dependencies.okhttp3.OkHttpClient$Builder.<init>(OkHttpClient.java:493)
[20:39:28] [DiscordSRV - Initialization/WARN]: at github.scarsz.discordsrv.dependencies.jda.core.JDABuilder.build(JDABuilder.java:881)
[20:39:28] [DiscordSRV - Initialization/WARN]: at github.scarsz.discordsrv.DiscordSRV.init(DiscordSRV.java:311)
[20:39:28] [DiscordSRV - Initialization/WARN]: at java.base/java.lang.Thread.run(Thread.java:834)
[20:39:28] [DiscordSRV - Initialization/WARN]: com.github.kevinsawicki.http.HttpRequest$HttpRequestException: javax.net.ssl.SSLException: Received fatal alert: record_overflow
[20:39:28] [DiscordSRV - Initialization/WARN]: at com.github.kevinsawicki.http.HttpRequest.code(HttpRequest.java:1562)
[20:39:28] [DiscordSRV - Initialization/WARN]: at github.scarsz.discordsrv.util.DebugUtil.uploadToBin(DebugUtil.java:268)
[20:39:28] [DiscordSRV - Initialization/WARN]: at github.scarsz.discordsrv.util.DebugUtil.uploadReport(DebugUtil.java:238)
[20:39:28] [DiscordSRV - Initialization/WARN]: at github.scarsz.discordsrv.util.DebugUtil.run(DebugUtil.java:106)
[20:39:28] [DiscordSRV - Initialization/WARN]: at github.scarsz.discordsrv.DiscordSRV.lambda$onEnable$2(DiscordSRV.java:187)
[20:39:28] [DiscordSRV - Initialization/WARN]: at java.base/java.lang.Thread.dispatchUncaughtException(Thread.java:2001)
[20:39:28] [DiscordSRV - Initialization/WARN]: Caused by: javax.net.ssl.SSLException: Received fatal alert: record_overflow
[20:39:28] [DiscordSRV - Initialization/WARN]: at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:129)
[20:39:28] [DiscordSRV - Initialization/WARN]: at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
[20:39:28] [DiscordSRV - Initialization/WARN]: at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
[20:39:28] [DiscordSRV - Initialization/WARN]: at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:279)
[20:39:28] [DiscordSRV - Initialization/WARN]: at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:181)
[20:39:28] [DiscordSRV - Initialization/WARN]: at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
[20:39:28] [DiscordSRV - Initialization/WARN]: at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1155)
[20:39:28] [DiscordSRV - Initialization/WARN]: at java.base/sun.security.ssl.SSLSocketImpl.readApplicationRecord(SSLSocketImpl.java:1125)
[20:39:28] [DiscordSRV - Initialization/WARN]: at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:823)
[20:39:28] [DiscordSRV - Initialization/WARN]: at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
[20:39:28] [DiscordSRV - Initialization/WARN]: at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:292)
[20:39:28] [DiscordSRV - Initialization/WARN]: at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
[20:39:28] [DiscordSRV - Initialization/WARN]: at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:746)
[20:39:28] [DiscordSRV - Initialization/WARN]: at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:689)
[20:39:28] [DiscordSRV - Initialization/WARN]: at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:717)
[20:39:28] [DiscordSRV - Initialization/WARN]: at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1604)
[20:39:28] [DiscordSRV - Initialization/WARN]: at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
[20:39:28] [DiscordSRV - Initialization/WARN]: at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
[20:39:28] [DiscordSRV - Initialization/WARN]: at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:329)
[20:39:28] [DiscordSRV - Initialization/WARN]: at com.github.kevinsawicki.http.HttpRequest.code(HttpRequest.java:1560)
[20:39:28] [DiscordSRV - Initialization/WARN]: ... 5 more
[20:39:28] [DiscordSRV - Initialization/ERROR]: [DiscordSRV] DiscordSRV failed to load properly: Inconsistent constant pool data in classfile for class github/scarsz/discordsrv/dependencies/okhttp3/Authenticator. Method lambda$static$0(Lgithub/scarsz/discordsrv/dependencies/okhttp3/Route;Lgithub/scarsz/discordsrv/dependencies/okhttp3/Response;)Lgithub/scarsz/discordsrv/dependencies/okhttp3/Request; at index 35 is CONSTANT_MethodRef and should be CONSTANT_InterfaceMethodRef. See ERROR/Failed to send debug report: javax.net.ssl.SSLException: Received fatal alert: record_overflow for more information.
That workaround worked for the SSL error, but I'm still receiving the java.lang.IncompatibleClassChangeError error. New output:
[20:49:01] [DiscordSRV - Initialization/INFO]: [DiscordSRV] DiscordSRV is up-to-date. (06b77741bbc622d715d3ee44158b0e2516453dac)
[20:49:01] [DiscordSRV - Initialization/INFO]: [DiscordSRV] Language initialized as English
[20:49:01] [DiscordSRV - Initialization/INFO]: [DiscordSRV] §8===============================================================================
[20:49:01] [DiscordSRV - Initialization/INFO]: [DiscordSRV] §a Need a server host? Try PebbleHost! Plans starting at $1/GB!
[20:49:01] [DiscordSRV - Initialization/INFO]: [DiscordSRV] §a Use promo code "DISCORDSRV" at checkout for 15% off your first three bills!
[20:49:01] [DiscordSRV - Initialization/INFO]: [DiscordSRV] §8===============================================================================
[20:49:01] [DiscordSRV - Initialization/WARN]: java.lang.IncompatibleClassChangeError: Inconsistent constant pool data in classfile for class github/scarsz/discordsrv/dependencies/okhttp3/Authenticator. Method lambda$static$0(Lgithub/scarsz/discordsrv/dependencies/okhttp3/Route;Lgithub/scarsz/discordsrv/dependencies/okhttp3/Response;)Lgithub/scarsz/discordsrv/dependencies/okhttp3/Request; at index 35 is CONSTANT_MethodRef and should be CONSTANT_InterfaceMethodRef
[20:49:01] [DiscordSRV - Initialization/WARN]: at github.scarsz.discordsrv.dependencies.okhttp3.Authenticator.<clinit>(Authenticator.java:100)
[20:49:01] [DiscordSRV - Initialization/WARN]: at github.scarsz.discordsrv.dependencies.okhttp3.OkHttpClient$Builder.<init>(OkHttpClient.java:493)
[20:49:01] [DiscordSRV - Initialization/WARN]: at github.scarsz.discordsrv.dependencies.jda.core.JDABuilder.build(JDABuilder.java:881)
[20:49:01] [DiscordSRV - Initialization/WARN]: at github.scarsz.discordsrv.DiscordSRV.init(DiscordSRV.java:311)
[20:49:01] [DiscordSRV - Initialization/WARN]: at java.base/java.lang.Thread.run(Thread.java:834)
[20:49:02] [DiscordSRV - Initialization/ERROR]: [DiscordSRV] DiscordSRV failed to load properly: Inconsistent constant pool data in classfile for class github/scarsz/discordsrv/dependencies/okhttp3/Authenticator. Method lambda$static$0(Lgithub/scarsz/discordsrv/dependencies/okhttp3/Route;Lgithub/scarsz/discordsrv/dependencies/okhttp3/Response;)Lgithub/scarsz/discordsrv/dependencies/okhttp3/Request; at index 35 is CONSTANT_MethodRef and should be CONSTANT_InterfaceMethodRef. See https://bin.scarsz.me/a1f087d2-a51f-4407-9838-d421b6bcef57#qC0zpqNu6n8wbkzhSRrSMor6JrmxqYYk for more information.
Try using the latest dev build https://ci.scarsz.me/guestAuth/app/rest/builds/id:115/artifacts/content/DiscordSRV-Build-1.16.9-SNAPSHOT-79.jar
That didn't seem to do the trick. Output:
[20:55:12] [DiscordSRV - Initialization/INFO]: [DiscordSRV] This build of DiscordSRV is identical to develop. [latest public dev build]
[20:55:12] [DiscordSRV - Initialization/INFO]: [DiscordSRV] Language initialized as English
[20:55:12] [DiscordSRV - Initialization/INFO]: [DiscordSRV] §8===============================================================================
[20:55:12] [DiscordSRV - Initialization/INFO]: [DiscordSRV] §a Need a server host? Try PebbleHost! Plans starting at $1/GB!
[20:55:12] [DiscordSRV - Initialization/INFO]: [DiscordSRV] §a Use promo code "DISCORDSRV" at checkout for 15% off your first three bills!
[20:55:12] [DiscordSRV - Initialization/INFO]: [DiscordSRV] §8===============================================================================
[20:55:12] [DiscordSRV - Initialization/WARN]: java.lang.IncompatibleClassChangeError: Inconsistent constant pool data in classfile for class github/scarsz/discordsrv/dependencies/okhttp3/Authenticator. Method lambda$static$0(Lgithub/scarsz/discordsrv/dependencies/okhttp3/Route;Lgithub/scarsz/discordsrv/dependencies/okhttp3/Response;)Lgithub/scarsz/discordsrv/dependencies/okhttp3/Request; at index 35 is CONSTANT_MethodRef and should be CONSTANT_InterfaceMethodRef
[20:55:12] [DiscordSRV - Initialization/WARN]: at github.scarsz.discordsrv.dependencies.okhttp3.Authenticator.<clinit>(Authenticator.java:100)
[20:55:12] [DiscordSRV - Initialization/WARN]: at github.scarsz.discordsrv.dependencies.okhttp3.OkHttpClient$Builder.<init>(OkHttpClient.java:493)
[20:55:12] [DiscordSRV - Initialization/WARN]: at github.scarsz.discordsrv.dependencies.jda.core.JDABuilder.build(JDABuilder.java:881)
[20:55:12] [DiscordSRV - Initialization/WARN]: at github.scarsz.discordsrv.DiscordSRV.init(DiscordSRV.java:311)
[20:55:12] [DiscordSRV - Initialization/WARN]: at java.base/java.lang.Thread.run(Thread.java:834)
[20:55:13] [DiscordSRV - Initialization/ERROR]: [DiscordSRV] DiscordSRV failed to load properly: Inconsistent constant pool data in classfile for class github/scarsz/discordsrv/dependencies/okhttp3/Authenticator. Method lambda$static$0(Lgithub/scarsz/discordsrv/dependencies/okhttp3/Route;Lgithub/scarsz/discordsrv/dependencies/okhttp3/Response;)Lgithub/scarsz/discordsrv/dependencies/okhttp3/Request; at index 35 is CONSTANT_MethodRef and should be CONSTANT_InterfaceMethodRef. See https://bin.scarsz.me/45df5382-852b-47c1-a0aa-99ec9bd6ef98#Jwob2ozktT3XdCnPOgcLpnwAmK4pP9to for more information.
Tried running with Java 8 and it worked.
You may wish to consider adding that restriction to your Spigot page as it currently states Java 8+.
I also didn't need the TLS flag when running on 8
I've updated the Spigot page to say only Java 8 is acceptable. Pretty sure this incompatibility is a recent thing and it used to work fine on J11/12
I'll be happy to accept a PR if you do some more experimentation to make sure it doesn't break anything on other JVMs
I've just tested this plugin on a 1.14.1 PaperMC server with Java 11 and it seems to work fine, so restricting it to Java 8 is arbitrary. It only needs more recent versions of some ancient dependencies in the POM, especially the maven-shade-plugin (which I believe that causes the IncompatibleClassChangeError).
For anyone interested, here is the exact diff of the changes I made. I'd be happy to submit them as a PR if they're acceptable.
diff --git a/pom.xml b/pom.xml
index f8bc88f..3ff836e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,7 +49,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.5.1</version>
+ <version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
@@ -59,7 +59,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
- <version>2.4.3</version>
+ <version>3.2.1</version>
<executions>
<execution>
<phase>package</phase>
@@ -176,7 +176,7 @@
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
- <version>3.8.2_459</version>
+ <version>3.8.3_463</version>
<exclusions>
<exclusion>
<groupId>club.minnced</groupId>
@@ -207,7 +207,7 @@
<artifactId>log4j-core</artifactId>
<!-- MC < 1.12 = 2.0-beta9 -->
<!-- MC >= 1.12 = 2.1 -->
- <version>2.0-beta9</version>
+ <version>2.1</version>
<scope>provided</scope>
</dependency>
<!--<dependency>-->
@@ -265,7 +265,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
- <version>1.16.12</version>
+ <version>1.18.8</version>
<scope>provided</scope>
</dependency>
I did my own experimentation with some of those changes @AlexTMjugador, seems to have fixed it. Tested it with JDK 8/11/12, all worked well. Thanks for the pointer to update those.
dc87beb https://ci.scarsz.me/guestAuth/app/rest/builds/id:121/artifacts/content/DiscordSRV-Build-1.17.0-SNAPSHOT-85.jar
No problem. I'm glad I helped you out, and that it works with the three main JDK versions I can think of.
I'm curious about whether there there any plans to merge these changes into master? I'd like to use the official builds of DiscordSRV in my Java 11 server rather than my own and, if needed, I could do some more experimentation (assuming that I'm not busy with other things, of course. It took me almost a month to write this because of other projects).