1 Reply Latest reply on Jan 14, 2004 12:20 PM by Morten Jensen-Hole

    Primary key class logical mapping warning

    Morten Jensen-Hole Newbie

      When I deploy an Entity bean that uses a compund primary key class I get a warning

      WARN [JDBCMetaDataMigrationUtil] Unable to find logical mapping for primary key class:

      My deployment descriptor has the two fields mapped in the abstract schema.
      The fields in my primary key class are public, same type and do match the names in the bean class' abstract schema.

      A table does get created in the database with my 2 fields (plus some others)

      I do use the jbosscmp-jdbc.xml file to map the ejb-name to a table name.

      thanks Morten

        • 1. Re: Primary key class logical mapping warning
          Morten Jensen-Hole Newbie

          It seems that the sql statement can't find the column in the create table statement for the PRIMARY KEY. It does not have the name of the columns I specified in the Primary key class.

          org.jboss.deployment.DeploymentException: Error while creating table; - nested throwable: (java.sql.
          SQLException: Unexpected token: ) in statement [CREATE TABLE CHILD (Document INTEGER NOT NULL,
          CHILD_NAME VARCHAR(256),
          CHILD_YOB INTEGER NOT NULL,
          CHILD_MOB INTEGER NOT NULL,
          CHILD_DAY INTEGER NOT NULL,
          CHILD_REC_ID INTEGER NOT NULL,
          CONSTRAINT PK_CHILD PRIMARY KEY ())])