0 Replies Latest reply on Oct 20, 2003 6:19 AM by sajiv narayanan kartha

    CMP error, on console

    sajiv narayanan kartha Newbie

      Hi everybody,

      I have an error on my console. I am trying to create a sample entity bean (cmp) on jboss_3.2.1 integrated tomcat....

      I get the following error on the console.. Can anyone direct me to what the problem is....

      org.jboss.deployment.DeploymentException: Configuration found in jbosscmp-jdbc.x
      ml for entity CorporationEJB but bean is not a jbosscmp-jdbc-managed cmp entity
      in ejb-jar.xml

      given below is my ejb-jar.xml and jbosscmp-jdbc.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD JBOSSCMP-JDBC 3.0//EN" "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_0.dtd">

      <jbosscmp-jdbc>

      java:/mySqlDataSource
      <datasource-mapping>mySQL</datasource-mapping>
      <create-table>false</create-table>
      <remove-table>false</remove-table>

      <enterprise-beans>

      <ejb-name>CorporationEJB</ejb-name>
      <table-name>corporation</table-name>
      <cmp-field>
      <field-name>corporationId</field-name>
      <column-name>CORPORATION_ID</column-name>
      </cmp-field>

      <cmp-field>
      <field-name>corporationName</field-name>
      <column-name>CORPORATION_NAME</column-name>
      </cmp-field>

      <cmp-field>
      <field-name>corporationAddress</field-name>
      <column-name>CORPORATION_ADDRESS</column-name>
      </cmp-field>

      </enterprise-beans>
      </jbosscmp-jdbc>


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

      <ejb-jar>
      <enterprise-beans>


      <ejb-name>CorportionEJB</ejb-name>
      acculeon.corporation.CorporationEntityHome
      acculeon.corporation.CorporationEntity
      <ejb-class>acculeon.corporation.CorporationEntityBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Integer</prim-key-class>
      false
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>CorportionEJB</abstract-schema-name>

      <cmp-field>
      <field-name>corporationId</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>corporationName</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>corporationAddress</field-name>
      </cmp-field>
      <primkey-field>corporationId</primkey-field>




      </enterprise-beans>
      <assembly-descriptor>
      <container-transaction>

      <ejb-name>CorportionEJB</ejb-name>
      <method-name>*</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      </assembly-descriptor>
      </ejb-jar>



      Regards
      Sajiv, India