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

CredentialStore, set own security provider through java security config file leads to NoClassDefFoundError for custom implementation class

XMLWordPrintable

    • Hide
      • copy jar file to YOUR_JDK_HOME/jre/lib/ext
      • open configuration file YOUR_JDK_HOME/jre/lib/security/java.security and add there
      • security.provider.10=org.wildfly.security.test.CustomElytronProvider to section of security providers. Please replace number 10 to applicable.
      • Try to start EAP - ./bin/standalone.sh
        You can see this error message
        Exception in thread "main" java.lang.NoClassDefFoundError: org/wildfly/security/test/CustomCredentialStore
                at org.wildfly.security.test.CustomElytronProvider.putCustomCredentialStoreProviderImplementations(CustomElytronProvider.java:48)
                at org.wildfly.security.test.CustomElytronProvider.<init>(CustomElytronProvider.java:42)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
                at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
                at java.lang.Class.newInstance(Class.java:442)
                at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:221)
                at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:206)
                at java.security.AccessController.doPrivileged(Native Method)
                at sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:206)
                at sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:187)
                at sun.security.jca.ProviderList.loadAll(ProviderList.java:282)
                at sun.security.jca.ProviderList.removeInvalid(ProviderList.java:299)
                at sun.security.jca.Providers.getFullProviderList(Providers.java:173)
                at java.security.Security.insertProviderAt(Security.java:360)
                at java.security.Security.addProvider(Security.java:403)
                at org.jboss.modules.Main.lambda$main$0(Main.java:503)
                at java.security.AccessController.doPrivileged(Native Method)
                at org.jboss.modules.Main.main(Main.java:502)
        
      Show
      copy jar file to YOUR_JDK_HOME/jre/lib/ext open configuration file YOUR_JDK_HOME/jre/lib/security/java.security and add there security.provider.10=org.wildfly.security.test.CustomElytronProvider to section of security providers. Please replace number 10 to applicable. Try to start EAP - ./bin/standalone.sh You can see this error message Exception in thread "main" java.lang.NoClassDefFoundError: org/wildfly/security/test/CustomCredentialStore at org.wildfly.security.test.CustomElytronProvider.putCustomCredentialStoreProviderImplementations(CustomElytronProvider.java:48) at org.wildfly.security.test.CustomElytronProvider.<init>(CustomElytronProvider.java:42) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at java.lang. Class .newInstance( Class .java:442) at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:221) at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:206) at java.security.AccessController.doPrivileged(Native Method) at sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:206) at sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:187) at sun.security.jca.ProviderList.loadAll(ProviderList.java:282) at sun.security.jca.ProviderList.removeInvalid(ProviderList.java:299) at sun.security.jca.Providers.getFullProviderList(Providers.java:173) at java.security.Security.insertProviderAt(Security.java:360) at java.security.Security.addProvider(Security.java:403) at org.jboss.modules.Main.lambda$main$0(Main.java:503) at java.security.AccessController.doPrivileged(Native Method) at org.jboss.modules.Main.main(Main.java:502)

      When I want to define own Custom Elytron Provider through modification of Java security provider configuration I got exception about NoClassDefFoundError on CustomImplementation class. But this class is located in same jar file as Custom Elytron Provider.

      I need it to define provider-name in credential-store. Is there some additional step which I missed?

      Jar file is attached and it is same one as here https://issues.jboss.org/browse/JBEAP-8238 from pskopek@redhat.com

              Unassigned Unassigned
              hsvabek_jira Hynek Švábek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: