5 Replies Latest reply on Feb 19, 2002 10:01 AM by Alireza BANAEI

    CMP 2.0 issue with EJBLocalObject in JBoss 3.0 alpha

    ppetit Newbie

      I try to deploy an Entity bean conforming to EJB 2.0 in JBoss 3.0 alpha and get this error message at deployment time :

      org.jboss.ejb.DeploymentException: Could not find matching method for public abstract void javax.ejb.EJBLocalObject.remo
      ve() throws javax.ejb.RemoveException,javax.ejb.EJBException, Cause: java.lang.NoSuchMethodException

      here is snippet of code :
      public abstract class Sejour_EBean implements EntityBean
      // Log4j - Define a static category variable so that it references the
      static Category cat = Category.getInstance(Sejour_EBean.class);
      transient private EntityContext ctx;

      public Sejour_EBean(){}

      // container-managed persistent fields
      public abstract Integer getId();
      public abstract void setId( Integer _Id );
      // EJB required methods __________________________________________________________
      public void setEntityContext(EntityContext ctx) { this.ctx = ctx; }

      public void unsetEntityContext() { ctx = null; }
      public Integer ejbCreate( Integer Id )
      cat.info("ejbCreate() called");
      setId( Id );
      return Id;
      public void ejbPostCreate()
      cat.info("ejbPostCreate() called");
      public void ejbActivate()
      cat.info( "Activate" );
      public void ejbPassivate()
      cat.info( "Passivate" );
      public void ejbLoad()
      cat.info( "Load" );
      public void ejbStore()
      cat.info( "Store" );
      public void ejbRemove()
      cat.info( "Remove" );

      here is code of the local interface :
      public interface Sejour extends EJBLocalObject
      public Integer getId() throws RemoteException;
      public void setId( Integer _Id ) throws RemoteException;

      and the local home interface code :
      public interface Sejour_Home extends javax.ejb.EJBLocalHome
      Create a new Sejour instance
      public Sejour create( Integer Id ) throws RemoteException, CreateException;

      Am'I missing something or is this a known bug?

        • 1. Re: CMP 2.0 issue with EJBLocalObject in JBoss 3.0 alpha
          Dain Sundstrom Master

          You need to post your ejb-jar.xml file (just the revelent portions), and more of the log message. My guess is that you do not have the correct DOCTYPE in your ejb-jar.xml file. JBossCMP only loads if you use the EJB 2.0 doctype.

          • 2. Re: CMP 2.0 issue with EJBLocalObject in JBoss 3.0 alpha
            ppetit Newbie

            here is the header of my ejb-jar.xml file :

            <?xml version="1.0" encoding="ISO-8859-1"?>

            <!-- Activation CMP 2.0 -->
            <!DOCTYPE ejb-jar PUBLIC
            "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"


            and here is the relevant par of the concerned EJB (the only one extending EJBLocalObject):

            <!-- ============================================================== -->
            <!-- Entity & Session Bean Sejour -->
            <!-- ============================================================== -->

            Models a Sejour collection

            <!-- Declare a security role called ADMINISTRATOR -->

            Cet entity bean sert a la gestion des Sejours et de leurs prestations


            <!-- new effet inconnu, pour workaround d'un bug de JBoss (marche pas ) -->

            <!-- cmp-version must be '1.x' or '2.x', if specified -->



            many thanks for your help and the great job already done !

            • 3. Re: CMP 2.0 issue with EJBLocalObject in JBoss 3.0 alpha
              ppetit Newbie

              here is a zip of the server log file at startup

              regards Philippe

              • 5. Re: CMP 2.0 issue with EJBLocalObject in JBoss 3.0 alpha
                Alireza BANAEI Newbie

                Great! Good for you. I appreciate if you could share your finding with the rest of the JBoss community. I have the same probleme and am looking for a solution.

                Thanks in advance