Download
Abstract
A NoClassDefFoundError may occur during an application deployment or update operation, even for a properly packaged application.
Download Description
PK88962 resolves the following problem:
ERROR DESCRIPTION:
When performing a partial application update for modules having dependencies on other modules, a NoClassDefFoundError exception can occur. Generation of this exception causes a warning message to be displayed, for example:
+++ Warning +++: Fri May 15 13:23:46 EDT 2009
java.lang.NoClassDefFoundError: com/ibm/commerce/content/facade/AttachmentFacade
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code))
... lines omitted from the stack ...
at org.eclipse.jem.java.impl.JavaClassImpl.getExtendedLookupIterator(JavaClassImpl.java:364)
at org.eclipse.jem.java.impl.JavaClassImpl.collectMethodsExtended(JavaClassImpl.java:236)
at org.eclipse.jem.java.impl.JavaClassImpl.getMethodsExtended(JavaClassImpl.java:533)
at org.eclipse.jem.java.impl.JavaClassImpl.listMethodExtended(JavaClassImpl.java:957)
at com.ibm.ws.management.application.client.util.getMethods(util.java:309)
at com.ibm.ws.management.application.client.EnsureMethodProtectionFor20EJBHelper.prepareTask(EnsureMethodProtectionFor20EJBHelper.java:98)
....
The key symptom is a NoClassDefFoundError and a stack showing calls through types in the "org.eclipse.jem.java" package. The exception most often includes a call to EnsureMethodProtectionFor20EJBHelper.
LOCAL FIX:
None
PROBLEM SUMMARY
* USERS AFFECTED: All users of IBM WebSphere Application Server
PROBLEM DESCRIPTION:
A NoClassDefFoundError may occur during an application deployment or update operation, even for a properly packaged application. The error can cause incomplete assignment of method protections.
RECOMMENDATION:
When this error is seen, and if method protections are important for the application deployment, two actions are recommended:
The error may be the result of an incomplete or incorrectly packaged application. The error may be the result of an incorrect class-path in application modules or support jars. To tell if the error is the result of either of these two cases, the application packaging should be reviewed and corrected, if necessary. This case can occur during application deployment, and can occur during an application update.
The error may be the result of a lack of visibility to required prerequisite classes. In particular, this error has been seen frequently when an EJB class has a super type, parameter, or exception type which is located outside of the EJB Jar module which contains the EJB class. The error results when an application operation, for example, a partial update operation, does not have visibility to the prerequisite classes. To tell if this is the case, review the application structure and note if any class dependencies extends outside of the EJB Jar module. The consequences of this case are usually missing or incomplete method protection assignments. For this case, to avoid the error, perform a full application update instead of a partial application update. As a work-around, review the deployed application and update any method protection assignments, if necessary.
Corrective actions are not necessary if method protections are not critical to the application deployment. Also, corrective actions are necessary in cases where default method protections are assigned, but should be overridden.
The error message is displayed as a result of a failure to reflect class information for a Servlet or enterprise bean class while processing application metadata. IBM WebSphere Application Server uses the Java Eclipse Model (JEM) to reflect Servlet and Java™ Enterprise Java Bean (EJB) class
information.
A failure to reflect the class information usually causes some, but not all, class information to be generated. Of several types of class information, including the inheritance tree, field, and method information, the most significant is method information. For enterprise beans, the incomplete listing of EJB methods can cause the incomplete assignment of protections to those methods.
As noted above, the error message is displayed as a result of a failure to reflect class information. The reflection of class information is performed when processing application and module metadata. Reflection is performed in three cases:
- Reflection of class information during a new application deployment.
- Reflection of class information when reviewing an existing application deployment.
- Reflection of class information when making an update to an already deployed application.
The failure can occur for several reasons:
- A corrupt Java class file will cause a failure.
- A missing Java class file will cause a failure.
- A Java class file can be missing because of an error in the packaging of the application which is being processed.
- A Java class file can be missing because of incorrect placement of utility libraries in the application, or because of incorrectly specified class-path in application modules or utility jars.
- A Java class file can be missing because it exists in a shared library, and these are not available to be loaded during application deployment.
- A Java class file can be missing because a partial update is being performed to an already deployed application. For example, when a single module is updated to an application which contains other modules or utility jars. In this case, only the files for the update are available to be loaded. A dependency of the module being updated which reaches a utility jar of the application which is not present in the update will not be visible to the update operation. The update will still attempt to process the classes of the module, and will fail because of the failure to reach the prerequisite class.
updated is available for processing.
PROBLEM CONCLUSION:
The information displayed for the error to reflect Java class information has been updated to be more appropriate for all cases:
Because the error may lead to a failure to assign method protections, a warning message is displayed in all cases. The warning provides a reference to this APAR PK88962.
Because the error also occurs in many cases where there is no consequential problem, a stack is only displayed when FINER logging is enabled for the logger "com.ibm.config.eclipse.wtp" to minimize log output in these cases,
The fix for this APAR is currently targeted for inclusion in fix packs 6.0.2.39, 6.1.0.29, and 7.0.0.9. Refer to the Recommended Updates page for delivery information: http://www.ibm.com/support/docview.wss?uid=swg27004980
Prerequisites
Download the UpdateInstaller below to install this fix.
Installation Instructions
Review the readme.txt for detailed installation instructions.
Technical Support
Contact IBM Support using SR (http://www.ibm.com/software/support/probsub.html), visit the WebSphere Application Server support web site (http://www.ibm.com/support/entry/portal/Overview/Software/WebSphere/WebSphere_Application_Server), or contact 1-800-IBM-SERV (U.S. only).
Problems (APARS) fixed
Was this topic helpful?
Document Information
Modified date:
15 June 2018
UID
swg24026612