Uploaded image for project: 'WildFly Elytron'
  1. WildFly Elytron
  2. ELY-2767

CredentialStoreCommandTest.testGenerateKeyPairDSA fails when using Java 22

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.6.0.Final
    • None
    • None
    • None

      Running tests using Java version: 22.0.1 (at the time of error it is the version of java-latest-openjdk.x86_64) the CredentialStoreCommandTest.testGenerateKeyPairDSA test is failling with following:

      -------------------------------------------------------
       T E S T S
      -------------------------------------------------------
      OpenJDK 64-Bit Server VM warning: Ignoring option --illegal-access=permit; support was removed in 17.0
      Running org.wildfly.security.tool.CredentialStoreCommandTest
      Tests run: 29, Failures: 0, Errors: 1, Skipped: 6, Time elapsed: 2.722 sec <<< FAILURE! - in org.wildfly.security.tool.CredentialStoreCommandTest
      testGenerateKeyPairDSA(org.wildfly.security.tool.CredentialStoreCommandTest)  Time elapsed: 0.006 sec  <<< ERROR!
      java.lang.RuntimeException: org.wildfly.security.credential.store.CredentialStoreException: ELY09508: Cannot write credential to store
              at org.wildfly.security.tool.AbstractCommandTest.executeCommandAndCheckStatus(AbstractCommandTest.java:89)
              at org.wildfly.security.tool.AbstractCommandTest.executeCommandAndCheckStatus(AbstractCommandTest.java:76)
              at org.wildfly.security.tool.AbstractCommandTest.executeCommandAndCheckStatus(AbstractCommandTest.java:95)
              at org.wildfly.security.tool.CredentialStoreCommandTest.testGenerateKeyPairDSA(CredentialStoreCommandTest.java:346)
              at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
              at java.base/java.lang.reflect.Method.invoke(Method.java:580)
              at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
              at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
              at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
              at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
              at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
              at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
              at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:54)
              at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
              at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
              at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
              at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
              at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
              at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
              at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
              at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
              at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
              at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
              at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
              at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
              at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
              at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
              at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
              at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
              at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
              at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
              at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
      Caused by: org.wildfly.security.credential.store.CredentialStoreException: ELY09508: Cannot write credential to store
              at org.wildfly.security.credential.store.impl.KeyStoreCredentialStore.calculateNewAlias(KeyStoreCredentialStore.java:1056)
              at org.wildfly.security.credential.store.impl.KeyStoreCredentialStore.store(KeyStoreCredentialStore.java:390)
              at org.wildfly.security.credential.store.CredentialStore.store(CredentialStore.java:242)
              at org.wildfly.security.credential.store.CredentialStore.store(CredentialStore.java:226)
              at org.wildfly.security.tool.CredentialStoreCommand.generateKeyPair(CredentialStoreCommand.java:614)
              at org.wildfly.security.tool.CredentialStoreCommand.execute(CredentialStoreCommand.java:442)
              at org.wildfly.security.tool.AbstractCommandTest.executeCommandAndCheckStatus(AbstractCommandTest.java:87)
              ... 31 more
      Caused by: java.security.spec.InvalidParameterSpecException: Inappropriate parameter specification
              at java.base/sun.security.provider.DSAParameters.engineInit(DSAParameters.java:64)
              at java.base/java.security.AlgorithmParameters.init(AlgorithmParameters.java:293)
              at org.wildfly.security.credential.store.impl.KeyStoreCredentialStore.calculateNewAlias(KeyStoreCredentialStore.java:1053)
              ... 37 more

      Results :

      Tests in error: 
        CredentialStoreCommandTest.testGenerateKeyPairDSA:346->AbstractCommandTest.executeCommandAndCheckStatus:95->AbstractCommandTest.executeCommandAndCheckStatus:76->AbstractCommandTest.executeCommandAndCheckStatus:89 » Runtime

      Tests run: 29, Failures: 0, Errors: 1, Skipped: 6

      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  6.849 s
      [INFO] Finished at: 2024-05-29T13:39:27+02:00
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project wildfly-elytron-tool: There are test failures.
      [ERROR] 
      [ERROR] Please refer to /home/khermano/Devel/wildfly-elytron/tool/target/surefire-reports for the individual test results.
      [ERROR] -> [Help 1]
      [ERROR] 
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [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/MojoFailureException

              lvydra Lukas Vydra
              kathermanova Katarína Hermanová
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: