bcgit / bc-java

Bouncy Castle Java Distribution (Mirror)
https://www.bouncycastle.org/java.html
MIT License
2.32k stars 1.14k forks source link

Logger crash #1608

Open AdamCalculator opened 7 months ago

AdamCalculator commented 7 months ago

java.lang.IllegalAccessError: class org.bouncycastle.crypto.CryptoServicesRegistrar (in module org.bouncycastle.provider) cannot access class java.util.logging.Logger (in module java.logging) because module org.bouncycastle.provider does not read module java.logging

Exception in thread "SyncThread0" java.lang.IllegalAccessError: class org.bouncycastle.crypto.CryptoServicesRegistrar (in module org.bouncycastle.provider) cannot access class java.util.logging.Logger (in module java.logging) because module org.bouncycastle.provider does not read module java.logging
    at TRANSFORMER/org.bouncycastle.provider/org.bouncycastle.crypto.CryptoServicesRegistrar.<clinit>(CryptoServicesRegistrar.java:28)
    at TRANSFORMER/org.bouncycastle.provider/org.bouncycastle.crypto.digests.SHA1Digest.<init>(Unknown Source)
    at TRANSFORMER/org.bouncycastle.provider/org.bouncycastle.crypto.digests.SHA1Digest.<init>(Unknown Source)
    at TRANSFORMER/org.bouncycastle.pg/org.bouncycastle.openpgp.operator.bc.BcKeyFingerprintCalculator.calculateFingerprint(Unknown Source)
    at TRANSFORMER/org.bouncycastle.pg/org.bouncycastle.openpgp.PGPPublicKey.init(Unknown Source)
    at TRANSFORMER/org.bouncycastle.pg/org.bouncycastle.openpgp.PGPPublicKey.<init>(Unknown Source)
    at TRANSFORMER/org.bouncycastle.pg/org.bouncycastle.openpgp.PGPPublicKeyRing.<init>(Unknown Source)
    at TRANSFORMER/org.bouncycastle.pg/org.bouncycastle.openpgp.PGPObjectFactory.nextObject(Unknown Source)
    at TRANSFORMER/org.bouncycastle.pg/org.bouncycastle.openpgp.PGPPublicKeyRingCollection.<init>(Unknown Source)
    at TRANSFORMER/dynamicpack@1.0.15.1/com.adamcalculator.dynamicpack.util.enc.GPGSignatureVerifier.readPublicKey(GPGSignatureVerifier.java:88)
    at TRANSFORMER/dynamicpack@1.0.15.1/com.adamcalculator.dynamicpack.util.enc.GPGSignatureVerifier.verify(GPGSignatureVerifier.java:72)
    at TRANSFORMER/dynamicpack@1.0.15.1/com.adamcalculator.dynamicpack.util.Urls.parseContentAndVerify(Urls.java:47)
    at TRANSFORMER/dynamicpack@1.0.15.1/com.adamcalculator.dynamicpack.pack.DynamicRepoRemote.sync0(DynamicRepoRemote.java:139)
    at TRANSFORMER/dynamicpack@1.0.15.1/com.adamcalculator.dynamicpack.pack.DynamicRepoRemote.lambda$sync$0(DynamicRepoRemote.java:114)
    at TRANSFORMER/dynamicpack@1.0.15.1/com.adamcalculator.dynamicpack.PackUtil.openPackFileSystem(PackUtil.java:58)
    at TRANSFORMER/dynamicpack@1.0.15.1/com.adamcalculator.dynamicpack.pack.DynamicRepoRemote.sync(DynamicRepoRemote.java:112)
    at TRANSFORMER/dynamicpack@1.0.15.1/com.adamcalculator.dynamicpack.pack.Pack.sync0(Pack.java:144)
    at TRANSFORMER/dynamicpack@1.0.15.1/com.adamcalculator.dynamicpack.pack.Pack.sync(Pack.java:110)
    at TRANSFORMER/dynamicpack@1.0.15.1/com.adamcalculator.dynamicpack.sync.SyncingTask.run(SyncingTask.java:43)
    at TRANSFORMER/dynamicpack@1.0.15.1/com.adamcalculator.dynamicpack.sync.SyncThread.startSync(SyncThread.java:41)
    at TRANSFORMER/dynamicpack@1.0.15.1/com.adamcalculator.dynamicpack.sync.SyncThread.run(SyncThread.java:25)
dghgit commented 7 months ago

Try what's on https://www.bouncycastle.org/betas I think it's now sorted out.

AdamCalculator commented 7 months ago

I think this is impossible...


java.lang.RuntimeException: java.lang.SecurityException: class "org.bouncycastle.crypto.digests.EncodableDigest"'s signer information does not match signer information of other classes in the same package
    at com.adamcalculator.dynamicpack.pack.DynamicRepoRemote.lambda$sync$0(DynamicRepoRemote.java:129) ~[main/:?] {re:classloading}
    at com.adamcalculator.dynamicpack.PackUtil.openPackFileSystem(PackUtil.java:58) ~[main/:?] {re:classloading}
    at com.adamcalculator.dynamicpack.pack.DynamicRepoRemote.sync(DynamicRepoRemote.java:123) ~[main/:?] {re:classloading}
    at com.adamcalculator.dynamicpack.pack.Pack.sync0(Pack.java:145) ~[main/:?] {re:classloading}
    at com.adamcalculator.dynamicpack.pack.Pack.sync(Pack.java:111) ~[main/:?] {re:classloading}
    at com.adamcalculator.dynamicpack.sync.SyncingTask.run(SyncingTask.java:43) ~[main/:?] {re:classloading}
    at com.adamcalculator.dynamicpack.client.DynamicPackModBase.lambda$startManuallySync$1(DynamicPackModBase.java:86) ~[main/:?] {re:classloading}
    at java.lang.Thread.run(Thread.java:840) ~[?:?] {}
Caused by: java.lang.SecurityException: class "org.bouncycastle.crypto.digests.EncodableDigest"'s signer information does not match signer information of other classes in the same package
    at java.lang.ClassLoader.checkCerts(ClassLoader.java:1163) ~[?:?] {}
    at java.lang.ClassLoader.preDefineClass(ClassLoader.java:907) ~[?:?] {}
    at java.lang.ClassLoader.defineClass(ClassLoader.java:1015) ~[?:?] {}
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?] {}
Caused by: java.lang.SecurityException: class "org.bouncycastle.crypto.digests.EncodableDigest"'s signer information does not match signer information of other classes in the same package

    at net.minecraftforge.securemodules.SecureModuleClassLoader.readerToClass(SecureModuleClassLoader.java:482) ~[securemodules-2.2.10.jar!/:?] {}
    at net.minecraftforge.securemodules.SecureModuleClassLoader.findClass(SecureModuleClassLoader.java:399) ~[securemodules-2.2.10.jar!/:?] {}
    at net.minecraftforge.securemodules.SecureModuleClassLoader.loadClass(SecureModuleClassLoader.java:415) ~[securemodules-2.2.10.jar!/:?] {}
    at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?] {}
    at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?] {}
    at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?] {}
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?] {}
    at net.minecraftforge.securemodules.SecureModuleClassLoader.readerToClass(SecureModuleClassLoader.java:482) ~[securemodules-2.2.10.jar!/:?] {}
    at net.minecraftforge.securemodules.SecureModuleClassLoader.findClass(SecureModuleClassLoader.java:399) ~[securemodules-2.2.10.jar!/:?] {}
    at net.minecraftforge.securemodules.SecureModuleClassLoader.loadClass(SecureModuleClassLoader.java:415) ~[securemodules-2.2.10.jar!/:?] {}
    at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?] {}
    at org.bouncycastle.openpgp.operator.bc.BcKeyFingerprintCalculator.calculateFingerprint(BcKeyFingerprintCalculator.java:51) ~[bcpg-jdk18on-1.77.jar%235!/:?] {}
    at org.bouncycastle.openpgp.PGPPublicKey.init(PGPPublicKey.java:59) ~[bcpg-jdk18on-1.77.jar%235!/:?] {}
    at org.bouncycastle.openpgp.PGPPublicKey.<init>(PGPPublicKey.java:227) ~[bcpg-jdk18on-1.77.jar%235!/:?] {}
    at org.bouncycastle.openpgp.PGPPublicKeyRing.<init>(PGPPublicKeyRing.java:122) ~[bcpg-jdk18on-1.77.jar%235!/:?] {}
    at org.bouncycastle.openpgp.PGPObjectFactory.nextObject(PGPObjectFactory.java:130) ~[bcpg-jdk18on-1.77.jar%235!/:?] {}
    at org.bouncycastle.openpgp.PGPPublicKeyRingCollection.<init>(PGPPublicKeyRingCollection.java:62) ~[bcpg-jdk18on-1.77.jar%235!/:?] {}
    at com.adamcalculator.dynamicpack.util.enc.GPGSignatureVerifier.readPublicKey(GPGSignatureVerifier.java:92) ~[main/:?] {re:classloading}
    at com.adamcalculator.dynamicpack.util.enc.GPGSignatureVerifier.verify(GPGSignatureVerifier.java:76) ~[main/:?] {re:classloading}
    at com.adamcalculator.dynamicpack.util.Urls.parseContentAndVerify(Urls.java:47) ~[main/:?] {re:classloading}
    at com.adamcalculator.dynamicpack.pack.DynamicRepoRemote.sync0(DynamicRepoRemote.java:150) ~[main/:?] {re:classloading}
    at com.adamcalculator.dynamicpack.pack.DynamicRepoRemote.lambda$sync$0(DynamicRepoRemote.java:125) ~[main/:?] {re:classloading}
    ... 7 more
dghgit commented 7 months ago

The jars listed are the 1.77 ones - the beta is 1.78-SNAPSHOT. Note you will need one or the other in your class path - the exception above makes it look like there is both.

AdamCalculator commented 7 months ago

really, well, I'll try to delve deeper into solving this problem later...