0 Replies Latest reply on Sep 6, 2002 8:07 AM by tsangcn

    jbosscmp cannot create foreign key in Firebird database

    tsangcn Newbie

      Hello,

      I am using JBoss 3.0.2 and Firebird as my database and Firebird jca-jdbc driver.
      In jbosscmp-jdbc.xml, if I specify <fk-constraint>true</fk-constraint> for a relationship-role,
      and let jbosscmp create the tables for me.
      But it always failed with the following exception

      17:27:54,765 INFO [UserInfoEJB] Created table 'USER_INFO_TABLE' successfully.
      17:27:54,921 INFO [UserEJB] Created table 'USER_TABLE' successfully.
      17:27:55,281 WARN [UserEJB] Could not add foreign key constraint: table=USER_TABLE
      17:27:55,281 WARN [ServiceController] Problem starting service jboss.j2ee:service=EJB,jndiName=ejb/User
      org.jboss.deployment.DeploymentException: Error while adding foreign key constraint; - nested throwable: (java.sql.SQLException: Error during autocommit: javax.resource.ResourceException: couldn't commit local transaction: javax.transaction.xa.XAException: unsuccessful metadata update
      object USER_INFO_TABLE is in use
      null)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.addForeignKeyConstraint(JDBCStartCommand.java:384)

      Please Help
      CN