java.sql.SQLException: Primary or unique constraint required on main table: VOTERS in statement [-- creating foreign key constraint absentee_ballo_registrant_i_FK -- ALTER TABLE absentee_ballots ADD CONSTRAINT absentee_ballo_registrant_i_FK FOREIGN KEY (registrant_id) REFERENCES voters (id)]

empire-user | Rainer Döbele | 4 years ago
  1. 0

    re: Error creating FKs on HSQLDB with DBSQLScript.run

    empire-user | 4 years ago | Rainer Döbele
    java.sql.SQLException: Primary or unique constraint required on main table: VOTERS in statement [-- creating foreign key constraint absentee_ballo_registrant_i_FK -- ALTER TABLE absentee_ballots ADD CONSTRAINT absentee_ballo_registrant_i_FK FOREIGN KEY (registrant_id) REFERENCES voters (id)]
  2. 0

    re: Error creating FKs on HSQLDB with DBSQLScript.run

    empire-user | 4 years ago | Rainer Döbele
    java.sql.SQLException: Primary or unique constraint required on main table: VOTERS in statement [-- creating foreign key constraint absentee_ballo_registrant_i_FK -- ALTER TABLE absentee_ballots ADD CONSTRAINT absentee_ballo_registrant_i_FK FOREIGN KEY (registrant_id) REFERENCES voters (id)]
  3. 0

    Error creating FKs on HSQLDB with DBSQLScript.run

    empire-user | 4 years ago | Joel Becker
    java.sql.SQLException: Primary or unique constraint required on main table: VOTERS in statement [-- creating foreign key constraint absentee_ballo_registrant_i_FK -- ALTER TABLE absentee_ballots ADD CONSTRAINT absentee_ballo_registrant_i_FK FOREIGN KEY (registrant_id) REFERENCES voters (id)]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Re: Error creating FKs on HSQLDB with DBSQLScript.run

    empire-user | 4 years ago | Francis De Brabandere
    java.sql.SQLException: Primary or unique constraint required on main table: VOTERS in statement [-- creating foreign key constraint absentee_ballo_registrant_i_FK -- ALTER TABLE absentee_ballots ADD CONSTRAINT absentee_ballo_registrant_i_FK FOREIGN KEY (registrant_id) REFERENCES voters (id)]
  6. 0

    Error creating FKs on HSQLDB with DBSQLScript.run

    empire-user | 4 years ago | Joel Becker
    java.sql.SQLException: Primary or unique constraint required on main table: VOTERS in statement [-- creating foreign key constraint absentee_ballo_registrant_i_FK -- ALTER TABLE absentee_ballots ADD CONSTRAINT absentee_ballo_registrant_i_FK FOREIGN KEY (registrant_id) REFERENCES voters (id)]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.SQLException

      Primary or unique constraint required on main table: VOTERS in statement [-- creating foreign key constraint absentee_ballo_registrant_i_FK -- ALTER TABLE absentee_ballots ADD CONSTRAINT absentee_ballo_registrant_i_FK FOREIGN KEY (registrant_id) REFERENCES voters (id)]

      at org.hsqldb.jdbc.Util.sqlException()
    2. HSQLDB
      jdbcStatement.executeUpdate
      1. org.hsqldb.jdbc.Util.sqlException(Unknown Source)
      2. org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
      3. org.hsqldb.jdbc.jdbcStatement.executeUpdate(Unknown Source)
      3 frames
    3. Apache Empire-db Core
      DBSQLScript.run
      1. org.apache.empire.db.DBDatabaseDriver.executeSQL(DBDatabaseDriver.java:552)
      2. org.apache.empire.db.DBSQLScript.run(DBSQLScript.java:120)
      2 frames