Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 313486

Summary: [DB] Typo in CDODBSchema leads to DB initialization error
Product: [Modeling] EMF Reporter: Stefan Winkler <stefan>
Component: cdo.dbAssignee: Stefan Winkler <stefan>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3 CC: stepper
Version: 3.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch none

Description Stefan Winkler CLA 2010-05-19 05:11:19 EDT
Reported in the Newsgroup:

app thread - org.eclipse.emf.cdo.server.app.0 [debug.sql] CREATE TABLE
cdo_objects (cdo_id BIGINT, cdo_class BIGINT, cdo_created BIGINT)
app thread - org.eclipse.emf.cdo.server.app.0 [debug.sql] CREATE UNIQUE
INDEX cdo_objects_idx0 ON cdo_objects (cdo_id)
app thread - org.eclipse.emf.cdo.server.app.0 [debug.sql] CREATE TABLE
cdo_branches (id INTEGER, name text, base_id INTEGER, base_time BIGINT)
app thread - org.eclipse.emf.cdo.server.app.0 [debug.sql] CREATE INDEX
cdo_branches_idx0 ON cdo_branches (id)
app thread - org.eclipse.emf.cdo.server.app.0 [debug.sql] CREATE INDEX
cdo_branches_idx1 ON cdo_branches (commit_time)
app thread - org.eclipse.emf.cdo.server.app.0 [debug.sql] -- ERROR:
Column »commit_time« does not exist. Trying to rollback operation
[ERROR] ERROR: Relation »cdo_branches« does not exist
org.eclipse.net4j.db.DBException: ERROR: Relation »cdo_branches« does
not exist
	at org.eclipse.net4j.spi.db.DBAdapter.validateTable(DBAdapter.java:423)
	at
org.eclipse.net4j.db.postgresql.PostgreSQLAdapter.createTable(PostgreSQLAdapter.java:164)
	at org.eclipse.net4j.spi.db.DBAdapter.createTables(DBAdapter.java:109)
	at org.eclipse.net4j.spi.db.DBSchema.create(DBSchema.java:106)
	at
org.eclipse.emf.cdo.server.internal.db.DBStore.doActivate(DBStore.java:442)
	at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycle.java:72)
	at
org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:98)
	at
org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:88)
	at
org.eclipse.emf.cdo.internal.server.Repository.doActivate(Repository.java:1276)
	at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycle.java:72)
	at
org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:98)
	at
org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:88)
	at
org.eclipse.emf.cdo.server.CDOServerUtil.addRepository(CDOServerUtil.java:128)
	at
org.eclipse.emf.cdo.internal.server.RepositoryConfigurator.configure(RepositoryConfigurator.java:93)
	at
org.eclipse.emf.cdo.internal.server.bundle.CDOServerApplication.doStart(CDOServerApplication.java:58)
	at org.eclipse.net4j.util.om.OSGiApplication.start(OSGiApplication.java:61)
	at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
	at
org.eclipse.equinox.internal.app.AnyThreadAppLauncher.run(AnyThreadAppLauncher.java:26)
	at java.lang.Thread.run(Thread.java:619)
Comment 1 Stefan Winkler CLA 2010-05-19 05:57:47 EDT
Created attachment 169080 [details]
Patch

change obvious typo BRANCHES to COMMIT_INFOS for the respective index
Comment 2 Stefan Winkler CLA 2010-05-19 06:04:15 EDT
Committed to HEAD
Comment 3 Eike Stepper CLA 2010-06-29 04:36:34 EDT
Available in 3.0 GA:
http://download.eclipse.org/modeling/emf/cdo/updates/3.0-releases/