1 Reply Latest reply on Oct 8, 2004 11:43 AM by Scott Stark

    SrpLogin - binding problem on deployment

    dozedoff Newbie

      I implemented Srp login accessing a db for the username/password, and when I deployed my application jar containg the sar file, I get the following error:

      javax.naming.NameNotFoundException: srp-test not bound

      Any idea on how to troubleshoot this? Please advice. Thanks.


      jboss-service.xml

       <!-- SRP -->
       <mbean code="org.jboss.security.srp.SRPService"
       name="ArgonSecurity:service=SRPService">
       <attribute name="VerifierSourceJndiName">srp-test/ArgonVerifierStore</attribute>
       <attribute name="JndiName">srp-test/SRPServerInterface</attribute>
       <attribute name="AuthenticationCacheJndiName">srp-test/AuthenticationCache</attribute>
       <depends>ArgonSecurity:service=SRPDatabaseVerifierStoreService</depends>
       </mbean>
      
       <mbean code="com.discorp.argon.security.srp.jaas.SRPDatabaseVerifierStoreService"
       name="ArgonSecurity:service=SRPDatabaseVerifierStoreService">
       <attribute name="JndiName">srp-test/ArgonVerifierStore</attribute>
       <attribute name="DsJndiName">TestEJBDS</attribute>
       <attribute name="PasswordQuery">
       SELECT TRIM(password) FROM users WHERE username=?
       </attribute>
       </mbean>
      



      login-config.xml:

       <application-policy name = "TestEJB">
       <authentication>
       <login-module code = "org.jboss.security.srp.jaas.SRPCacheLoginModule"
       flag = "required">
       <module-option name = "cacheJndiName">srp-test/AuthenticationCache</module-option>
       </login-module>
       <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
       flag = "required">
       <module-option name = "password-stacking">useFirstPass</module-option>
       <module-option name = "dsJndiName">TestEJBDS</module-option>
       <module-option name = "principalsQuery">select Password from Principals where PrincipalID=?</module-option>
       <module-option name = "rolesQuery">select Role, RoleGroup from Roles where PrincipalID=?</module-option>
       </login-module>
       </authentication>
       </application-policy>
      



      Log file:

      2004-10-04 13:23:53,871 DEBUG [org.jboss.system.ServiceController] starting service ArgonSecurity:service=SRPService
      2004-10-04 13:23:53,871 DEBUG [org.jboss.system.ServiceController] waiting in start ArgonSecurity:service=SRPService on ArgonSecurity:service=SRPDatabaseVerifierStoreService
      2004-10-04 13:23:53,871 DEBUG [org.jboss.system.ServiceController] starting service ArgonSecurity:service=SRPDatabaseVerifierStoreService
      2004-10-04 13:23:53,871 DEBUG [com.discorp.argon.security.srp.jaas.SRPDatabaseVerifierStoreService] Starting ArgonSecurity:service=SRPDatabaseVerifierStoreService
      2004-10-04 13:23:53,871 DEBUG [com.discorp.argon.security.srp.jaas.SRPDatabaseVerifierStoreService] Started ArgonSecurity:service=SRPDatabaseVerifierStoreService
      2004-10-04 13:23:53,871 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: ArgonSecurity:service=SRPDatabaseVerifierStoreService dependent components: [ObjectName: ArgonSecurity:service=SRPService
      state: CREATED
      I Depend On: ArgonSecurity:service=SRPDatabaseVerifierStoreService

      Depends On Me: ]
      2004-10-04 13:23:53,871 DEBUG [org.jboss.system.ServiceController] starting service ArgonSecurity:service=SRPService
      2004-10-04 13:23:53,871 DEBUG [org.jboss.security.srp.SRPService] Starting ArgonSecurity:service=SRPService
      2004-10-04 13:23:53,871 ERROR [org.jboss.security.srp.SRPService] Starting failed ArgonSecurity:service=SRPService
      javax.naming.NameNotFoundException: srp-test not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:253)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:529)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:508)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at org.jboss.security.srp.SRPService.loadStore(SRPService.java:367)
      at org.jboss.security.srp.SRPService.startService(SRPService.java:303)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
      at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:416)
      at org.jboss.system.ServiceController.start(ServiceController.java:438)
      at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:927)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
      at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy8.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:463)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:215)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:194)
      2004-10-04 13:23:53,871 WARN [org.jboss.system.ServiceController] Problem starting service ArgonSecurity:service=SRPService
      javax.naming.NameNotFoundException: srp-test not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:253)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:529)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:508)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at org.jboss.security.srp.SRPService.loadStore(SRPService.java:367)
      at org.jboss.security.srp.SRPService.startService(SRPService.java:303)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
      at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:416)
      at org.jboss.system.ServiceController.start(ServiceController.java:438)
      at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:927)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
      at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy8.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:463)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:215)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:194)
      2004-10-04 13:23:53,980 DEBUG [org.jboss.deployment.MainDeployer] End deployment start on package: TestEJB.sar