Exception when creat() or findBy() BMP entity bean

Discussions

EJB programming & troubleshooting: Exception when creat() or findBy() BMP entity bean

  1. I deployed a Bean Managed Persistence entity bean on J2EE server and it passed the verification. The client sucessfully got the Home Object. Then the client called create(...) or findBy...(...) method on the Home Object.
    From what I traced within the bean, the correspondent ejbCreate(...) or ejbFindBy...(...) method in the bean was called and executed as expected and the return statement was reached. After that it watied for several minutes
    before the J2EE server was killed and the client got the following Exception.

    java.lang.NullPointerException
     at
    com.sun.corba.ee.internal.POA.GenericPOAClientSC.receivedReply(GenericPOAClientSC.java:432)
     at
    com.sun.corba.ee.internal.POA.GenericPOAClientSC.releaseReply(GenericPOAClientSC.java:345)
     at
    com.sun.corba.ee.internal.POA.GenericPOAClientSC.invoke(GenericPOAClientSC.java:228)
     at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:294)
     at _AccountHome_Stub.findByOwnerName(Unknown Source)
     at AccountClient.main(AccountClient.java:15)

    I'm using NT 4.0 worksation, Sun's RI J2EE server, J2SDK 1.3




  2. I had the same problem, my solution was that the rows that met the criteria of my fine were locked up by another application. I had a SQL Navigator session where I was manipulating my data, and I forgot to commit. Hope this works for you.
  3. Thanks for the help.
    I still can't get it work. When the bean finished the ejbFindBy...(...) method, it reached the return (Enumeration) statement. After that the client just wait for several minutes before it get the following Exception:

    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.RemoteException: Exception creating EJBObject: ; nested exception is:
    java.lang.RuntimeException: Unable to create reference java.lang.ClassCastException
    java.rmi.RemoteException: Exception creating EJBObject: ; nested exception is:
    java.lang.RuntimeException: Unable to create reference java.lang.ClassCastException
    java.lang.RuntimeException: Unable to create reference java.lang.ClassCastException
    <