1 Reply Latest reply on Jul 19, 2002 8:26 AM by Peter Hall

    Multi finder methods on BMP EJBs JBoss 3.0.0

    Peter Hall Newbie

      I've got a set of BMP EJB's on Jboss3.0.0. I have a finder that looks like:

      public class AllocationBean
      {
      ...

      public List ejbFindByBlockId(Integer blockId) throws FinderException
      {
      // do some sql, pull out results....
      for(int i = 0; i < result.size(); ++i)
      {
      AllocationHome home = (AllocationHome)context.getEJBHome();
      Allocation alloc = home.findByPrimaryKey((AlloocationPK)result.get(i));
      ret.add(alloc);
      }

      return ret;



      All is well, until a client uses a business method on one of the remote objects from the list.
      The following exception is then thrown:

      -----------------------
      java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
      java.rmi.ServerException: null
      Embedded Exception
      $Proxy34; nested exception is:
      javax.ejb.EJBException: null
      Embedded Exception
      $Proxy34
      java.rmi.ServerException: null
      Embedded Exception
      $Proxy34; nested exception is:
      javax.ejb.EJBException: null
      Embedded Exception
      $Proxy34
      javax.ejb.EJBException: null
      Embedded Exception
      $Proxy34
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
      at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
      at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:128)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:108)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
      at org.jboss.proxy.ejb.EntityInterceptor.invoke(EntityInterceptor.java:116)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      at $Proxy3.getData(Unknown Source)
      at com.nomura.uk.etc.client.WebInterfaceTest.findByBlockId(WebInterfaceTest.java:204)
      at com.nomura.uk.etc.client.WebInterfaceTest.main(WebInterfaceTest.java:130)
      java.lang.ClassCastException: $Proxy34
      <<no stack trace available>>
      -----------------------


      Anyone got any ideas?

      regards,

      HJ