PQ77865: JAVAX.NAMING.NAMENOTFOUNDEXCEPTION: NAME COMP/ENV/EJB NOT FOUND WHEN TRYING TO PERFORM A JNDI LOOKUP FROM A SERVLET. | |||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||
![]() APAR status Closed as program error. Error description The problem occurs with the following scenario. A customer has 2 ear files EAR1 and EAR2, and each ear file contains a war file WAR1 and WAR2. Each war file contains a servlet Servlet1 and Servlet2. . Servlet1 attempts to include/forward its request using a RequestDispatcher to Servlet2. . Servlet2 then attempts to perform some JNDI lookup using "java:comp/env/....". . The lookup fails with the following error message. . javax.naming.NameNotFoundException: Name comp/env/ejb not found in context "java:".Local fix 1. Packag both war files WAR1 and WAR2 within the same ear file EAR1. . 2. If both war files must remain in their own ear file, perform the JNDI lookup in the servlet init method.Problem summary **************************************************************** * USERS AFFECTED: All users of WebSphere Application Server * * version 4.0.1 for z/OS and OS/390. * **************************************************************** * PROBLEM DESCRIPTION: Customer receives * * javax.naming.NameNotFoundException: * * Name comp/env/ejb not found when * * trying to perform a JNDI lookup from * * a servlet. * **************************************************************** * RECOMMENDATION: * **************************************************************** The problem occurs with the following scenario. A customer has two ear files EAR1 and EAR2, and each ear file contains a war file WAR1 and WAR2. Each war file contains a servlet Servlet1 and Servlet2. Servlet1 attempts to include/forward its request using a RequestDispatcher to Servlet2. Servlet2 then attempts to perform some JNDI lookup using "java:comp/env/....". The lookup fails with the following error message. javax.naming.NameNotFoundException: Name comp/env/ejb not found in context "java:".Problem conclusion To fix this problem, the WebSphere Application Server code was modified to invoke through the correct RemoteWebAppBean context. APAR PQ77865 is associated with SERVICE LEVEL W401603 of WebSphere Application Server version 4.0.1 for z/OS and OS/390.Temporary fix Comments
APAR is sysrouted FROM one or more of the following: APAR is sysrouted TO one or more of the following: Modules/Macros
|
Document Information |
Product categories: Software > Application Servers >
Distributed Application & Web Servers > WebSphere Application
Server for z/OS
Operating system(s):
Software version: 401
Software edition:
Reference #: PQ77865
IBM Group: Software Group
Modified date: Nov 2, 2003
(C) Copyright IBM Corporation 2000, 2006. All Rights Reserved.