Nilesh, to use the context "java:comp/env" you have to map your ejb in any descriptor. If it's a servlet trying to get the reference this is done by ejb-ref in web.xml and the corresponding tag in sun proprietary descriptor. If it's another ejb that's done in ejb-jar.xml and the sun proprietary descriptor. If you don't wanna use this, you may get the reference using the absolute name, the JNDI name, withou the subcontext "java:comp/env". For example, "ejb/MyDearEJB".