Use these troubleshooting tips for problems related to accessing enterprise beans.
If the client is remote to the enterprise
bean, which means, running in a different application server or as
a stand-alone client, browse the JVM logs of the application server hosting the
enterprise bean, as well as log files of the client.
If the client is remote to the enterprise bean,
which means, running in a different application server or as a stand-alone
client, browse the logs of the application server hosting the enterprise
bean, as well as log files of the client.
A possible cause of this problem is that the stateful session bean timed out and was removed by the container. This event must be addressed in the code, according to the EJB 2.1 and later specification. You can review the EJB 2.1 and 3.0 specifications at http://java.sun.com/products/ejb/docs.html.
If the exception name indicates an exception thrown by an IBM class that begins with "com.ibm...", then search for the exception name within the information center, and in the online help as described below. If "exception name" indicates an exception thrown by your application, contact the application developer to determine the cause.
A possible reason for this exception is that the enterprise bean is not local (not running in the same Java virtual machine [JVM] or application server) to the client JSP, servlet, Java application, or other enterprise bean, yet the call is to a "local" interface method of the enterprise bean . If access worked in a development environment but not when deployed to WebSphere® Application Server, for example, it might be that the enterprise bean and its client were in the same JVM in development, but are in separate processes after deployment.
To resolve this problem, contact the developer of the enterprise bean and determine whether the client call is to a method in the local interface for the enterprise bean. If so, have the client code changed to call a remote interface method, or to promote the local method into the remote interface.
References to enterprise beans with local interfaces are bound in a name space local to the server process with the URL scheme of local:. To obtain a dump of a server local: name space, use the name space dump utility described in the article "Namespace dump utility for java:, local: and server namespaces."
This problem can occur because client code, typically a servlet or JSP file, is attempting to call the same stateful SessionBean from two different client threads. This situation often results when an application stores the reference to the stateful session bean in a static variable, uses a global (static) JSP variable to refer to the stateful SessionBean reference, or stores the stateful SessionBean reference in the HTTP session object. The application then has the client browser issue a new request to the servlet or JSP file before the previous request has completed.
To resolve this problem, ask the developer of the client code to review the code for these conditions.
An enterprise bean container
creates these high-level exceptions to indicate that an enterprise
bean call did not complete. When this exception is thrown, browse the JVM logs to
determine the underlying cause.
An enterprise
bean container creates these high-level exceptions to indicate that
an enterprise bean call did not complete. When this exception is
thrown, browse the logs to determine the underlying cause.
This error can occur when a Connection object used in the bean is not closed or nulled out.
[time EDT] <ThreadID> StatefulPassi W CNTR0001W: A Stateful SessionBean could not be passivated: StatefulBeanO (BeanId(XXX#YYY.jar#ZZZZ, <ThreadID>), state = PASSIVATING) com.ibm.ejs.container.passivator.StatefulPassivator@<ThreadID> java.io.NotSerializableException: com.ibm.ws.rsadapter.jdbc.WSJdbcConnection at java.io.ObjectOutputStream.outputObject((Compiled Code)) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(Compiled Code)) at java.io.ObjectOutputStream.outputClassFields((Compiled Code)) at java.io.ObjectOutputStream.defaultWriteObject((Compiled Code)) at java.io.ObjectOutputStream.outputObject((Compiled Code)) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(Compiled Code)) at com.ibm.ejs.container.passivator.StatefulPassivator.passivate((Compiled Code)) at com.ibm.ejs.container.StatefulBeanO.passivate((Compiled Code) at com.ibm.ejs.container.activator.StatefulASActivationStrategy.atUnitOfWorkEnd ((Compiled Code)) at com.ibm.ejs.container.activator.Activator.unitOfWorkEnd((Compiled Code)) at com.ibm.ejs.container.ContainerAS.afterCompletion((Compiled Code)where XXX,YYY,ZZZ is the Bean's name, and <ThreadID> is the thread ID for that run.
StatefulPassi W CNTR0001W: A Stateful SessionBean could not be passivated: StatefulBeanO (BeanId(XXX#YYY.jar#ZZZZ), state = PASSIVATING) java.io.NotSerializableException: com.ibm.ws.rsadapter.jdbc.WSJdbcConnection at java.io.ObjectOutputStream.outputObject((Compiled Code)) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(Compiled Code)) at java.io.ObjectOutputStream.outputClassFields((Compiled Code)) at java.io.ObjectOutputStream.defaultWriteObject((Compiled Code)) at java.io.ObjectOutputStream.outputObject((Compiled Code)) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(Compiled Code)) at com.ibm.ejs.container.passivator.StatefulPassivator.passivate((Compiled Code)) at com.ibm.ejs.container.StatefulBeanO.passivate((Compiled Code) at com.ibm.ejs.container.activator.StatefulASActivationStrategy.atUnitOfWorkEnd ((Compiled Code)) at com.ibm.ejs.container.activator.Activator.unitOfWorkEnd((Compiled Code)) at com.ibm.ejs.container.ContainerAS.afterCompletion((Compiled Code)where XXX,YYY,ZZZ is the Bean's name.
To correct this problem, the application must close all connections and set the reference to null for all connections. Typically this activity is done in the ejbPassivate() method of the bean. Also, note that the bean must have code to reacquire these connections when the bean is reactivated. Otherwise, there are NullPointerExceptions when the application tries to reuse the connections.
This error can be returned to a client program when the program attempts to execute an EJB method.
Typically this problem is caused by a mismatch between the interface definition and implementation of the client and server installations, respectively.
Another possible cause is when an application server is set up to use a single class loading scheme. If an application is uninstalled while the application server remains active, the classes of the uninstalled application are still loaded in the application server. If you change the application, redeploy and reinstall it on the application server, the previously loaded classes become back level. The back level classes cause a code version mismatch between the client and the server.