|
Problem |
The Java™ 2 Platform, Enterprise Edition (J2EE™) allows
EJB™ modules to depend on classes that are external to the EJB code (such
as, utility classes). The external classes must be included in the EAR
file and the manifest for the EJB module must specify the Class-Path for
the dependent classes so that the EJB module classloader can find
them. |
|
Cause |
For example, assume the following:
- An Enterprise Application called MyApp.ear
- An EJB Module called MyEJB.jar
- EJB dependent classes stored in common.jar
- Common.jar is contained in MyApp.ear
- MyEJB.jar manifest includes common.jar on its
Class-Path
When the MyApp.ear Enterprise Application is installed, the
directories for the installed application are as follows:
install_root/installedApps/MyApp.ear/common.jar
install_root/installedApps/MyApp.ear/MyEJB.jar |
The contents of MyEJB.jar include the implementation of the EJBs
in the EJB module and a manifest for the module. The manifest is stored in
the MyEJB.jar as the following:
and its contents are the following:
Manifest-Version: 1.0
Class-Path: common.jar |
Given the contents of META-INF/MANIFEST.MF on the EJB module, the
Class-Path, common.jar, is searchable on the EJB module's
classloader.
The problem is that WebSphere Application Server V4.0.1 and V4.0.2 do not
include the Class-Path from the manifest on the EJB module's classpath.
This problem prevents the EJB module's classloader from finding any
classes that are available on the EJB module's manifest Class-Path. |
|
Solution |
The problem has been fixed in WebSphere
Application Server V4.0.3.
If you cannot upgrade to WebSphere Application Server V4.0.3, you can
work around this problem in one of the following ways:
- Place the EJB dependent classes on the Runtime Extensions
classpath, which is install_root/lib/ext.
- Place the EJB dependent classes on the Application
Extensions classpath, which is
install_root/lib/app.
- Place the EJB dependent classes on an application server
classpath by using the -classpath JVM™ command line option.
For more information, see section 6.4.1 Setting
classpaths in the WebSphere Application Server V4.0 Information
Center. |
|
|