3 Replies Latest reply on Apr 9, 2002 4:52 PM by Alex Rublin

    jbosscmp-jdbc.xml

    Jennifer Newbie

      hi
      i'm trying to create an cmp2.0 with jboss3.0beta, i wrote a jbosscmp-jdbc.xml that looks like this:

      <?xml version="1.0" encoding="UTF-8"?>

      <jbosscmp-jdbc>

      java:/OracleDS
      <datasource-mapping>Oracle8</datasource-mapping>
      <create-table>true</create-table>
      <remove-table>false</remove-table>
      <read-only>false</read-only>


      <enterprise-beans>

      <ejb-name>CabinBean</ejb-name>
      <table-name>TheCabin</table-name>

      <cmp-field><field-name>id</field-name><column-name>id</column-name></cmp-field>
      <cmp-field><field-name>name</field-name><column-name>name</column-name></cmp-field>
      <cmp-field><field-name>deckLevel</field-name><column-name>deckLevel</column-name></cmp-field>
      <cmp-field><field-name>shipId</field-name><column-name>shipId</column-name></cmp-field>
      <cmp-field><field-name>bedCount</field-name><column-name>bedCount</column-name></cmp-field>


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

      and i get the following error:

      12:02:51,305 ERROR [ServiceController] JMException thrown during ServiceProxy op
      eration create on mbean jboss.j2ee:service=EJB,jndiName=cabinsasa
      org.jboss.deployment.DeploymentException: Configuration found in jbosscmp-jdbc.x
      ml for entity CabinBean but bean is not a jbosscmp-jdbc-managed cmp entity in ej
      b-jar.xml

      my ejb-jar looks like this:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE ejb-jar PUBLIC
      "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
      "http://java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd">

      <ejb-jar>

      <enterprise-beans>

      <ejb-name>Cabin</ejb-name>
      cabin.CabinHomeRemote
      cabin.CabinRemote
      <ejb-class>cabin.CabinBean</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>Cabin</abstract-schema-name>
      <cmp-field><field-name>id</field-name></cmp-field>
      <cmp-field><field-name>name</field-name></cmp-field>
      <cmp-field><field-name>deckLevel</field-name></cmp-field>
      <cmp-field><field-name>shipId</field-name></cmp-field>
      <cmp-field><field-name>bedCount</field-name></cmp-field>
      <primkey-field>id</primkey-field>

      </enterprise-beans>

      <assembly-descriptor>

      <security-role>
      the ones who have full access to the Cabin EJB
      <role-name>everyone</role-name>
      </security-role>

      <method-permission>
      <role-name>everyone</role-name>

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

      </method-permission>
      <container-transaction>

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

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

      could someone please help me??