4 Replies Latest reply on Jun 3, 2003 8:18 PM by vbfischer

    Failed to lookup(SRPServerInterface)

    vbfischer

      Getting the error below when I attempt to do a JAAS login for my session bean. I've included any what i think are relevant items. Any help would be appreciated:

      in login-config.xml:
      <application-policy name="budget">

      <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
      <module-option name="dsJndiName">java:/DaytonaDS</module-option>
      <module-option name="principalsQuery">select password from sys_user where username=?</module-option>
      <module-option name="rolesQuery">select userRoles, 'Roles' from user_roles where username=?</module-option>
      </login-module>

      </application-policy>

      I have verified that the java:/DaytonaDS appears to be bound using jmx-console (at least its listed there)

      login.conf:
      other {
      // Example client auth.conf for using the SRPLoginModule
      org.jboss.security.srp.jaas.SRPLoginModule required
      password-stacking="useFirstPass"
      principalClassName="org.jboss.security.SimplePrincipal"
      srpServerJndiName="SRPServerInterface"
      debug=true
      ;

      // jBoss LoginModule
      org.jboss.security.ClientLoginModule required
      password-stacking="useFirstPass"
      ;

      // Put your login modules that need jBoss here
      };

      jboss.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd">



      <unauthenticated-principal>nobody</unauthenticated-principal>
      <security-domain>java:/jaas/budget</security-domain>

      <enterprise-beans>

      <!--
      To add beans that you have deployment descriptor info for, add
      a file to your XDoclet merge directory called jboss-beans.xml that contains
      the , and <message-driven></message-driven>
      markup for those beans.
      -->


      <ejb-name>UserRole</ejb-name>
      <jndi-name>UserRoleBean</jndi-name>
      <local-jndi-name>UserRoleLocal</local-jndi-name>



      </enterprise-beans>

      <resource-managers>
      </resource-managers>




      ERROR MESSAGE:

      22:56:15,905 ERROR [SRPLoginModule] Failed to lookup(SRPServerInterface)
      javax.naming.NameNotFoundException: SRPServerInterface 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:282)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      at java.lang.Thread.run(Thread.java:536)
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
      at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)

        • 1. Re: Failed to lookup(SRPServerInterface)
          haraldgliebe

          Your login configuration should only contain the ClientLoginModule:


          login.conf:
          other {
          org.jboss.security.ClientLoginModule required
          password-stacking="useFirstPass"
          ;
          };

          Regards,
          Harald

          • 2. Re: Failed to lookup(SRPServerInterface)
            vbfischer

            Thanks. That got me further.

            Having problems still, but I think I can figure it out. Am getting this after I successfully log in, and attempt to invoke my home interface:

            java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.ServerException: EJBException:; nested exception is:
            javax.ejb.EJBException: checkSecurityAssociation; CausedByException is:
            Authentication exception, principal=
            at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)
            at sun.rmi.transport.Transport$1.run(Transport.java:148)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
            at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
            at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
            at java.lang.Thread.run(Thread.java:536)
            at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
            at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
            at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
            at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
            at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:139)
            at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:92)
            at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
            at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
            at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:175)
            at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:82)
            at $Proxy0.create(Unknown Source)
            at com.berzerkersoft.bpwweb.session.UserRoleClient.testBean(UserRoleClient.java:54)
            at com.berzerkersoft.bpwweb.session.UserRoleClient.main(UserRoleClient.java:71)

            • 3. Re: Failed to lookup(SRPServerInterface)
              haraldgliebe

              Could you try to remove the password-stacking option, like

              login.conf:
              other {
              org.jboss.security.ClientLoginModule required
              ;
              };

              Regards,
              Harald

              • 4. Re: Failed to lookup(SRPServerInterface)
                vbfischer

                Harold... You're my hero.

                If you are ever in the States, I'll buy you a beer!