1 Reply Latest reply on Apr 30, 2014 7:41 AM by 1039334

    Custom Authenticator provider in weblogic gives exception: Caused By: com.bea.common.engine.SecurityServiceRuntimeException: [Security:097534]Failed to obtain an instance

    1039334

      Hi All,

       

      I am implementing a Custom Authenticator Provider in weblogic. I followed the below steps for this:

       

      1. Created an MBean Definition File (MDF). with commo.dtd in the same path.

      2. Used the WebLogic MBeanMaker to Generate the MBean Type classes using below command.

          java -DMDF=xmlfile -Dfiles=filesdir -DcreateStubs=true weblogic.management.commo.WebLogicMBeanMaker

      3. Implemented the providerImpl and LoginModule classes.

      4. Used the WebLogic MBeanMaker to Create the MBean JAR File (MJF) using the command.

           java -DMJF=jarfile -Dfiles=filesdir weblogic.management.commo.WebLogicMBeanMaker

      5. Placed the created jar in 'WL_HOME\server\lib\mbeantypes' location.

      6. Restarted the admin server and configured the new aunthentication provider through admin console.

       

      After adding the provider, it asks for restart. The admin server fails to restart with this exception:-



      Error> <Security> <BEA-090870> <The realm "myrealm" failed to be loaded: weblogic.security.service.SecurityServiceException: com.bea.common.engine.ServiceInitializationException: com.bea.common.engine.SecurityServiceRuntimeException: [Security:097

      1. weblogic.security.service.SecurityServiceException: com.bea.common.engine.ServiceInitializationException: com.bea.common.engine.SecurityServiceRuntimeException: [Security:097534]Failed to obtain an instance of class com.security.provider.CustomAuthenticatorImpl.

             at weblogic.security.service.CSSWLSDelegateImpl.initializeServiceEngine(CSSWLSDelegateImpl.java:341)

             at weblogic.security.service.CSSWLSDelegateImpl.initialize(CSSWLSDelegateImpl.java:220)

             at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.InitializeServiceEngine(CommonSecurityServiceManagerDelegateImpl.java:1785)

             at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initializeRealm(CommonSecurityServiceManagerDelegateImpl.java:442)

             at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.loadRealm(CommonSecurityServiceManagerDelegateImpl.java:840)

              Truncated. see log file for complete stacktrace

      Caused By: com.bea.common.engine.ServiceInitializationException: com.bea.common.engine.SecurityServiceRuntimeException: [Security:097534]Failed to obtain an instance of class com.security.provider.CustomAuthenticatorImpl.

              at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:365)

              at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:315)

              at com.bea.common.engine.internal.ServiceEngineImpl.lookupService(ServiceEngineImpl.java:257)

              at com.bea.common.engine.internal.ServicesImpl.getService(ServicesImpl.java:72)

              at weblogic.security.service.internal.WLSIdentityServiceImpl.initialize(WLSIdentityServiceImpl.java:46)

              Truncated. see log file for complete stacktrace

      Caused By: com.bea.common.engine.SecurityServiceRuntimeException: [Security:097534]Failed to obtain an instance of class com.security.provider.CustomAuthenticatorImpl.

              at com.bea.common.security.internal.legacy.service.SecurityProviderImpl.init(SecurityProviderImpl.java:52)

              at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:363)

              at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:315)

              at com.bea.common.engine.internal.ServiceEngineImpl.lookupService(ServiceEngineImpl.java:257)

              at com.bea.common.engine.internal.ServicesImpl.getService(ServicesImpl.java:72)

              Truncated. see log file for complete stacktrace

      Caused By: java.lang.InstantiationException: com.security.provider.CustomAuthenticatorImpl

              at java.lang.Class.newInstance0(Class.java:342)

              at java.lang.Class.newInstance(Class.java:310)

              at com.bea.common.security.internal.legacy.service.SecurityProviderImpl.init(SecurityProviderImpl.java:46)

              at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:363)

              at com.bea.common.engine.internal.ServiceEngineImpl.findOrStartService(ServiceEngineImpl.java:315)

              Truncated. see log file for complete stacktrace

       

       

       

      Can anyone please guide if i am missing any steps? I also tried adding the jar in classpath and DOMAIN_HOME/lib folder.

      I tried the same steps with different implementations/different jars. Same exception comes on the restart after configuring the provider through console.

       

      Thanks in advance.

       

      Regards,

      Siphy P.