0 Replies Latest reply on Apr 21, 2005 9:59 AM by Abhijit Roy

    Not able to create Foreign Key in Cloudscape

    Abhijit Roy Newbie

      Hi,
      I am trying to deploy my Employee and Phone EJB which has 1:N relationship. But I am getting the following error as the fkey name generated by jboss is longer than supported by Cloudscape. Is there a setting in jboss to generate a smaller key name?
      --------------------------
      org.jboss.deployment.DeploymentException: Error while adding foreign key constraint; - nested throwable: (SQL Exception: The name 'FK_PHONE_EMPLOYEELOCAL' is too long. The maximum length is '18'.)
      -----
      Caused by: SQL Exception: The name 'FK_PHONE_EMPLOYEELOCAL' is too long. The maximum length is '18'.
      at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java)
      at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java)
      at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java)
      at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java)
      at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java)
      at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java)
      at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(EmbedStatement.java)
      at org.jboss.resource.adapter.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:272)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.addForeignKeyConstraint(JDBCStartCommand.java:1064)


      Thanks,
      Roy