I created a collection and uploaded about 33000 rows of data into it via Workbench. However, only after uploading I found that the data contained lots of erroneous values.
The data is not corrupted (ie. it's still valid for Specify and database), just values are wrong because some rows got mixed while it was prepared for import in Excel. There are other collections already in use in this database, so I didn't want to take a risk and delete rows by hand in MySQL. Instead I decided to create another collection under same discipline and upload the fixed data into it, and after that delete the old collection.
I have now re-uploaded all the data, but I can't delete the old collection. I try to delete it via Configuration menu by clicking red "-" under "Discipline". A dialog box with progress bar and label "Deleting collection" opens. The progress bar first stays at 0% for about 10-15 minutes and then slowly progresses to about 1/3 full until an error message dialog shows up ("There was an unexpected condition..." etc.). After that Specify exits (apparently normally with "Specify will now exit" message). After restart the collection is still there. I've also tried this with all other users logged off.
Here's the stack trace and other stuff that hopefully helps:
class_name: edu.ku.brc.specify.datamodel.busrules.DivisionBusRules
task_name: SystemSetup
Version is 6.3.05 with MySQL 5.1.52 database on a dedicated server.
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`specify`.`collectionobject`, CONSTRAINT `FKC1D4635DA141B896` FOREIGN KEY (`CollectionObjectAttributeID`) REFERENCES `collectionobjectattribute` (`CollectionObjectAttributeID`))
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
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:1015)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1564)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1485)
at edu.ku.brc.specify.dbsupport.SpecifyDeleteHelper.deleteRecords(SpecifyDeleteHelper.java:854)
at edu.ku.brc.specify.dbsupport.SpecifyDeleteHelper.deleteRecords(SpecifyDeleteHelper.java:806)
at edu.ku.brc.specify.dbsupport.SpecifyDeleteHelper.deleteRecords(SpecifyDeleteHelper.java:806)
at edu.ku.brc.specify.dbsupport.SpecifyDeleteHelper.delRecordFromTable(SpecifyDeleteHelper.java:306)
at edu.ku.brc.specify.datamodel.busrules.CollectionBusRules$4.doInBackground(CollectionBusRules.java:749)
at edu.ku.brc.specify.datamodel.busrules.CollectionBusRules$4.doInBackground(CollectionBusRules.java:1)
at javax.swing.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at javax.swing.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Best regards
Erno Kuusela