PQ77865: JAVAX.NAMING.NAMENOTFOUNDEXCEPTION: NAME COMP/ENV/EJB NOT FOUND WHEN TRYING TO PERFORM A JNDI LOOKUP FROM A SERVLET.

 A fix may be available

Obtain the fix for this APAR



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 information
APAR number PQ77865
Reported component name WEBSPHERE OS/39
Reported component ID 5655A9800
Reported release 401
Status CLOSED PER
PE NoPE
HIPER NoHIPER
Submitted date 2003-08-27
Closed date 2003-10-09
Last modified date 2003-11-02

APAR is sysrouted FROM one or more of the following:

APAR is sysrouted TO one or more of the following:

Modules/Macros
EJSJPIWA EJSJWBJR EJSJWCSC EJSJWCWC    

Fix information
Fixed component name WEBSPHERE OS/39
Fixed component ID 5655A9800

Applicable component levels
R401 PSY UQ80970    UP03/10/14 P F310

  Fix is available
Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.


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