java.io.IOException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Migration of version 2.6.0 to a newer one (3.1.5) fails with following error: {noformat} java.io.IOException: Error talking to database: Problem with constraints script /opt/webservers/fecru-2.6.0_initial/sql/MYSQL/schema/constraints_73.sql at com.atlassian.crucible.migration.item.SQLBackup.restore(SQLBackup.java:206) at com.atlassian.crucible.migration.item.SQLBackup$1.restore(SQLBackup.java:173) at com.cenqua.fisheye.ctl.Restore.run(Restore.java:166) at com.cenqua.fisheye.ctl.Restore.main(Restore.java:235) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:114) at com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:42) Caused by: com.cenqua.crucible.hibernate.CruDBException: Problem with constraints script /opt/webservers/fecru-2.6.0_initial/sql/MYSQL/schema/constraints_73.sql at com.cenqua.crucible.hibernate.DefaultDBControl.addConstraints(DefaultDBControl.java:318) at com.atlassian.crucible.migration.item.DBImporter.importData(DBImporter.java:159) at com.atlassian.crucible.migration.item.SQLBackup.restore(SQLBackup.java:192) ... 9 more Caused by: com.cenqua.crucible.hibernate.CruDBException: SQL script error on line 115: "alter table cru_revision add index FKE2F52A1434AAD25A (cru_path), add constraint FKE2F52A1434AAD25A foreign key (cru_path) references cru_stored_path (cru_path_id);" (Cannot add or update a child row: a foreign key constraint fails (`sources_RC1`.`#sql-1b16_1142`, CONSTRAINT `FKE2F52A1434AAD25A` FOREIGN KEY (`cru_path`) REFERENCES `cru_stored_path` (`cru_path_id`))), please contact http://www.atlassian.com/support/ at com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:484) at com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:415) at com.cenqua.crucible.hibernate.DefaultDBControl.addConstraints(DefaultDBControl.java:312) ... 11 more Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`sources_RC1`.`#sql-1b16_1142`, CONSTRAINT `FKE2F52A1434AAD25A` FOREIGN KEY (`cru_path`) REFERENCES `cru_stored_path` (`cru_path_id`)) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.Util.getInstance(Util.java:381) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1038) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3563) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3495) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2687) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1647) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1566) at com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:456) ... 13 more {noformat} h3. Workaround It is caused by inconsistency between {{cru_revision}} and {{cru_path}} tables which can be fixed using SQL statements: {code} delete from cru_revision where cru_path not in (select cru_path_id from cru_stored_path); delete from cru_fr_detail where cru_revision_id not in (select cru_revision_id from cru_revision); {code}
    via by Cezary Zawadka,
  • Migration of version 2.6.0 to a newer one (3.1.5) fails with following error: {noformat} java.io.IOException: Error talking to database: Problem with constraints script /opt/webservers/fecru-2.6.0_initial/sql/MYSQL/schema/constraints_73.sql at com.atlassian.crucible.migration.item.SQLBackup.restore(SQLBackup.java:206) at com.atlassian.crucible.migration.item.SQLBackup$1.restore(SQLBackup.java:173) at com.cenqua.fisheye.ctl.Restore.run(Restore.java:166) at com.cenqua.fisheye.ctl.Restore.main(Restore.java:235) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:114) at com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:42) Caused by: com.cenqua.crucible.hibernate.CruDBException: Problem with constraints script /opt/webservers/fecru-2.6.0_initial/sql/MYSQL/schema/constraints_73.sql at com.cenqua.crucible.hibernate.DefaultDBControl.addConstraints(DefaultDBControl.java:318) at com.atlassian.crucible.migration.item.DBImporter.importData(DBImporter.java:159) at com.atlassian.crucible.migration.item.SQLBackup.restore(SQLBackup.java:192) ... 9 more Caused by: com.cenqua.crucible.hibernate.CruDBException: SQL script error on line 115: "alter table cru_revision add index FKE2F52A1434AAD25A (cru_path), add constraint FKE2F52A1434AAD25A foreign key (cru_path) references cru_stored_path (cru_path_id);" (Cannot add or update a child row: a foreign key constraint fails (`sources_RC1`.`#sql-1b16_1142`, CONSTRAINT `FKE2F52A1434AAD25A` FOREIGN KEY (`cru_path`) REFERENCES `cru_stored_path` (`cru_path_id`))), please contact http://www.atlassian.com/support/ at com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:484) at com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:415) at com.cenqua.crucible.hibernate.DefaultDBControl.addConstraints(DefaultDBControl.java:312) ... 11 more Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`sources_RC1`.`#sql-1b16_1142`, CONSTRAINT `FKE2F52A1434AAD25A` FOREIGN KEY (`cru_path`) REFERENCES `cru_stored_path` (`cru_path_id`)) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.Util.getInstance(Util.java:381) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1038) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3563) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3495) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2687) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1647) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1566) at com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:456) ... 13 more {noformat} h3. Workaround It is caused by inconsistency between {{cru_revision}} and {{cru_path}} tables which can be fixed using SQL statements: {code} delete from cru_revision where cru_path not in (select cru_path_id from cru_stored_path); delete from cru_fr_detail where cru_revision_id not in (select cru_revision_id from cru_revision); {code}
    via by Cezary Zawadka,
  • TableCreation fails
    via GitHub by fabianschwarzfritz
    ,
    • java.io.IOException: Error talking to database: Problem with constraints script /opt/webservers/fecru-2.6.0_initial/sql/MYSQL/schema/constraints_73.sql at com.atlassian.crucible.migration.item.SQLBackup.restore(SQLBackup.java:206) at com.atlassian.crucible.migration.item.SQLBackup$1.restore(SQLBackup.java:173) at com.cenqua.fisheye.ctl.Restore.run(Restore.java:166) at com.cenqua.fisheye.ctl.Restore.main(Restore.java:235) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:114) at com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:42) Caused by: com.cenqua.crucible.hibernate.CruDBException: Problem with constraints script /opt/webservers/fecru-2.6.0_initial/sql/MYSQL/schema/constraints_73.sql at com.cenqua.crucible.hibernate.DefaultDBControl.addConstraints(DefaultDBControl.java:318) at com.atlassian.crucible.migration.item.DBImporter.importData(DBImporter.java:159) at com.atlassian.crucible.migration.item.SQLBackup.restore(SQLBackup.java:192) ... 9 more Caused by: com.cenqua.crucible.hibernate.CruDBException: SQL script error on line 115: "alter table cru_revision add index FKE2F52A1434AAD25A (cru_path), add constraint FKE2F52A1434AAD25A foreign key (cru_path) references cru_stored_path (cru_path_id);" (Cannot add or update a child row: a foreign key constraint fails (`sources_RC1`.`#sql-1b16_1142`, CONSTRAINT `FKE2F52A1434AAD25A` FOREIGN KEY (`cru_path`) REFERENCES `cru_stored_path` (`cru_path_id`))), please contact http://www.atlassian.com/support/ at com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:484) at com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:415) at com.cenqua.crucible.hibernate.DefaultDBControl.addConstraints(DefaultDBControl.java:312) ... 11 more Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`sources_RC1`.`#sql-1b16_1142`, CONSTRAINT `FKE2F52A1434AAD25A` FOREIGN KEY (`cru_path`) REFERENCES `cru_stored_path` (`cru_path_id`)) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.Util.getInstance(Util.java:381) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1038) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3563) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3495) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2687) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1647) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1566) at com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:456) ... 13 more

    Users with the same issue

    Axelo
    3 times, last one,
    jshakil
    1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    60 more bugmates