sorry I did not see ur descriptor file Try finding bean using name " ejbUserManagment" instead of "java:comp/env/ejbUserManagement" . Also <ejb-ref> <ejb-ref-name>ejbUserManagement</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <home>com.maskina.mcstudio.model.persistance.UserManagementHome</home> <remote>com.maskina.mcstudio.model.persistance.UserManagementRemote</rem ote> </ejb-ref> does not have <ejb-link>ejbUserManagement</ejb-link> tag which will link to the ejb that u are referring to . Check this out Suhas ----- Original Message ----- From: joi <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 03, 2001 12:53 PM Subject: Problem with ejb and struts Hi! I have a problem accessing the InitialContext in the action classes. I'm using struts blank with ejb and when I lookup the ejb they cant be found! The enviroment returns an empty Context.. ..code from an Action class.. Context ctx = new InitialContext(); Object homeObject = m_ctx.lookup("java:comp/env/ejbUserManagement"); home = (UserManagementHome)PortableRemoteObject.narrow(homeObject, UserManagementHome.class); The server which I am using is Orion 1.5.2 the ejb-jar.xml should be correct but I am not sure about the Refences in Web.xml This is my web.xml.. <?xml version="1.0" encoding="ISO-8859-1"?> <!-- <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> --> <web-app> <display-name>myProject</display-name> <login-config> <auth-method>BASIC</auth-method> </login-config> <!-- Standard Action Servlet Configuration (with debugging) --> <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>application</param-name> <param-value>ApplicationResources</param-value> </init-param> <init-param> <param-name>config</param-name> <param-value>/struts-config.xml</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>2</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>2</param-value> </init-param> <init-param> <param-name>validate</param-name> <param-value>true</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> <ejb-ref> <ejb-ref-name>ejbUserManagement</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <home>com.maskina.mcstudio.model.persistance.UserManagementHome</home> <remote>com.maskina.mcstudio.model.persistance.UserManagementRemote</rem ote> </ejb-ref> <!-- Standard Action Servlet Mapping --> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> </web-app> This is my ejb-jar.xml.. <?xml version="1.0"?> <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd"> <ejb-jar> <display-name>myProject (EJB module)</display-name> <description>This is a description..</description> <enterprise-beans> <session> <description>UserManagement EJB</description> <display-name>UserManagement</display-name> <ejb-name>ejbUserManagement</ejb-name> <home>com.maskina.mcstudio.model.persistance.UserManagementHome</home> <remote>com.maskina.mcstudio.model.persistance.UserManagementRemote</rem ote> <ejb-class>com.maskina.mcstudio.model.persistance.UserManagementBean</ej b-class> <session-type>Stateless</session-type> <transaction-type>Container</transaction-type> <ejb-ref> <ejb-ref-name>ejbUser</ejb-ref-name> <ejb-ref-type>Entity</ejb-ref-type> <home>com.maskina.mcstudio.model.persistance.UserHome</home> <remote>com.maskina.mcstudio.model.persistance.UserRemote</remote> </ejb-ref> </session> <entity> <description>User EJB</description> <display-name>UserEJB</display-name> <ejb-name>ejbUser</ejb-name> <home>com.maskina.mcstudio.model.persistance.UserHome</home> <remote>com.maskina.mcstudio.model.persistance.UserRemote</remote> <ejb-class>com.maskina.mcstudio.model.persistance.UserBean</ejb-class> <persistence-type>Container</persistence-type> <prim-key-class>java.lang.Integer</prim-key-class> <reentrant>False</reentrant> <cmp-field><field-name>UserID</field-name></cmp-field> <cmp-field><field-name>Username</field-name></cmp-field> <cmp-field><field-name>Password</field-name></cmp-field> <primkey-field>UserID</primkey-field> </entity> </enterprise-beans> <assembly-descriptor> <security-role> <description>Users</description> <role-name>users</role-name> </security-role> <container-transaction> <method> <ejb-name>ejbUser</ejb-name> <method-name>*</method-name> </method> <trans-attribute>NotSupported</trans-attribute> </container-transaction> </assembly-descriptor> </ejb-jar> Kveðja Jóhann Ölvir Guðmundsson e-mail: [EMAIL PROTECTED] sími: (+354) 898-6769