I wanted to test Continua 1.6 beta and updated an existing test system to the latest build. However after updating we get the following error from Continua:
Ensure that the Continua Server service is running
Check the Event Log for any application errors for Continua
9:13 AM : Starting
9:13 AM : Starting
9:13 AM : Migrating Database
9:13 AM : Could not initialise database: An error occurred executing the following sql: INSERT INTO builds_repositorybranch (path, displayname, repositoryid, lastcommitdate, lastbuilddate, isdeletedorclosed, isactive) SELECT DISTINCT branch, branchdisplayname, repositoryid, MAX(lastcommitdate), MAX(created), false, true FROM ( SELECT DISTINCT branch, branchdisplayname, repositoryid, MAX(c.created) AS lastcommitdate, b.created FROM builds_changeset c LEFT JOIN builds_buildchangeset bc ON c.id = bc.changesetid LEFT JOIN builds_build b ON b.id = bc.buildid GROUP BY branch, branchdisplayname, repositoryid, b.created ) AS t1 GROUP BY branch, branchdisplayname, repositoryid; The error was FEHLER: 23502: NULL-Wert in Spalte „id“ verletzt Not-Null-Constraint Check the eventlog for more info.
The full Event Log entry for PostgreSQL shows the above error again.
Before the attempted update there were two git repository registered with Continua. Both only contained a small number of test commits.
Thanks for reporting this. I suspect that there is a changeset in your database with a null branch display name. Can you confirm this by running the following query against the ContinuaCI database?
You can access the database using pgAdmin3.exe (in C:\Program Files\VSoft Technologies\ContinuaCI\Server\PostgreSQL\bin). The database connection details are in C:\Program Files\VSoft Technologies\ContinuaCI\Server\Continua.Server.Service.exe.config under hibernate-configuration\session-factory\property name=“connection.connection_string”.
If you can let me know which field is null, I’ll get a fix out to you first thing.
I ran the query as requested and it did not return any results. Running the select portion of the failed insert that Continua reports gives the following results:
Apologies for this. A late change to the primary key of a database table caused this migraton bug. We have uploaded a new version v1.6.0.43 with a fix for this issue.