1 Reply Latest reply on Mar 26, 2004 9:58 AM by lshepherd

    Problem with <unknown-pk> and <entity-command> tags

    lshepherd Newbie

      I've installed jboss 3.2.3

      however, whenever i deploy my ear with the following jbosscmp-jdbc.xml file, i get the following errors, like it's using an old dtd to validate against.

      xml file (errors follow):

      <?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_2.dtd">

      <jbosscmp-jdbc>




      <enterprise-beans>

      <!--
      To add beans that you have deployment descriptor info for, add
      a file to your XDoclet merge directory called jbosscmp-jdbc-beans.xml
      that contains the markup for those beans.
      -->


      <ejb-name>AlbumBean</ejb-name>
      <table-name>Album</table-name>

      <cmp-field>
      <field-name>albumName</field-name>
      <column-name>album_name</column-name>

      </cmp-field>
      <cmp-field>
      <field-name>albumId</field-name>
      <column-name>album_id</column-name>

      </cmp-field>
      <cmp-field>
      <field-name>artistId</field-name>
      <column-name>artist_id</column-name>

      </cmp-field>




      <ejb-name>ArtistBean</ejb-name>
      <table-name>Artist</table-name>

      <cmp-field>
      <field-name>artistName</field-name>
      <column-name>artist_name</column-name>

      </cmp-field>
      <unknown-pk>
          <unknown-pk-class>java.lang.Integer</unknown-pk-class>
          <field-name>artistId</field-name>
          <column-name>id</column-name>
          <jdbc-type>INTEGER</jdbc-type>
          <sql-type>SMALLINT(5)</sql-type>
          <auto-increment/>
      </unknown-pk>
      <entity-command name="mysql-get-generated-keys"/>



      </enterprise-beans>

      </jbosscmp-jdbc>


      jboss errors:

      17:33:44,306 ERROR [XmlFileLoader] XmlFileLoader: File file:/Applications/jboss-3.2.3/server/default/deploy/TestEnterpriseProject.ear/TestEnterpriseProjectEJB.jar/META-INF/jbosscmp-jdbc.xml process error. Line: 48. Error message: Element type "unknown-pk" must be declared.
      17:33:44,309 ERROR [XmlFileLoader] XmlFileLoader: File file:/Applications/jboss-3.2.3/server/default/deploy/TestEnterpriseProject.ear/TestEnterpriseProjectEJB.jar/META-INF/jbosscmp-jdbc.xml process error. Line: 49. Error message: Element type "unknown-pk-class" must be declared.
      17:33:44,310 ERROR [XmlFileLoader] XmlFileLoader: File file:/Applications/jboss-3.2.3/server/default/deploy/TestEnterpriseProject.ear/TestEnterpriseProjectEJB.jar/META-INF/jbosscmp-jdbc.xml process error. Line: 54. Error message: Element type "auto-increment" must be declared.
      17:33:44,312 ERROR [XmlFileLoader] XmlFileLoader: File file:/Applications/jboss-3.2.3/server/default/deploy/TestEnterpriseProject.ear/TestEnterpriseProjectEJB.jar/META-INF/jbosscmp-jdbc.xml process error. Line: 56. Error message: Element type "entity-command" must be declared.
      17:33:44,314 ERROR [XmlFileLoader] XmlFileLoader: File file:/Applications/jboss-3.2.3/server/default/deploy/TestEnterpriseProject.ear/TestEnterpriseProjectEJB.jar/META-INF/jbosscmp-jdbc.xml process error. Line: 58. Error message: The content of element type "entity" must match "(ejb-name,(datasource,datasource-mapping)?,create-table?,remove-table?,read-only?,read-time-out?,row-locking?,pk-constraint?,read-ahead?,list-cache-max?,fetch-size?,table-name?,cmp-field*,load-groups?,eager-load-group?,lazy-load-groups?,query*)".
      17:33:44,318 ERROR [EntityContainer] Starting failed
      org.jboss.deployment.DeploymentException: Invalid XML: file=file:/Applications/jboss-3.2.3/server/default/deploy/TestEnterpriseProject.ear/TestEnterpriseProjectEJB.jar/META-INF/jbosscmp-jdbc.xml