Community
Participate
Working Groups
Build Identifier: After the import of a backup file the server tells me everything went fine but as soon as I connect via CDO Explorer or client-app I get the following error message: java.lang.IllegalStateException: External ID -14 not found. Database inconsistent! I think the problem is that the table "cdo_external_refs" (I am using dbstore with mysql btw) is not being restored. After the import there are only 13 entries, all of them cdo classes. As a workaround I can stop the server, fill the table cdo_external_refs from a mysql backup and start the server again. Reproducible: Always Steps to Reproduce: DBStore with MySQL 1. cdo export repo filename 2. cdo import repo filename, restart server 3. connect via cdo-explorer or client app
Created attachment 192697 [details] Stacktrace
It's still a miracle to me where the missing ext-ref mappings are gone. I've stepped through it again and again. I can see the correct SQL INSERT statements being executed against the same connection instance that is used for other tables before and after. This connection is correctly committed at the end of the import and all the other tables look correct. Only the ext-ref table is missing the data that I've seen the INSERT statements for. Stefan do you have a clue? Perhaps we can try this out together?
Committed revision 7603: - trunk/plugins/org.eclipse.emf.cdo.server - trunk/plugins/org.eclipse.emf.cdo.server.db - trunk/plugins/org.eclipse.emf.cdo.tests
I found the problem: The importer created a store accessor but did not register it with StoreThreadLocal. As a consequence ExternalReferenceManager.mapExternalReference(CDOIDExternal, long) used an accessor that never got committed.
Available in R20110608-1407