2 Replies Latest reply on Sep 24, 2001 8:22 AM by deepshet

    no security context

    deepshet

      Hi
      Im trying to set use my own custom security module based on the databaseserverloginmodule.The user gets authenticated and the home method is called as well
      However getCallerPrinciple in the entity bean is failing with the following exception

      TRANSACTION ROLLBACK EXCEPTION:null
      Embedded Exception
      No security context set;
      nested exception is:
      javax.ejb.EJBException: null
      Embedded Exception
      No security context set
      [assethouse/assetserver/AssetHome] java.lang.IllegalStateException: No security
      context set
      [assethouse/assetserver/AssetHome] at org.jboss.ejb.EnterpriseContext$EJBCo
      ntextImpl.getCallerPrincipal(EnterpriseContext.java:248)

      anyone have any idea why this is happening?
      thanks
      deepak

        • 1. Re: no security context
          jwkaltz

          You need to also perform a client-side login with the ClientLoginModule to bind the user data to JBoss.

          See the JBoss security article at
          http://www.javaworld.com/javaworld/jw-08-2001/jw-0831-jaas.html
          on how to do this.

          • 2. Re: no security context
            deepshet

            i am doing that in client/auth.conf with the default as specified in the article. I forgot to mention that this code was written inside a jsp ..do i need to add any settings?
            also whenever i run a stand alone java application as the client the module specified in client/auth.conf gets called but the module specified in tomcat/auth.conf doesnt get called(even when i lookup the home and call a method).It always throws an error when i do a getCallerPrincpal
            any ideas?
            thanks
            deepak