Does anyone know how to solve this?
I tried many things, but none of them worked.
And when I click more details I get this:
at sun.security.provider.JavaKeyStore.engineLoad(Unknown Source)
atsun.security.provider.JavaKeyStore$JKS.engineLoad(Unknown Source)
at java.security.KeyStore.load(Unknown Source)
at com.sun.deploy.security.RootCertStore$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.RootCertStore.loadCertStore(Unknown Source)
at com.sun.deploy.security.RootCertStore.load(Unknown Source)
at com.sun.deploy.security.RootCertStore.load(Unknown Source)
at com.sun.deploy.security.ImmutableCertStore.load(Unknown Source)
at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(Unknown Source)
at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(Unknown Source)
at sun.plugin.security.PluginClassLoader.getPermissions(Unknown Source)
at java.security.SecureClassLoader.getProtectionDomain(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
![]()
Ramesh R
6,9304 gold badges24 silver badges38 bronze badges
asked Jun 27, 2009 at 11:43
5
You may corrupt the file during copy/transfer.
Are you using maven?
If you are copying keystore file with «filter=true», you may corrupt the file.
Please check the file size.
answered Aug 13, 2011 at 13:05
2
Maybe maven encoding you KeyStore, you can set filtering=false to fix this problem.
<build>
...
<resources>
<resource>
...
<!-- set filtering=false to fix -->
<filtering>false</filtering>
...
</resource>
</resources>
</build>
answered Mar 8, 2016 at 7:58
xiezefanxiezefan
5715 silver badges5 bronze badges
2
(Re)installing the latest JDK (e.g. Oracle’s) fixed it for me.
Prior to installing the latest JDK, when I executed the following command in Terminal.app:
keytool -list -keystore $(/usr/libexec/java_home)/jre/lib/security/cacerts -v
It resulted in:
keytool error: java.io.IOException: Invalid keystore format
java.io.IOException: Invalid keystore format
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:650)
at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55)
at java.security.KeyStore.load(KeyStore.java:1445)
at sun.security.tools.keytool.Main.doCommands(Main.java:792)
at sun.security.tools.keytool.Main.run(Main.java:340)
at sun.security.tools.keytool.Main.main(Main.java:333)
But, after installing the latest Oracle JDK and restarting Terminal, executing the following command:
keytool -list -keystore $(/usr/libexec/java_home)/jre/lib/security/cacerts -v
Results in:
Enter keystore password:
Which indicates that the keytool on path can access the keystore.
answered Jan 5, 2016 at 21:39
Gary S. WeaverGary S. Weaver
7,9064 gold badges37 silver badges61 bronze badges
3
I had the same issue with different versions of keytool:
C:Program FilesJavajdk1.8.0_51binkeytool
but the same keystore file worked fine with
«C:Program FilesJavajre1.8.0_201binkeytool»
I know it is an old thread but have lost a lot of hours figuring this out… 😀
answered Jun 19, 2020 at 9:55
![]()
ShoaebShoaeb
6537 silver badges18 bronze badges
2
for me that issue happened because i generated .jks file on my laptop with 1.8.0_251 and i copied it on server witch had java 1.8.0_45 and when I used that .jks file in my code i got java.io.IOException: Invalid Keystore format.
to solve this issue i generated .jks file directly on the server instead of copy there from my laptop which had different java version.
answered Jan 19, 2021 at 0:48
FaribaFariba
6431 gold badge11 silver badges27 bronze badges
I had spent lot of time on this and finally This worked for me —
go to file -> project structure -> SDK Location -> Gradle Settings -> Change Gradle JDK -> from 1.8 to 11

Just change Gradle JDK -> from 1.8 to 11 then rebuild the project and try again
answered Aug 9, 2022 at 6:54
![]()
1
I think the keystore file you want to use has a different or unsupported format in respect to your Java version. Could you post some more info of your task?
In general, to solve this issue you might need to recreate the whole keystore (using some other JDK version for example). In export-import the keys between the old and the new one — if you manage to open the old one somewhere else.
If it is simply an unsupported version, try the BouncyCastle crypto provider for example (although I’m not sure If it adds support to Java for more keystore types?).
Edit: I looked at the feature spec of BC.
answered Jun 27, 2009 at 11:48
akarnokdakarnokd
68.6k14 gold badges156 silver badges188 bronze badges
Your keystore is broken, and you will have to restore or regenerate it.
answered Jun 27, 2009 at 15:34
1
I ran into the problem with openJDK on ubuntu, had to install Oracle JDK to get it working.
You can follow this guide on google sites to do that.
answered Sep 19, 2017 at 10:19
Sadiq AliSadiq Ali
1,2622 gold badges15 silver badges22 bronze badges
Same issue here, I have Oracle JDK installed and my keystore was created using that, but in the jceks format
keytool -importkeystore -destkeystore client.keystore
-srckeystore redislabs_user.p12 -srcstoretype pkcs12
-deststoretype jceks -alias client-cert
I deleted the -deststoretype jceks option and it worked fine 🙂
answered Nov 5, 2020 at 14:49
rulowebruloweb
6548 silver badges10 bronze badges
In my case, I was running the project with Java version 1.8. and the Keystore.jks file that I generated from java 16.
I changed my project java version to 16 and the error goes away.
Please check the JDK version with which you are generating the keystore and the JDK version for your project are the same or not. If they are different, either generate the keystore from the same JDK on which your current project is running or change the project JDK.
answered Nov 13, 2021 at 17:03
I came across this issue while running keytool command. There is an other way to run the keytool command, mentioned here: https://developers.google.com/android/guides/client-auth using gradlew command.
When I ran in debug mode ./gradlew signingReport --debug got to know that gradle plugin required java 11 and my local has java8. Downloaded java11 and updated Path. Ran the command (Make sure you open a new terminal so that java path is reflected to 11). Works like a charm !!!
answered Sep 25, 2021 at 6:59
saiyansaiyan
5511 gold badge4 silver badges20 bronze badges
go to build
clean the project
then rebuild your project
it worked for me.
answered Feb 18, 2019 at 10:27
![]()
It may be necessary to run cmd as administrator.
the paths to specify the .jks file must be / and not .
If they open the cmd with the path where the .jks file is located, they only put in the /key.jks path
answered Apr 2, 2022 at 22:57
I had problem with «Invalid Keystore format» too. All this answers can’t helped me.
In my case problem was on Mac OS. JAVA_HOME=jdk1.8 not pulled from .zschrc, so I think that generate certs on it, but default was jdk11. I changed it to jdk1.8 with «jenv» and generate certs. How it works.
You can download jenv by brew. And some commands that I used
jenv versions
to check all versions of JDK
jenv global JDK
to set wanted jdk
java -version
to check it
answered Jul 18, 2022 at 14:19
Does anyone know how to solve this java error?
java.io.IOException: Invalid keystore format
I get it when I try and access the certificate store from the Java option in control panels. It’s stopping me from loading applets that require elevated privileges.
Error Image
![]()
LisaMM
6751 gold badge16 silver badges28 bronze badges
asked Sep 24, 2008 at 12:23
I was able to reproduce the error by mangling the trusted.certs file at directory
C:Documents and SettingsCDayApplication DataSunJavaDeploymentsecurity.
Deleting the file fixed the problem.
rogerdpack
60.2k35 gold badges258 silver badges377 bronze badges
answered Sep 24, 2008 at 13:01
Craig DayCraig Day
2,5051 gold badge24 silver badges26 bronze badges
2
Do not include special characters in organization name and unit
answered Aug 29, 2012 at 12:37
0
Seems to be a missing certificate or an invalid format.
Did you already generate a certificate with keytool?
answered Sep 24, 2008 at 12:44
DeeCeeDeeCee
4002 silver badges6 bronze badges
for me it meant that my key file I was trying to import was invalid (it was actually a 404 page not a valid key)
answered Apr 11, 2011 at 20:43
rogerdpackrogerdpack
60.2k35 gold badges258 silver badges377 bronze badges
For you guys who can’t find the ‘Documents and Settings’ (whatever reason there may be) here is another path where the trusted.certs can be found:
C:Users<username>AppDataLocalLowSunJavaDeploymentsecurity
Hope this helps!
answered May 2, 2014 at 14:33
Emperor 2052Emperor 2052
5011 gold badge5 silver badges12 bronze badges
Problem
Attempts to use the IBM UrbanCode Deploy «keytool -importkeystore» command results in the error «java.io.IOException: Invalid keystore format».
Symptom
Trying to import entries from one keystore into another fails.
Command:
keytool -importkeystore -srckeystore <source-encryption.keystore> -destkeystore <target-encryption.keystore>
Result:
keytool error (likely untranslated): java.io.IOException: Invalid keystore format
Cause
The source keystore was created using an IBM SDK, and the import is attempting to use OpenJDK which results in the ‘Invalid keystore format’ error.
Resolving The Problem
The importing JDK needs to be of the same vendor as the one from which is was exported.
Use the IBM SDK and import the entries using the keytool shipped with IBM UrbanCode Deploy.
Note: If you need to convert the encryption.keystore created by the OpenJDK into a keystore that the IBM SDK can read, contact IBM Rational Client Support to obtain an utility that will allow you to convert it.
[{«Product»:{«code»:»SS4GSP»,»label»:»IBM UrbanCode Deploy»},»Business Unit»:{«code»:»BU053″,»label»:»Cloud & Data Platform»},»Component»:»General Information»,»Platform»:[{«code»:»PF002″,»label»:»AIX»},{«code»:»PF010″,»label»:»HP-UX»},{«code»:»PF016″,»label»:»Linux»},{«code»:»PF027″,»label»:»Solaris»},{«code»:»PF033″,»label»:»Windows»}],»Version»:»6.1;6.1.1;6.1.2;6.1.3;6.2″,»Edition»:»»,»Line of Business»:{«code»:»LOB45″,»label»:»Automation»}}]
Содержание
- Keytool Error: Java.io.IOException: Invalid Keystore Format (Doc ID 2499934.1)
- Applies to:
- Symptoms
- Cause
- To view full details, sign in with your My Oracle Support account.
- Don’t have a My Oracle Support account? Click to get started!
- java.io.IOException: недопустимый формат хранилища ключей
- 11 ответы
- how to solve invalid keystore format error in android studio 2.2. #7
- Comments
Last updated on JANUARY 16, 2020
Applies to:
Symptoms
On 12.2.7 version, Jserv, JDK, JVM, JRE
After copying adkeystor.dat and cacerts from one instance to another re generate jar and just list keystore fails with below error:
The issue can be reproduced at will with the following steps:
1. Re generate jar’ using adadmin
2. keytool -list -v -keystore adkeystore.dat
Cause
To view full details, sign in with your My Oracle Support account.
Don’t have a My Oracle Support account? Click to get started!
In this Document
My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.
Oracle offers a comprehensive and fully integrated stack of cloud applications and platform services. For more information about Oracle (NYSE:ORCL), visit oracle.com. пїЅ Oracle | Contact and Chat | Support | Communities | Connect with us |
|
|
| Legal Notices | Terms of Use
Источник
java.io.IOException: недопустимый формат хранилища ключей
Кто-нибудь знает, как это решить? Я много чего пробовал, но ни один из них не помог.
И когда я нажимаю подробнее, я получаю следующее:
задан 27 июн ’09, 08:06
Что именно ты пытаешься сделать? Было бы полезно опубликовать пример кода. — Jonik
И, пожалуйста, опубликуйте, что вы уже пробовали? — akarnokd
Не похоже, что Томи написал какой-либо код, связанный с KeyStore; этот стек — просто начало работы апплета. Похоже, что у загрузчика классов возникают проблемы с подготовкой к проверке подписей апплета. — erickson
@erickson: Да. Теперь я тоже это вижу. Но, боюсь, без ответа ОП мы не сможем двигаться дальше. — akarnokd
11 ответы
Вы можете повредить файл во время копирования / передачи.
Вы используете maven? Если вы копируете файл хранилища ключей с «filter = true», вы можете повредить файл.
Пожалуйста, проверьте размер файла.
ответ дан 13 авг.
Большой! Я действительно помог мне. Не могли бы вы пояснить, почему параметр фильтрации портит хранилище ключей? — Дмитрий
Спасибо за filter = true . спас мне день — Амандип Камбодж
в моем случае maven-cargo-plugin конфигурация контейнера должна использовать . для двоичных файлов, а не , согласно maven: грузовая документация — Кревелен
Возможно, maven кодирует ваше хранилище ключей, вы можете установить filtering = false, чтобы решить эту проблему.
ответ дан 07 мар ’20, в 14:03
У меня был ниже в моем родительском пом. Отметка фильтрации как ложная решила проблему. SRC / основные / ресурсы правда — Санджай Джайн
Это основная причина, спасибо. — Томми
(Повторная) установка последней версии JDK (например, Oracle,) исправил это для меня.
Перед установкой последней версии JDK я выполнил следующую команду в Terminal.app:
Но после установки последней версии Oracle JDK и перезапуска Терминала, выполнив следующую команду:
Это означает, что keytool по пути может получить доступ к хранилищу ключей.
Это сработало для меня — просто установил последнюю версию, которую Mac уже «обновил» как патч или что-то в этом роде, — но только после того, как я запустил новое окно терминала, чтобы путь использовал новое обновление java. Особенно полезными оказались команды, воспроизводящие ошибку и демонстрирующие, что проблема была решена (хотя из-за ссылки на $ (java_home) они работали в терминале, где команда gradle не работала, что немного сбивало с толку)! — андроид.ласка
Эта команда помогла мне проверить файл jks (keytool -list -keystore ) — СудоПлз
Я думаю, что файл хранилища ключей, который вы хотите использовать, имеет другой или неподдерживаемый формат по сравнению с вашей версией Java. Не могли бы вы опубликовать дополнительную информацию о вашей задаче?
В общем, для решения этой проблемы вам может потребоваться воссоздать все хранилище ключей (например, используя другую версию JDK). При экспорте-импорте ключи между старым и новым — если удастся открыть старый где-нибудь еще.
Если это просто неподдерживаемая версия, попробуйте НадувнойЗамок криптографический провайдер например (хотя я не уверен, добавит ли он поддержку Java для большего количества типов хранилищ ключей?).
Редактировать: Я посмотрел на характеристики BC.
Источник
how to solve invalid keystore format error in android studio 2.2. #7
**here is error report———>
error:Error:java.lang.RuntimeException:
how to solve this three errors. **
here is gradle console message————>
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:packageRelease’.
com.android.ide.common.signing.KeytoolException: Failed to read key palash from store «D:MyApplication3.ideaworkspace.xml»: Invalid keystore format
Try:
Run with —info or —debug option to get more log output.
Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:app:packageRelease’.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:153)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150)
at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99)
at org.gradle.tooling.internal.provider.runner.BuildModelActionRunner.run(BuildModelActionRunner.java:46)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.tooling.internal.provider.runner.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:58)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:52)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:237)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: java.lang.RuntimeException: com.android.ide.common.signing.KeytoolException: Failed to read key palash from store «D:MyApplication3.ideaworkspace.xml»: Invalid keystore format
at com.android.build.gradle.tasks.PackageAndroidArtifact.doTask(PackageAndroidArtifact.java:469)
at com.android.build.gradle.tasks.PackageAndroidArtifact.doFullTaskAction(PackageAndroidArtifact.java:321)
at com.android.build.gradle.tasks.PackageApplication.doFullTaskAction(PackageApplication.java:75)
at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:88)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:245)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:232)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
. 70 more
Caused by: com.android.ide.common.signing.KeytoolException: Failed to read key palash from store «D:MyApplication3.ideaworkspace.xml»: Invalid keystore format
at com.android.ide.common.signing.KeystoreHelper.getCertificateInfo(KeystoreHelper.java:212)
at com.android.build.gradle.tasks.PackageAndroidArtifact.doTask(PackageAndroidArtifact.java:431)
. 80 more
Caused by: java.io.IOException: Invalid keystore format
at com.android.ide.common.signing.KeystoreHelper.getCertificateInfo(KeystoreHelper.java:190)
. 81 more
Total time: 1 mins 32.136 secs
**
The text was updated successfully, but these errors were encountered:
Источник
Join the DZone community and get the full member experience.
Join For Free
I have been working on creating keystores and signing jars today, and
have run into some interesting findings, and some interesting but
obscure errors during this process.
I have the following maven plugin that I wanted to use to sign my jar with my keystore certificate:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${plugin-jar-version}</version>
<executions>
<execution>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<keystore>src/main/keystore</keystore>
<alias>3166_javaee</alias>
<storepass>3166_javaee</storepass>
<signedjar>${project.build.directory}/signed/${project.build.finalName}.jar</signedjar>
<verify>true</verify>
</configuration>
</plugin>
Running this maven command:
mvn clean install -e
Before I created the keystore.
Then I run the jar signing with a missing keystore, then I get the following error:
[INFO]
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ chapter02 ---
[INFO] Building jar: C:usrSYNCHPACKT3166Chapters_Codech02targetchapter02-1.0.2.jar
[INFO]
[INFO] --- maven-jar-plugin:2.3.1:sign (default) @ chapter02 ---
[INFO] jarsigner error: java.lang.RuntimeException: keystore load: C:usrSYNCHPACKT3166Chapters_Codech02srcmainkeystore (The system cannot find the file specified)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.110s
[INFO] Finished at: Sat Feb 12 09:47:26 EST 2011
[INFO] Final Memory: 12M/29M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.3.1:sign (default) on project chapter02: Result of cmd.exe /X /C "C:usrbinJavajdk1.6.0_23jre..
binjarsigner.exe -keystore src/main/keystore -storepass 3166_javaee -signedjar C:usrSYNCHPACKT3166Chapters_Codech02targetsignedchapter02-1.0.2.jar C:usrSYNCHPACK
T3166Chapters_Codech02targetchapter02-1.0.2.jar 3166_javaee" execution is: '1'. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.3.1:sign (default) on project chapter02: Result of c
md.exe /X /C "C:usrbinJavajdk1.6.0_23jre..binjarsigner.exe -keystore src/main/keystore -storepass 3166_javaee -signedjar C:usrSYNCHPACKT3166Chapters_Codech02tar
getsignedchapter02-1.0.2.jar C:usrSYNCHPACKT3166Chapters_Codech02targetchapter02-1.0.2.jar 3166_javaee" execution is: '1'.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Result of cmd.exe /X /C "C:usrbinJavajdk1.6.0_23jre..binjarsigner.exe -keystore src/main/keystore -storepass
3166_javaee -signedjar C:usrSYNCHPACKT3166Chapters_Codech02targetsignedchapter02-1.0.2.jar C:usrSYNCHPACKT3166Chapters_Codech02targetchapter02-1.0.2.jar 3166
_javaee" execution is: '1'.
at org.apache.maven.plugin.jar.JarSignMojo.signJar(JarSignMojo.java:345)
at org.apache.maven.plugin.jar.JarSignMojo.execute(JarSignMojo.java:242)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I tried to regenerate the keystore then run the signing manually, only to get the following error:
C:usrSYNCHPACKT3166Chapters_Codech02>keytool -genkey -alias 3166_javaee -keyalg RSA -keystore src/main/keystore/signing-jar.keystore -storepass 3166_javaee -keypass 316
6_javaee -dname "CN=domain"C:usrSYNCHPACKT3166Chapters_Codech02>C:usrbinJavajdk1.6.0_23jre..binjarsigner.exe -keystore src/main/keystore -storepass 3166_javaee -signedjar C:usrSYNCHPACK
T3166Chapters_Codech02targetsignedchapter02-1.0.2.jar C:usrSYNCHPACKT3166Chapters_Codech02targetchapter02-1.0.2.jar 3166_javaee
jarsigner error: java.lang.RuntimeException: keystore load: Invalid keystore format
Now I have searched around to try to track down what this error
actually is, and I have found that the error is because of the keystore
path.
if I use the full keystore location ‘src/main/keystore/signing-jar.keystore’ I am able to successfully sign my jar:
C:usrSYNCHPACKT3166Chapters_Codech02>C:usrbinJavajdk1.6.0_23jre..binjarsigner.exe -keystore src/main/keystore/signing-jar.keystore -storepass 3166_javaee -signed
jar C:usrSYNCHPACKT3166Chapters_Codech02targetsignedchapter02-1.0.2.jar C:usrSYNCHPACKT3166Chapters_Codech02targetchapter02-1.0.2.jar 3166_javaeeWarning:
The signer certificate will expire within six months.
Glad to have this solved.
From http://www.baselogic.com/blog/development/java-javaee-j2ee/invalid-keystore-format-and-keytool-genkey-issues-during-jar-signing
JAR (file format)
Opinions expressed by DZone contributors are their own.
Invalid keystore format and ‘keytool genkey’ issues during Jar signing
I have been working on creating keystores and signing jars today, and have run into some interesting finding, and some interesting but obscure errors during this process.
I have the following maven plugin that I wanted to use to sign my jar with my keystore certificate:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${plugin-jar-version}</version>
<executions>
<execution>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<keystore>src/main/keystore</keystore>
<alias>3166_javaee</alias>
<storepass>3166_javaee</storepass>
<signedjar>${project.build.directory}/signed/${project.build.finalName}.jar</signedjar>
<verify>true</verify>
</configuration>
</plugin>
Running this maven command:
mvn clean install -e
Before I created the keystore.
Then I run the jar signing with a missing keystore, then I get the following error:
[INFO] [INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ chapter02 --- [INFO] Building jar: C:usrSYNCHPACKT3166Chapters_Codech02targetchapter02-1.0.2.jar [INFO] [INFO] --- maven-jar-plugin:2.3.1:sign (default) @ chapter02 --- [INFO] jarsigner error: java.lang.RuntimeException: keystore load: C:usrSYNCHPACKT3166Chapters_Codech02srcmainkeystore (The system cannot find the file specified) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 12.110s [INFO] Finished at: Sat Feb 12 09:47:26 EST 2011 [INFO] Final Memory: 12M/29M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.3.1:sign (default) on project chapter02: Result of cmd.exe /X /C "C:usrbinJavajdk1.6.0_23jre.. binjarsigner.exe -keystore src/main/keystore -storepass 3166_javaee -signedjar C:usrSYNCHPACKT3166Chapters_Codech02targetsignedchapter02-1.0.2.jar C:usrSYNCHPACK T3166Chapters_Codech02targetchapter02-1.0.2.jar 3166_javaee" execution is: '1'. -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.3.1:sign (default) on project chapter02: Result of c md.exe /X /C "C:usrbinJavajdk1.6.0_23jre..binjarsigner.exe -keystore src/main/keystore -storepass 3166_javaee -signedjar C:usrSYNCHPACKT3166Chapters_Codech02tar getsignedchapter02-1.0.2.jar C:usrSYNCHPACKT3166Chapters_Codech02targetchapter02-1.0.2.jar 3166_javaee" execution is: '1'. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoExecutionException: Result of cmd.exe /X /C "C:usrbinJavajdk1.6.0_23jre..binjarsigner.exe -keystore src/main/keystore -storepass 3166_javaee -signedjar C:usrSYNCHPACKT3166Chapters_Codech02targetsignedchapter02-1.0.2.jar C:usrSYNCHPACKT3166Chapters_Codech02targetchapter02-1.0.2.jar 3166 _javaee" execution is: '1'. at org.apache.maven.plugin.jar.JarSignMojo.signJar(JarSignMojo.java:345) at org.apache.maven.plugin.jar.JarSignMojo.execute(JarSignMojo.java:242) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more [ERROR] [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I tried to regenerate the keystore then run the signing manually, only to get the following error:
C:usrSYNCHPACKT3166Chapters_Codech02>keytool -genkey -alias 3166_javaee -keyalg RSA -keystore src/main/keystore/signing-jar.keystore -storepass 3166_javaee -keypass 316 6_javaee -dname "CN=domain" C:usrSYNCHPACKT3166Chapters_Codech02>C:usrbinJavajdk1.6.0_23jre..binjarsigner.exe -keystore src/main/keystore -storepass 3166_javaee -signedjar C:usrSYNCHPACK T3166Chapters_Codech02targetsignedchapter02-1.0.2.jar C:usrSYNCHPACKT3166Chapters_Codech02targetchapter02-1.0.2.jar 3166_javaee jarsigner error: java.lang.RuntimeException: keystore load: Invalid keystore format
Now I have searched around to try to track down what this error actually is, and I have found that the error is because of the keystore path.
if I use the full keystore location ‘src/main/keystore/signing-jar.keystore’ I am able to successfully sign my jar:
C:usrSYNCHPACKT3166Chapters_Codech02>C:usrbinJavajdk1.6.0_23jre..binjarsigner.exe -keystore src/main/keystore/signing-jar.keystore -storepass 3166_javaee -signed jar C:usrSYNCHPACKT3166Chapters_Codech02targetsignedchapter02-1.0.2.jar C:usrSYNCHPACKT3166Chapters_Codech02targetchapter02-1.0.2.jar 3166_javaee Warning: The signer certificate will expire within six months.
Glad to have this solved.
Problem
After JIRA has been upgraded, or configured for SSL, it is not able to be connected to, despite the process running.
The following appears in the Catalina log (for example catalina.2015-10-24.log):
24-Oct-2015 15:54:34.822 SEVERE [main] org.apache.coyote.AbstractProtocol.init Failed to initialize end point associated with ProtocolHandler ["http-bio-8443"]
java.io.IOException: Invalid keystore format
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:650)
at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55)
at java.security.KeyStore.load(KeyStore.java:1445)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:424)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:323)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:581)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:521)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:466)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:205)
at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:360)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:730)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:457)
Diagnosis
Environment
- JIRA is configured to use SSL, hosted by Tomcat.
Diagnostic Steps
- If this exception is found in the logs it’s highly likely this problem applies.
Cause
The Java Keystore (JKS) specified by Tomcat is in an invalid format. Tomcat by default expects it to be a JKS file, and this error can be thrown if it is a PKCS12 format (it’s a bit like expecting a BMP and it’s a JPG, in the image world).
Workaround
It may be possible to tell Java to use the appropriate format — this can be done with the following:
- Stop JIRA.
- Add the JVM argument
Djavax.net.ssl.trustStoreType=pkcs12as per Setting Properties and Options on Startup. - Start JIRA and test.
If this does not work, proceed to the Resolution.
Resolution
Go back to the provider who supplied the key (either the CA vendor or appropriate department) and request for a Java Keystore (JKS) with the following in it:
- A PrivateKeyEntry.
- Any intermediate certificates, in the form of trustedCertEntry.
It’s recommend to host JIRA behind a reverse-proxy as as Apache or Nginx as per the below:
- Integrating JIRA with Apache using SSL
- Configure Jira server to run behind a NGINX reverse proxy
Кто-нибудь знает, как это решить? Я много чего пробовал, но ни один из них не помог.
И когда я нажимаю подробнее, я получаю следующее:
at sun.security.provider.JavaKeyStore.engineLoad(Unknown Source)
atsun.security.provider.JavaKeyStore$JKS.engineLoad(Unknown Source)
at java.security.KeyStore.load(Unknown Source)
at com.sun.deploy.security.RootCertStore$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.RootCertStore.loadCertStore(Unknown Source)
at com.sun.deploy.security.RootCertStore.load(Unknown Source)
at com.sun.deploy.security.RootCertStore.load(Unknown Source)
at com.sun.deploy.security.ImmutableCertStore.load(Unknown Source)
at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(Unknown Source)
at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(Unknown Source)
at sun.plugin.security.PluginClassLoader.getPermissions(Unknown Source)
at java.security.SecureClassLoader.getProtectionDomain(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
11 ответы
Вы можете повредить файл во время копирования / передачи.
Вы используете maven? Если вы копируете файл хранилища ключей с «filter = true», вы можете повредить файл.
Пожалуйста, проверьте размер файла.
ответ дан 13 авг.
Возможно, maven кодирует ваше хранилище ключей, вы можете установить filtering = false, чтобы решить эту проблему.
<build>
...
<resources>
<resource>
...
<!-- set filtering=false to fix -->
<filtering>false</filtering>
...
</resource>
</resources>
</build>
ответ дан 07 мар ’20, в 14:03
(Повторная) установка последней версии JDK (например, Oracle,) исправил это для меня.
Перед установкой последней версии JDK я выполнил следующую команду в Terminal.app:
keytool -list -keystore $(/usr/libexec/java_home)/jre/lib/security/cacerts -v
Это привело к:
keytool error: java.io.IOException: Invalid keystore format
java.io.IOException: Invalid keystore format
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:650)
at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55)
at java.security.KeyStore.load(KeyStore.java:1445)
at sun.security.tools.keytool.Main.doCommands(Main.java:792)
at sun.security.tools.keytool.Main.run(Main.java:340)
at sun.security.tools.keytool.Main.main(Main.java:333)
Но после установки последней версии Oracle JDK и перезапуска Терминала, выполнив следующую команду:
keytool -list -keystore $(/usr/libexec/java_home)/jre/lib/security/cacerts -v
Результаты в:
Enter keystore password:
Это означает, что keytool по пути может получить доступ к хранилищу ключей.
Создан 05 янв.
Я думаю, что файл хранилища ключей, который вы хотите использовать, имеет другой или неподдерживаемый формат по сравнению с вашей версией Java. Не могли бы вы опубликовать дополнительную информацию о вашей задаче?
В общем, для решения этой проблемы вам может потребоваться воссоздать все хранилище ключей (например, используя другую версию JDK). При экспорте-импорте ключи между старым и новым — если удастся открыть старый где-нибудь еще.
Если это просто неподдерживаемая версия, попробуйте НадувнойЗамок криптографический провайдер например (хотя я не уверен, добавит ли он поддержку Java для большего количества типов хранилищ ключей?).
Редактировать: Я посмотрел на характеристики BC.
Создан 27 июн.
Ваше хранилище ключей сломано, и вам придется его восстановить или регенерировать.
Создан 27 июн.
Я столкнулся с проблемой openJDK на ubuntu, мне пришлось установить Oracle JDK, чтобы он заработал.
Вы можете следить за этим руководство по сайтам google для этого.
Создан 19 сен.
У меня была такая же проблема с
C: Program Files Java jdk1.8.0_51 bin keytool
но тот же файл хранилища ключей отлично работал с
«C: Program Files Java jre1.8.0_201 bin keytool»
Я знаю, что это старая ветка, но я потерял много часов, выясняя это …: D
Создан 19 июн.
пойти на сборку, очистить проект, а затем перестроить свой проект, это сработало для меня.
Создан 18 фев.
ответ дан 01 мая ’20, 22:05
Та же проблема, у меня установлен Oracle JDK, и мое хранилище ключей было создано с его использованием, но в jceks формат
keytool -importkeystore -destkeystore client.keystore
-srckeystore redislabs_user.p12 -srcstoretype pkcs12
-deststoretype jceks -alias client-cert
Я удалил -deststoretype jceks вариант и все работало нормально 🙂
Создан 05 ноя.
для меня эта проблема возникла из-за того, что я сгенерировал файл .jks на своем ноутбуке с 1.8.0_251, и я скопировал его на сервер, на котором была java 1.8.0_45, и когда я использовал этот файл .jks в своем коде, я получил java.io.IOException: Invalid Формат хранилища ключей.
чтобы решить эту проблему, я сгенерировал файл .jks непосредственно на сервере, а не копировал его с моего ноутбука, у которого была другая версия java.
Создан 19 янв.
Не тот ответ, который вы ищете? Просмотрите другие вопросы с метками
java
encryption
applet
keystore
or задайте свой вопрос.