4 Replies Latest reply on Mar 6, 2002 8:55 AM by adrian.brock

    Problem Deploying Entity Bean on JBoss 3.0

    g_babu

      Hello,
      I tried to deploy my CMP entity bean. I get the following warning. Has anyone been thro similar problem. Any help appreciated. In the ejb jar file, I have set the version like this,

      <cmp-version>2.x</cmp-version>

      *** Output from Server starts here***
      Bean : KeyEntityBean
      Section: 9.2.2
      Warning: The entity bean class must not be defined as abstract.

      [16:33:59,028,ContainerFactory]
      Bean : KeyEntityBean
      Section: 9.2.2
      Warning: The entity bean class must define a public constructor that takes no arguments.

      [16:33:59,099,ContainerFactory]
      Bean : KeyEntityBean
      Section: 9.4.7.1
      Warning: The primkey-field element must name a public field in the bean implementation class.

      Thanks
      Ganesh

        • 1. Re: Problem Deploying Entity Bean on JBoss 3.0
          pazu

          Have you defined the correct DTD on the deployment descriptor? You need

          <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
           "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
          


          on top of your deployment descriptor.

          • 2. Re: Problem Deploying Entity Bean on JBoss 3.0
            g_babu

            Salvador,
            Thank You. That fixed my problem.

            It is part of COPY-PASTE Syndrome. Ofcourse when you copy and paste you features and bugs too!
            Ganesh

            • 3. Re: Problem Deploying Entity Bean on JBoss 3.0
              kometen

              I'm facing the same problem. The top of ejb-jar-xml says
              <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
              "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

              My CabinBean.java in part:
              public abstract class CabinBean implements EntityBean {

              public Integer ejbCreate(Integer id) throws CreateException {
              setId(id);
              return null;
              }

              public void ejbPostCreate(Integer id) {
              // Do nothing. Required.
              }

              public abstract void setId(Integer id);
              public abstract Integer getId();

              This should adhere to ejb 2.0-standard.

              I'm using jboss 2.4.4 and jdk 1.3.1 and fetched ejb.jar 2.0 from Sun.

              Output from console:
              [ERROR,ContainerFactory]
              Bean : CabinEJB
              Section: 9.2.2
              Warning: The entity bean class must not be defined as abstract.

              [ERROR,ContainerFactory]
              Bean : CabinEJB
              Section: 9.2.2
              Warning: The entity bean class must define a public constructor that takes no arguments.

              [ERROR,ContainerFactory]
              Bean : CabinEJB
              Section: 9.4.7.1
              Warning: The primkey-field element must name a public field in the bean implementation class.


              This baffles me. Tried jboss 3.0 alpha and CVS-versions, but to no avail.

              Does any one have a clue?

              regards
              Claus

              • 4. Re: Problem Deploying Entity Bean on JBoss 3.0

                JBoss2.4.4 does not include CMP2.0

                You need JBoss3.0 for that.

                Regards,
                Adrian