[CDO] - Migrating from 4.6 to 4.10 - DB Exception on server restart [message #1835876] |
Tue, 15 December 2020 15:31 |
Philippe EUGENE Messages: 61 Registered: January 2011 |
Member |
|
|
Hi,
I'm currently migrating CDO from 4.6 to 4.10.
On server restart a db exception occured :
Quote:
Unique index or primary key violation: {0}; SQL statement:
INSERT INTO CDO_PACKAGE_UNITS (ID, ORIGINAL_TYPE, TIME_STAMP, PACKAGE_DATA) VALUES (?, ?, ?, ?) [23505-197]
In CDO 4.10, the server try to insert data in CDO_PACKAGE_UNITS twice. Then a primary key violation occured.
Between 4.6 and 4.10 the code change in org.eclipse.emf.cdo.internal.server.Repository#doActivate()
In 4.6 :
Quote:
if (store.isFirstStart())
{
initSystemPackages(true);
initRootResource();
}
else
{
readPackageUnits();
initSystemPackages(false);
readRootResource();
}
In 4.10
Quote:
if (store.isFirstStart())
{
initSystemPackages(true);
initRootResource();
}
else
{
initSystemPackages(false);
readPackageUnits();
readRootResource();
}
In 4.10 call to readPackageUnits(); is after initSystemPackages(false);
then in initSystemPackages(false);
packageRegistry is empty and the call to writePackageUnits occured twice.
In this second call, the aptemp to insert data in CDO_PACKAGE_UNITS failed.
Thanks
--
Philippe
[Updated on: Tue, 15 December 2020 16:12] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03986 seconds