0 Replies Latest reply on Jun 21, 2003 10:00 AM by henriks

    Deploy CMP on MySql - prim-key length

    henriks Newbie

      Hi. I have trouble with deploying my CMP beans on JBoss connected to MySql. The exception I get is:

      Problem starting service jboss.j2ee:jndiName=local/RevisionEJB,service=EJB
      org.jboss.deployment.DeploymentException: Error while creating table; - nested throwable: (java.sql.SQLException: General error: BLOB column 'primKey' used in key specification without a key length)

      My xml definition looks like this:

      <ejb-name>RevisionEJB</ejb-name>
      <local-home>com.adaptit.server.localhome.LocalRevisionHome</local-home>
      com.adaptit.server.ejblocalobject.LocalRevision
      <ejb-class>com.adaptit.server.entitybean.RevisionBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Object</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>RevisionEJB</abstract-schema-name>
      <cmp-field>
      <field-name>description</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>name</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>timeCreated</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>fileName</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>primKey</field-name>
      256
      </cmp-field>
      <primkey-field>primKey</primkey-field>


      Seems to me that I have set the length of the prim-key.... what can be my problem?

      Thanx
      Henrik