'duplicate key in table' error on startup with SCORM.2004.3ED.RTE 19.x
Description
Activity
Austin June 22, 2020 at 3:34 PMEdited
I have these properties
auto.ddl=false
hibernate.hbm2ddl.auto=update
When I comment out hibernate.hbm2ddl.auto, the duplicate key error goes away as you mentioned.
however, tomcat still fails to start up... see https://sakaiproject.atlassian.net/browse/SCO-171#icft=SCO-171
Brian J. June 22, 2020 at 10:44 AM
Also, you should never mix versions. Master is 21, and should only be deployed to a 21 instance. 20.x for 20.x, 19.x for 19.x, etc.
Brian J. June 22, 2020 at 10:41 AMEdited
Lowering the priority to Minor here. As far as I'm aware this doesn't prevent the server from coming up. This has been around since Sakai 10 at least, and I've run it in every major version of Sakai since, in both Oracle and MySQL.
You can simply ignore the error, or turn off auto.ddl (in fact, if you leave auto.ddl on you'll see a few different errors of this kind, some for core tools as well).
PRs are welcome. I don't have the time resources to look into this.
'duplicate key in table' error on startup with SCORM 19.x and Sakai 19.4
https://github.com/sakaicontrib/SCORM.2004.3ED.RTE
After a successful build, but while starting up tomcat, there were error that prevented tomcat from starting up successfully
19-Jun-2020 14:41:20.867 ERROR [main] org.hibernate.tool.hbm2ddl.SchemaUpdate.execute Can't write; duplicate key in table '#sql-4fa0_1' 19-Jun-2020 14:41:21.238 ERROR [main] org.hibernate.tool.hbm2ddl.SchemaUpdate.execute HHH000388: Unsuccessful: alter table SCORM_MAP_ELEMENTS_T add constraint FK_ddt4cldyuohyjr6egecm6jyxd foreign key (ELEMENT_ID) references SCORM_ELEMENT_T (ELEMENT_ID) 19-Jun-2020 14:41:21.238 ERROR [main] org.hibernate.tool.hbm2ddl.SchemaUpdate.execute Can't write; duplicate key in table '#sql-4fa0_1' 19-Jun-2020 14:41:21.256 ERROR [main] org.hibernate.tool.hbm2ddl.SchemaUpdate.execute HHH000388: Unsuccessful: alter table SCORM_MAP_ELEMENTS_T add constraint FK_as7umojxsjjkl52bnt1bmw0og foreign key (DATAMODEL_ID) references SCORM_DATAMODEL_T (DATAMODEL_ID) 19-Jun-2020 14:41:21.256 ERROR [main] org.hibernate.tool.hbm2ddl.SchemaUpdate.execute Can't write; duplicate key in table '#sql-4fa0_1'
I tried installing SCORM.2004.3ED.RTE 'master' on sakai 19.4, but it wouldn't compile due to an error with "getInternalAssessmentID", but I'm guessing that's a method that was added to Sakai after 19.4.
Sorry, I have not had a chance to test SCORM master with Sakai Master yet.