I recently installed Bouncy Castle security provider for a project I am working on. Once installed the Minecraft client stopped logging into the server I run locally. (Tho its still working for friends who connect remotely)
I get the following stack trace to the console when trying to connect with the client. The GUI eventually times out and does not connect.
Connecting to 192.168.1.43, 25565
java.lang.ClassCastException: org.bouncycastle.jcajce.provider.digest.GOST3411$M
appings cannot be cast to apl
at apm.a(Unknown Source)
at apm.a(Unknown Source)
at apm.a(Unknown Source)
at apn.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at apm.<init>(Unknown Source)
at jt.<clinit>(SourceFile:40)
at eq.a(SourceFile:28)
at ef.a(SourceFile:192)
at cg.i(SourceFile:249)
at cg.c(SourceFile:15)
at ch.run(SourceFile:93)
Exception in thread "Client read thread" java.lang.InternalError: cannot create
instance of org.bouncycastle.jcajce.provider.digest.GOST3411$Mappings : java.lan
g.ClassCastException: org.bouncycastle.jcajce.provider.digest.GOST3411$Mappings
cannot be cast to apl
at apm.a(Unknown Source)
at apm.a(Unknown Source)
at apm.a(Unknown Source)
at apn.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at apm.<init>(Unknown Source)
at jt.<clinit>(SourceFile:40)
at eq.a(SourceFile:28)
at ef.a(SourceFile:192)
at cg.i(SourceFile:249)
at cg.c(SourceFile:15)
at ch.run(SourceFile:93)
If I comment out the line enabling Bouncy Castle in java.security file I still get the same error. IMO this shouldn't happen as in commenting the line Bouncy Castle is not enabled. (I've confirmed this with a simple test program showing BC wasn't available)
However once I removed bcprov-jdk15on-147 from ext it the client worked.
I see a few issues here.
For some reason the java.security provider precedence is being ignored.
Bouncy Castle is the last provider in my precedence list. Shouldn't it be using Sun, or what ever provider is working now instead of BC when it's enabled anyway?
Even when BC is not enabled in the precedence chain in java.security Minecraft is using it anyway. How and why is this so?
Linked issues
is duplicated by 2
Comments 11
Gee I am so glad I wasted my time in raising this issue, and it is an issue, only for it to be immediately closed.
The issue here IS with Minecraft, and not the "third party software", which for all intents and purposes is a part of the JVM.
Minecraft is not only ignoring system settings it's using a provider that isn't even enabled. Hardly a problem with the 3rd party vendor. This is Minecraft's issue.
Minecraft includes some Bouncy Castle code. So it's probably an interaction between the code embedded in Minecraft, and the external Bouncy Castle security provider. I don't have any idea which component the bug lies in though.
Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
Reopening, received the following crashlog via irc.
2013-04-14 22:56:22 [SERVER] [INFO] Starting integrated minecraft server version
1.5.1
2013-04-14 22:56:22 [SERVER] [INFO] Generating keypair
java.lang.NoClassDefFoundError: Could not initialize class kl
at bjh.c(SourceFile:102)
at net.minecraft.server.MinecraftServer.run(SourceFile:306)
at gp.run(SourceFile:573)
2013-04-14 22:56:22 [SERVER] [SEVERE] Encountered an unexpected exception NoClas
sDefFoundError
java.lang.NoClassDefFoundError: Could not initialize class kl
at bjh.c(SourceFile:102)
at net.minecraft.server.MinecraftServer.run(SourceFile:306)
at gp.run(SourceFile:573)
2013-04-14 22:56:22 [SERVER] [SEVERE] This crash report has been saved to: C:\Us
ers\hafnero\AppData\Roaming\.minecraft\crash-reports\crash-2013-04-14_22.56.22-s
erver.txt
2013-04-14 22:56:22 [SERVER] [INFO] Stopping server
2013-04-14 22:56:22 [SERVER] [INFO] Saving players
2013-04-14 22:56:22 [SERVER] [INFO] Saving worlds
java.lang.NullPointerException
at net.minecraft.server.MinecraftServer.a(SourceFile:252)
at net.minecraft.server.MinecraftServer.k(SourceFile:276)
at bjh.k(SourceFile:229)
at net.minecraft.server.MinecraftServer.run(SourceFile:364)
at gp.run(SourceFile:573)
Having the same problem on my Mac, 10.8, using the installed Java with the system. I cannot find bouncycastle anywhere on my system (locate, spotlight, etc.).
Minecraft Crash Report ----
// Quite honestly, I wouldn't worry myself about that.
Time: 4/19/13 2:05 PM
Description: Exception in server tick loop
java.lang.InternalError: cannot create instance of org.bouncycastle.jcajce.provider.digest.GOST3411$Mappings : java.lang.ClassCastException: org.bouncycastle.jcajce.provider.digest.GOST3411$Mappings cannot be cast to aso
at asp.a(Unknown Source)
at asp.a(Unknown Source)
at asp.a(Unknown Source)
at asq.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at asp.<init>(Unknown Source)
at kl.<clinit>(SourceFile:40)
at bjh.c(SourceFile:102)
at net.minecraft.server.MinecraftServer.run(SourceFile:306)
at gp.run(SourceFile:573)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
– System Details –
Details:
Minecraft Version: 1.5.1
Operating System: Mac OS X (x86_64) version 10.8
Java Version: 1.6.0_45, Apple Inc.
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Apple Inc.
Memory: 508250944 bytes (484 MB) / 554369024 bytes (528 MB) up to 1069416448 bytes (1019 MB)
JVM Flags: 3 total; -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Resources/LauncherSupport.jar -Xms512M -Xmx1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: No suspicious classes found.
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
Profiler Position: N/A (disabled)
Player Count: 0 / 8; []
Type: Integrated Server (map_client.txt)
Is Modded: Probably not. Jar signature remains and both client + server brands are untouched.
I solved my issue. Uninstalling Java completely (using the directions at http://stikine.wordpress.com/2012/03/02/howto-remove-java/) and then reinstalling it from Apple fixed it.
Prior to that, I did try installing Oracle Java 1.7, which wouldn't launch at all.
Is this still a concern in the current Minecraft version 1.6.2 / Launcher version 1.1.2 ? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
This ticket is invalid as it relates to a modded or 3rd party client/server.
Any non-standard client/server build needs to be taken up with the appropriate team, not Mojang.
Any plugin issues need to be addressed to the plugin creator.
This site is for addressing issues related to the base unmodded MineCraft.