Discussions

General J2EE: NamingException: Lookup error:

  1. NamingException: Lookup error: (3 messages)

    Hi all i'm getting the following exception when trying to access a ejb from a stand alone java client.
    Ejb is deployed in ora-10g plz help me ...
    What permission shd i give for the user inorder to access the EJB ?

    NamingException: Lookup error: javax.naming.NoPermissionException: Not allowed t
    o look up java:comp/LoginBean, check the namespace-access tag setting in orion-a
    pplication.xml for details; nested exception is:
            javax.naming.NoPermissionException: Not allowed to look up java:comp/Log
    inBean, check the namespace-access tag setting in orion-application.xml for deta
    ils

    Threaded Messages (3)

  2. NamingException: Lookup error:[ Go to top ]

    Can't help much on this, except point you to Oracle Application Server Container for J2EE Security Guide:

    http://www.tju.cn/docs/oas90400/web.904/b10325/toc.htm
  3. well[ Go to top ]

    i dont know much about oracle but usually

    the java:/ name space is for components on the server

    the / "empty" name space is for everyone

    and the java:comp name space represents the component name space

    remote ejbs sould use the "/" empty namespace in order to be accessed from remote
  4. NamingException: Lookup error:[ Go to top ]

    Hi Srini,

    Which user are you looking up the EJB as and have you setup any permissions for the ejbs as follows in the ejb-jar.xml?

     <security-role>
         <role-name>BeanUsers</role-name>
        </security-role>
        <method-permission>
          <role-name>BeanUsers</role-name>
          <method>
            <ejb-name>SystemTimeSLSB</ejb-name>
            <method-name>*</method-name>
          </method>
        </method-permission>
      </assembly-descriptor>


    Make sure that your user is in the group that is mapped to the role. The role to groups mapping are done in orion-ejb-jar.xml as follows:

    <assembly-descriptor>
        <security-role-mapping name="BeanUsers">
          <group name="systimeBeanUsers" />
        </security-role-mapping>
      </assembly-descriptor>


    And the security provider either JAZN-XML or LDAP is defined in the orion-application.xml.

    Can you try accessing the ejb as admin user and see whether you can invoke the EJB ?

    For details you can see this how to http://www.oracle.com/technology/tech/java/oc4j/htdocs/how-to-security-JAAS.html

    regards
    Debu Panda
    http://radio.weblogs.com/0135826/