CNTR0035E: EJB container caught java.lang.NoSuchFieldException
 Technote (troubleshooting)
 
Problem(Abstract)
After applying a WebSphere fixpack, an application started getting following exceptions:
[2/10/05 9:36:51:192 EST] 7c3c84 EJBContainerI I WSVR0207I: Preparing to start EJB jar: Enablement-RelationshipManagementData.jar
[2/10/05 9:36:53:738 EST] 7c3c84 BeanMetaData E CNTR0035E: EJB container caught java.lang.NoSuchFieldException
at java.lang.Class.getField0(Native Method)
at java.lang.Class.getField(Class.java:821)
at com.ibm.ejs.container.BeanMetaData.completeInitialization (BeanMetaData.java:1134)
at com.ibm.ws.runtime.component.EJBContainerImpl.createBeanMetaData (EJBContainerImpl.java:935)
at com.ibm.ws.runtime.component.EJBContainerImpl.
createModuleMetaData(EJBContainerImpl.java:761)
at com.ibm.ws.runtime.component.EJBContainerImpl.createMetaData
(EJBContainerImpl.java:1471)
at com.ibm.ws.runtime.component.MetaDataMgrImpl.createFactoryMetaData (MetaDataMgrImpl.java:115)
at com.ibm.ws.runtime.component.MetaDataMgrImpl.createMetaData
(MetaDataMgrImpl.java:159)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start (DeployedModuleImpl.java:347)

Problem went away on it's own.
 
Cause
The ACTUAL problem is a defect in the Sun JDK 1.3.1. It was not possible to create a testcase and therefore a bug report was not issued with Sun.
PQ58584 was a work-around APAR created for 4.0x but is not added as a permanent fix.
There are several reasons why the PQ work around was not in later releases of WebSphere.
The reasons we are reluctant to add this to our code permanently, are:
1. performance overhead in the try/catch block
2. this problem may occur other places within WebSphere, or within customer code if they are using the reflection API.
3. since we don't know the exact nature of the sun jdk problem, there is no guarantee that retrying only once will always work.

The stack trace itself should be sufficient to show that the error is occurring in SUN's code:
[2/10/05 9:36:53:738 E7c3c84 BeanMetaData E CNTR0035E: EJB container
caught java.lang.NoSuchFieldException at
java.lang.Class.getField0(Native Method) at
java.lang.Class.getField(Class.java:821) at
com.ibm.ejs.container.BeanMetaData.completeInitialization
(BeanMetaData.java:1134) Shows that the error is occurring in SUN code

Original code:
fields[i] = enterpriseBeanClass.getField(fieldName)

PQ58584 patched code:
try {
fields[i] = enterpriseBeanClass.getField(fieldName)
} catch (java.lang.NoSuchFieldException e) {
fields[i] = enterpriseBeanClass.getField(fieldName)
}

For example we put a try/catch block around it, and if it throws that error, we try the exact same method call again.
 
Resolving the problem
No solution provided by WebSphere.
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
Historical Number
68210
082
000
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server
Operating system(s): Solaris
Software version: 5.1
Software edition:
Reference #: 1200376
IBM Group: Software Group
Modified date: Mar 11, 2005