ClassCastException: org.omg.stub.javax.ejb._EJBObject_Stub

  • Share
  • Share

Applies to:
Websphere 4.0
Linux

Description:
This exception is thrown when the Enumeration object returned by a finder method is accessed.

Cause:
org.omg.stub.javax.ejb._EJBObject_Stub cannot implement an Account resulted from using a simple Java cast.

JAVA-EJB , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

  1. admin
    March 9th, 2009 at 18:22 | #1

    Use PortableRemoteObject.narrow() to downcast the remote reference of the Enumerator as follows:
    Account = (Account)PortableRemoteObject.narrow(e.nextElement(), Account.class);

  1. No trackbacks yet.