2 Replies Latest reply on Nov 26, 2002 2:31 AM by andyjeff

    No abstract accessor for field found

    k_dey

      Hi,
      I was trying to deploy CMP, I am getting the following error. I checked ejb-jar.xml, jbosscmp-jdbc.xml. I have no clue why i am getting this. Please help......

      15:32:47,908 INFO [EJBDeployer]
      Bean : LinkEJB
      Section: 10.6.2
      Warning: The entity bean class must define a set accessor for each CMP field.
      Info : Field: link_catagory

      15:32:48,028 INFO [EjbModule] Creating
      15:32:48,098 INFO [EjbModule] Deploying UserEJB
      15:32:48,148 INFO [EjbModule] Deploying UserLinkEJB
      15:32:48,198 INFO [EjbModule] Deploying LinkEJB
      15:32:48,268 INFO [EjbModule] Deploying Login
      15:32:48,408 WARN [ServiceController] Ignoring request to destroy non-existant
      service: jboss.j2ee:service=EJB,jndiName=Login
      15:32:48,418 INFO [EjbModule] Remove JSR-77 EJB Module: jboss.management.single
      :J2EEApplication= ,J2EEServer=Single,j2eeType=EJBModule,name=tecsys.jar
      15:32:48,448 ERROR [EjbModule] Initialization failed
      org.jboss.deployment.DeploymentException: No abstract accessors for field named
      'user_id' found in entity class.


      I have attached my ejbjar and jbosscmp file...Any clue or help is highly appreciated.

        • 1. Re: No abstract accessor for field found
          k_dey

          Sorry, I forgot to attach the files

          • 2. Re: No abstract accessor for field found
            andyjeff

            You have a field in your class UserEJB called "user_id", yet with CMP you need to define abstract accessor methods for all CMP fields. So you need a method like

            public abstract String getUser_id();

            and CMP will implement the method for you. Similarly you will need a method like

            public abstract void setUser_id(String user_id);

            This was not the case with EJB 1.1 but with CMP in EJB 2.0 you do it like this.

            HTH