0 Replies Latest reply on Jul 9, 2003 11:39 AM by Rubens Zischler

    java.lang.ClassCastException: $Proxy40 in ejbActivate

    Rubens Zischler Newbie

      At the client I make a call to a getId method and I receive a "java.lang.ClassCastException: $Proxy40" in an ejbActivate method inside a BMP EJB.
      1. At the client :
      System.out.println("id = " + folderEJB.getId());
      2. At the EJB:
      setEntityContext(Context ctx)

      The EJB code:
      public void ejbActivate() {
      Object o = context.getPrimaryKey();
      System.out.println("Object "+o.toString());
      id = (Long)o;
      System.out.println("ejbActivate() - id->"+id);

      The error code:

      2003-07-09 16:59:39,524 INFO [STDOUT] setEntityContext(org.jboss.ejb.EntityEnterpriseContext$EntityContextImpl@56a9)
      2003-07-09 16:59:39,524 INFO [STDOUT] ejbActivate()
      2003-07-09 16:59:39,524 INFO [STDOUT] class $Proxy40
      2003-07-09 16:59:39,524 INFO [STDOUT] Object Folder:849
      2003-07-09 16:59:39,524 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] Activation failure
      javax.ejb.EJBException: null; CausedByException is:
      void org.jboss.ejb.plugins.BMPPersistenceManager.activateEntity(org.jboss.ejb.EntityEnterpriseContext)

      What is wrong?