Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-21965

(7.4.0) ClassCastException: org.wildfly.extension.elytron.LdapKeyStoreService incompatible with org.wildfly.extension.elytron.KeyStoreService while executing CLI command

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 7.4.0.CR2, 7.4.0.GA
    • 7.4.0.GA.CR1
    • Security
    • None

      We hit a regression in our tests, where we are running following commands to setup a testcase:

      /subsystem=elytron/dir-context=ldapDirContext-LdapKeyStoreTestCase:add(url=ldap://localhost:10389, principal="uid=admin,ou=system", credential-reference={clear-text => secret})
      
      /subsystem=elytron/ldap-key-store=ldapKeyStore-LdapKeyStoreTestCase:add(dir-context=ldapDirContext-LdapKeyStoreTestCase, search-path="ou=Keystore,o=LdapKeyStoreTestCase8d061d47,o=primary,dc=jboss,dc=org", filter-alias="(&(objectClass=inetOrgPerson)(cn={0}))", filter-certificate="(&(objectClass=inetOrgPerson)(usercertificate={0}))", filter-iterate="(objectClass=inetOrgPerson)")
      
      /subsystem=elytron/key-manager=keyManager-LdapKeyStoreTestCase:add(key-store=ldapKeyStore-LdapKeyStoreTestCase, credential-reference={clear-text => Elytron}, algorithm=SunX509)
      

      This worked fine up until recently when exception is now thrown:

      23:50:28,536 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service org.wildfly.security.key-manager.keyManager-LdapKeyStoreTestCase: org.jboss.msc.service.StartException in service org.wildfly.security.key-manager.keyManager-LdapKeyStoreTestCase: Failed to start service
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1731)
      	at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
      	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.ClassCastException: org.wildfly.extension.elytron.LdapKeyStoreService cannot be cast to org.wildfly.extension.elytron.KeyStoreService
      	at org.wildfly.extension.elytron.SSLDefinitions$1.lambda$getValueSupplier$0(SSLDefinitions.java:594)
      	at org.wildfly.extension.elytron.TrivialService.start(TrivialService.java:53)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
      	... 6 more
      
      23:50:28,540 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 2) WFLYCTL0013: Operation ("add") failed - address: ([
          ("subsystem" => "elytron"),
          ("key-manager" => "keyManager-LdapKeyStoreTestCase")
      ]) - failure description: {"WFLYCTL0080: Failed services" => {"org.wildfly.security.key-manager.keyManager-LdapKeyStoreTestCase" => "Failed to start service
          Caused by: java.lang.ClassCastException: org.wildfly.extension.elytron.LdapKeyStoreService cannot be cast to org.wildfly.extension.elytron.KeyStoreService"}}
      

            fjuma1@redhat.com Farah Juma
            jbliznak@redhat.com Jan Blizňák
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: