1 Reply Latest reply on Feb 15, 2007 8:55 AM by jaikiran

    Problm while calling EJB

    murthy_j2ee

      Hi Everybody,
      I am new to deploy EJB in JBOSS Application Server. I am succeeded to run configur JAAS in my JBOSS and abeled to run

      it successfully. I have created my own Login Module and abled to authenticate it successfully by retreving the username and

      password from database using. Now i want to call an ejb from login module instead of calling database directly. When i am

      calling the Remote Ejb to get the instance of EjbBean i am getting the exception like Insufficient method permissions,

      principal=null, ejbName=UserAuthentication_Session, method=create, interface=HOME, requiredRoles=[], principalRoles=[]

      Here is the configurations in xml files....

      ejb-jar.xml


      <ejb-jar >
      <enterprise-beans>

      UserAuthentication_Session
      <ejb-name>UserAuthentication_Session</ejb-name>
      com.prospecta.WSOProject.User_Authentication.ejb.UserAuthentication_SessionHome
      com.prospecta.WSOProject.User_Authentication.ejb.UserAuthentication_Session
      <ejb-class>com.prospecta.WSOProject.User_Authentication.ejb.UserAuthentication_SessionBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Bean</transaction-type>

      </enterprise-beans>
      </ejb-jar>
      -----------------------------------------
      jboss-web.xml

      <jboss-web>
      <ejb-ref>
      <ejb-ref-name>UserAuthentication_Session</ejb-ref-name>
      <jndi-name>UserAuthentication_Session</jndi-name>
      </ejb-ref>
      </jboss-web>
      --------------------------------------
      jboss.xml



      <enterprise-beans>


      <ejb-name>UserAuthentication_Session</ejb-name>
      <jndi-name>UserAuthentication_Session</jndi-name>


      </enterprise-beans>

      <resource-managers>
      </resource-managers>


      ---------------------------------------------------
      web.xml

      <web-app>
      <ejb-ref>
      <ejb-ref-name>UserAuthentication_Session</ejb-ref-name>
      <ejb-ref-type>This is SESSION </ejb-ref-type>
      com.prospecta.WSOProject.User_Authentication.ejb.UserAuthentication_SessionHome
      com.prospecta.WSOProject.User_Authentication.ejb.UserAuthentication_Session
      <ejb-link>UserAuthentication_Session</ejb-link>
      </ejb-ref>
      </web-app>

        • 1. Re: Problm while calling EJB
          jaikiran

          I guess you have secured the bean and are trying to access it even before the user has logged in. Removing the security constraints on this bean (or atleast the method of the bean which you are calling) should get it working.