|
Problem |
The application Server SystemOut.log shows a naming
exception similar to this example exception:
[6/28/04 13:54:09:646 EDT] 56c6a8e9 ExceptionUtil E CNTR0020E:
Non-application
exception occurred while processing method "getObjectType" on bean
"BeanId(qlink#qlt-pof3.jar#qlink_POFObjectManagerEJB, null)". Exception
data:
javax.ejb.EJBException: nested exception is:
javax.naming.NameNotFoundException:
Name "comp/env/ejb/POFSchemaManagerLocal" not found in context "java:".
javax.naming.NameNotFoundException: Name
"comp/env/ejb/POFSchemaManagerLocal"
not found in context "java:". |
|
Cause |
The top level cause is that the name, in this case
"comp/env/ejb/POFSchemaManagerLocal", has not been bound by the name
server. The application is doing an indirect lookup, that for this
example, looks like the following:
c = new InitialContext();
Object o = c.lookup
("java:comp/env/ejb/POFSchemaManagerLocal"); |
The form of this lookup is indirect due to the syntax "java:comp/env".
Indirect lookups have special requirements in order that the JNDI name is
properly bound.
The root cause of the failure of this missing name can be one of the
following causes:
- The EJB reference or local EJB reference is missing.
- The name binding for the EJB reference or local EJB reference is
missing
This specific example is concerning a failure to lookup and EJB Local
Home interface, but , in general, the same failure can occur for indirect
lookups on J2EE resources such as data sources. |
|
Solution |
References, whether EJB References or Resource References,
are contained in the application module deployment descriptors. Any J2EE
compliant deployment tool can create these references in the deployment
descriptors.
- WebSphere Application Server Version 5.0 and prior
versions use the Application Assembly Tool (AAT). See this article for
more information on using AAT to configure EJB references and resource
references:
JNDI_Naming/swg21106933.html
- WebSphere Application Server Version 5.0.2 and later use
the Assembly Toolkit (also known as Application Server Toolkit). To find
more information on how to create references, start the Help viewer under
Help >Help Contents. Then search for the article "Adding
references to enterprise beans".
Name bindings are specific to the vendor platform. This means that only
WebSphere Application Server tools are able to create WebSphere name
bindings. You have several choices in how you configure name bindings:
- The Assembly Toolkit can create name bindings for EJB
references and resource references. Refer to the instructions on how to
create references for the Assembly Toolkit above. The References screen of
the deployment descriptor editor has a subsection titled WebSphere
Bindings where you specify the JNDI name that you wish to bind to that
reference.
- The Application Installation Wizard in the administration
console can create name bindings for both EJB references and resource
references.
|
|
|
|
Cross Reference information |
Segment |
Product |
Component |
Platform |
Version |
Edition |
Application Servers |
Runtimes for Java Technology |
Java SDK |
|
|
|
|
|
|
|