Статус: Новичок
Группы: Участники
Зарегистрирован: 28.05.2021(UTC) Сообщений: 4 Откуда: Moscow
|
Доброго времени суток. Из IDE все работает замечательно, после того как собираю мавеном в .JAR начинают вылетать исключения: Цитата:июн. 10, 2021 10:56:32 AM ru.CryptoPro.ssl.SSLSocketImpl a WARNING: main, handling exception: java.security.ProviderException: Encryption/Decryption provider not installed 2021-06-10 10:56:32 ERROR Controller:main - Message: java.security.ProviderException: Encryption/Decryption provider not installed июн. 10, 2021 10:56:40 AM ru.CryptoPro.JCP.tools.SelfTesterBase c SEVERE: [SelfTester-JCP] :: [ru.CryptoPro.JCP.tools.SelfTester_JCP] :: test 29 crashed twice! июн. 10, 2021 10:56:40 AM ru.CryptoPro.JCP.tools.SelfTesterBase run WARNING: [SelfTester-JCP] :: [ru.CryptoPro.JCP.tools.SelfTester_JCP] :: test №29 failed! июн. 10, 2021 10:56:40 AM ru.CryptoPro.JCP.tools.SelfTesterBase run WARNING: ERROR ru.CryptoPro.JCP.tools.SelfTesterException at ru.CryptoPro.JCP.tools.TestVerifyClassJar.run(Unknown Source) at ru.CryptoPro.JCP.tools.SelfTesterBase.b(Unknown Source) at ru.CryptoPro.JCP.tools.SelfTesterBase.a(Unknown Source) at ru.CryptoPro.JCP.tools.SelfTesterBase.run(Unknown Source) at java.base/java.lang.Thread.run(Thread.java:832) Caused by: java.security.PrivilegedActionException: java.io.IOException at java.base/java.security.AccessController.doPrivileged(AccessController.java:558) ... 5 more Caused by: java.io.IOException at ru.CryptoPro.JCP.tools.JarChecker.checkURLSign(Unknown Source) at ru.CryptoPro.JCP.tools.cl_34.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(AccessController.java:554) ... 5 more Caused by: java.io.IOException: Хэш на содержимое jar файла отсутствует или неверный.Файл манифеста искажен at ru.CryptoPro.JCP.tools.JarChecker.b(Unknown Source) at ru.CryptoPro.JCP.tools.JarChecker.c(Unknown Source) at ru.CryptoPro.JCP.tools.JarChecker.checkJARSign(Unknown Source) ... 8 more Все библиотеки JCP вручную инсталлил в локальный репозиторий и добавлял их в pom. Везде запускаю одной и той же JRE. Цитата:Security.getProvider("JCP"); Security.getProvider("Crypto"); Security.getProvider("RevCheck"); В IDE выдает Цитата:JCP version 2.0 Crypto version 2.0 RevCheck version 2.0 При запуске собранного jar'ника через java -jar выдает Цитата:JCP version 0.0 null RevCheck version 0.0 Отредактировано пользователем 10 июня 2021 г. 11:59:12(UTC)
| Причина: Не указана
|
|
|
|
Статус: Новичок
Группы: Участники
Зарегистрирован: 28.05.2021(UTC) Сообщений: 4 Откуда: Moscow
|
Вот полный лог: Код:
июн. 10, 2021 3:34:54 PM ru.CryptoPro.ssl.Provider b
INFO: JCP license isServer: true
июн. 10, 2021 3:34:55 PM ru.CryptoPro.ssl.Provider b
INFO: JCP license isServer: true
JCP version 0.0
Crypto version 0.0
RevCheck version 0.0
июн. 10, 2021 3:34:55 PM ru.CryptoPro.ssl.SSLContextImpl engineInit
INFO: SSLContextImpl init.
июн. 10, 2021 3:34:55 PM ru.CryptoPro.ssl.SSLContextImpl engineInit
INFO: trigger seeding of SecureRandom
июн. 10, 2021 3:34:55 PM ru.CryptoPro.ssl.SSLContextImpl engineInit
INFO: done seeding SecureRandom
июн. 10, 2021 3:34:55 PM ru.CryptoPro.ssl.SSLContextImpl engineInit
INFO: SSLContextImpl initialized.
июн. 10, 2021 3:34:56 PM ru.CryptoPro.Crypto.Starter <init>
INFO: Loading Crypto 0.0.0.0.0 [crypto module]
июн. 10, 2021 3:34:56 PM ru.CryptoPro.Crypto.Starter <init>
INFO: Crypto has been loaded.
июн. 10, 2021 3:35:05 PM ru.CryptoPro.JCP.tools.SelfTesterBase c
SEVERE: [main] :: [ru.CryptoPro.Crypto.tools.SelfTester_Crypt] :: test 11 crashed twice!
июн. 10, 2021 3:35:05 PM ru.CryptoPro.JCP.tools.SelfTesterBase checkClassInternal
SEVERE: [main] :: [ru.CryptoPro.Crypto.tools.SelfTester_Crypt] :: Corrupted: ru.CryptoPro.Crypto.Key.GostKeyGenerator
ru.CryptoPro.JCP.tools.SelfTesterException
at ru.CryptoPro.JCP.tools.TestVerifyClassJar.run(Unknown Source)
at ru.CryptoPro.JCP.tools.SelfTesterBase.b(Unknown Source)
at ru.CryptoPro.JCP.tools.SelfTesterBase.a(Unknown Source)
at ru.CryptoPro.JCP.tools.SelfTesterBase.checkClassInternal(Unknown Source)
at ru.CryptoPro.Crypto.tools.SelfTester_Crypt.checkClass(Unknown Source)
at ru.CryptoPro.Crypto.Starter.a(Unknown Source)
at ru.CryptoPro.Crypto.Starter.check(Unknown Source)
at ru.CryptoPro.Crypto.Key.GostKeyGenerator.<init>(Unknown Source)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at java.base/java.security.Provider.newInstanceUtil(Provider.java:155)
at java.base/java.security.Provider$Service.newInstance(Provider.java:1893)
at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
at java.base/javax.crypto.JceSecurity.getInstance(JceSecurity.java:136)
at java.base/javax.crypto.KeyGenerator.getInstance(KeyGenerator.java:286)
at ru.CryptoPro.ssl.cl_36.<init>(Unknown Source)
at ru.CryptoPro.ssl.cl_18.a(Unknown Source)
at ru.CryptoPro.ssl.cl_18.a(Unknown Source)
at ru.CryptoPro.ssl.cl_60.t(Unknown Source)
at ru.CryptoPro.ssl.cl_60.a(Unknown Source)
at ru.CryptoPro.ssl.SSLSocketImpl.a(Unknown Source)
at ru.CryptoPro.ssl.SSLSocketImpl.o(Unknown Source)
at ru.CryptoPro.ssl.SSLSocketImpl.b(Unknown Source)
at ru.CryptoPro.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183)
at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:142)
at ru.rs.registerextract.client.HttpsClient.doGet(HttpsClient.java:41)
at ru.rs.registerextract.requester.ZakupkiRequester.getFormLinkFromSearch(ZakupkiRequester.java:40)
at ru.rs.registerextract.controller.Controller.main(Controller.java:78)
Caused by: java.security.PrivilegedActionException: java.io.IOException
at java.base/java.security.AccessController.doPrivileged(AccessController.java:558)
... 33 more
Caused by: java.io.IOException
at ru.CryptoPro.JCP.tools.JarChecker.checkURLSign(Unknown Source)
at ru.CryptoPro.JCP.tools.cl_34.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
... 33 more
Caused by: java.io.IOException: Хэш на содержимое jar файла отсутствует или неверный.Файл манифеста искажен
at ru.CryptoPro.JCP.tools.JarChecker.b(Unknown Source)
at ru.CryptoPro.JCP.tools.JarChecker.c(Unknown Source)
at ru.CryptoPro.JCP.tools.JarChecker.checkJARSign(Unknown Source)
... 36 more
июн. 10, 2021 3:35:05 PM ru.CryptoPro.ssl.SSLSocketImpl a
WARNING: main, handling exception: java.security.ProviderException: Encryption/Decryption provider not installed
2021-06-10 15:35:05 ERROR Controller:main - Message: java.security.ProviderException: Encryption/Decryption provider not installed
июн. 10, 2021 3:35:05 PM ru.CryptoPro.JCP.tools.SelfTesterBase c
SEVERE: [SelfTester-JCP] :: [ru.CryptoPro.JCP.tools.SelfTester_JCP] :: test 29 crashed twice!
июн. 10, 2021 3:35:05 PM ru.CryptoPro.JCP.tools.SelfTesterBase run
WARNING: [SelfTester-JCP] :: [ru.CryptoPro.JCP.tools.SelfTester_JCP] :: test №29 failed!
июн. 10, 2021 3:35:05 PM ru.CryptoPro.JCP.tools.SelfTesterBase run
WARNING: ERROR
ru.CryptoPro.JCP.tools.SelfTesterException
at ru.CryptoPro.JCP.tools.TestVerifyClassJar.run(Unknown Source)
at ru.CryptoPro.JCP.tools.SelfTesterBase.b(Unknown Source)
at ru.CryptoPro.JCP.tools.SelfTesterBase.a(Unknown Source)
at ru.CryptoPro.JCP.tools.SelfTesterBase.run(Unknown Source)
at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.security.PrivilegedActionException: java.io.IOException
at java.base/java.security.AccessController.doPrivileged(AccessController.java:558)
... 5 more
Caused by: java.io.IOException
at ru.CryptoPro.JCP.tools.JarChecker.checkURLSign(Unknown Source)
at ru.CryptoPro.JCP.tools.cl_34.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
... 5 more
Caused by: java.io.IOException: Хэш на содержимое jar файла отсутствует или неверный.Файл манифеста искажен
at ru.CryptoPro.JCP.tools.JarChecker.b(Unknown Source)
at ru.CryptoPro.JCP.tools.JarChecker.c(Unknown Source)
at ru.CryptoPro.JCP.tools.JarChecker.checkJARSign(Unknown Source)
... 8 more
июн. 10, 2021 3:35:05 PM ru.CryptoPro.JCP.tools.SelfTesterBase c
SEVERE: [SelfTester-Crypt] :: [ru.CryptoPro.Crypto.tools.SelfTester_Crypt] :: test 11 crashed twice!
июн. 10, 2021 3:35:05 PM ru.CryptoPro.JCP.tools.SelfTesterBase run
WARNING: [SelfTester-Crypt] :: [ru.CryptoPro.Crypto.tools.SelfTester_Crypt] :: test №11 failed!
июн. 10, 2021 3:35:05 PM ru.CryptoPro.JCP.tools.SelfTesterBase run
WARNING: ERROR
ru.CryptoPro.JCP.tools.SelfTesterException: [SelfTester-Crypt] :: [ru.CryptoPro.JCP.tools.SelfTester_JCP] :: SelfTester Error: some test crashed twice in a row, usage of class ru.CryptoPro.JCP.tools.SelfTester_JCP is no longer available!
at ru.CryptoPro.JCP.tools.TestVerifyClassJar.run(Unknown Source)
at ru.CryptoPro.JCP.tools.SelfTesterBase.b(Unknown Source)
at ru.CryptoPro.JCP.tools.SelfTesterBase.a(Unknown Source)
at ru.CryptoPro.JCP.tools.SelfTesterBase.run(Unknown Source)
at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: ru.CryptoPro.JCP.tools.SelfTesterException: [SelfTester-Crypt] :: [ru.CryptoPro.JCP.tools.SelfTester_JCP] :: SelfTester Error: some test crashed twice in a row, usage of class ru.CryptoPro.JCP.tools.SelfTester_JCP is no longer available!
at ru.CryptoPro.JCP.tools.SelfTesterBase.checkInternal(Unknown Source)
at ru.CryptoPro.JCP.tools.SelfTester_JCP.check(Unknown Source)
at ru.CryptoPro.JCP.tools.SelfTester_JCP.check(Unknown Source)
at ru.CryptoPro.JCP.Digest.GostDigest.engineDigest(Unknown Source)
at java.base/java.security.MessageDigest.digest(MessageDigest.java:391)
at ru.CryptoPro.JCP.tools.JarChecker.a(Unknown Source)
at ru.CryptoPro.JCP.tools.JarChecker.a(Unknown Source)
at ru.CryptoPro.JCP.tools.JarChecker.c(Unknown Source)
at ru.CryptoPro.JCP.tools.JarChecker.checkJARSign(Unknown Source)
at ru.CryptoPro.JCP.tools.JarChecker.checkURLSign(Unknown Source)
at ru.CryptoPro.JCP.tools.cl_34.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
... 5 more
июн. 10, 2021 3:35:05 PM ru.CryptoPro.ssl.SSLContextImpl engineInit
INFO: SSLContextImpl init.
Exception in thread "main" java.security.KeyManagementException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: CPRandom, provider: JCP, class: ru.CryptoPro.JCP.Random.CPRandom)
at ru.CryptoPro.ssl.cl_68.d(Unknown Source)
at ru.CryptoPro.ssl.SSLContextImpl.engineInit(Unknown Source)
at java.base/javax.net.ssl.SSLContext.init(SSLContext.java:313)
at ru.rs.registerextract.client.HttpsClient.setSslSetting(HttpsClient.java:102)
at ru.rs.registerextract.client.HttpsClient.getConnection(HttpsClient.java:31)
at ru.rs.registerextract.requester.ZakupkiRequester.getFormLinkFromSearch(ZakupkiRequester.java:36)
at ru.rs.registerextract.controller.Controller.main(Controller.java:78)
Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: CPRandom, provider: JCP, class: ru.CryptoPro.JCP.Random.CPRandom)
at java.base/java.security.Provider$Service.newInstance(Provider.java:1900)
at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:206)
at java.base/java.security.SecureRandom.getInstance(SecureRandom.java:428)
... 7 more
Caused by: ru.CryptoPro.JCP.Random.RandomRefuseException
at ru.CryptoPro.JCP.Random.CertifiedRandom.b(Unknown Source)
at ru.CryptoPro.JCP.Random.CertifiedRandom.a(Unknown Source)
at ru.CryptoPro.JCP.Random.CertifiedRandom.<init>(Unknown Source)
at ru.CryptoPro.JCP.Random.CPRandom.<init>(Unknown Source)
at ru.CryptoPro.JCP.Random.CPRandom.<init>(Unknown Source)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at java.base/java.security.Provider.newInstanceUtil(Provider.java:177)
at java.base/java.security.Provider$Service.newInstance(Provider.java:1893)
... 10 more
Caused by: ru.CryptoPro.JCP.tools.SelfTesterException: [main] :: [ru.CryptoPro.JCP.tools.SelfTester_JCP] :: SelfTester Error: some test crashed twice in a row, usage of class ru.CryptoPro.JCP.tools.SelfTester_JCP is no longer available!
at ru.CryptoPro.JCP.tools.SelfTesterBase.checkInternal(Unknown Source)
at ru.CryptoPro.JCP.tools.SelfTester_JCP.check(Unknown Source)
at ru.CryptoPro.JCP.tools.SelfTester_JCP.check(Unknown Source)
... 22 more
|
|
|
|
Статус: Новичок
Группы: Участники
Зарегистрирован: 28.05.2021(UTC) Сообщений: 4 Откуда: Moscow
|
Проблема решена. JCP не хочет работать в составе fat jar, пришлось отделить сам executable jar от зависимостей и положить их в отдельную папку.
|
|
|
|
Статус: Сотрудник
Группы: Модератор, Участники Зарегистрирован: 03.12.2018(UTC) Сообщений: 1,195 Сказал(а) «Спасибо»: 100 раз Поблагодарили: 274 раз в 254 постах
|
Добрый день. Все так. Можно сделать как вы, либо полностью инклудить jar-ники в итоговый jar. |
|
|
|
|
Быстрый переход
Вы не можете создавать новые темы в этом форуме.
Вы не можете отвечать в этом форуме.
Вы не можете удалять Ваши сообщения в этом форуме.
Вы не можете редактировать Ваши сообщения в этом форуме.
Вы не можете создавать опросы в этом форуме.
Вы не можете голосовать в этом форуме.
Important Information:
The Форум КриптоПро uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close