Database does not match code - Columns missing in SCHED_EVENT

Steps to reproduce

Steps to reproduce:
1. Using a Postgres SQL Database initialized with scripts in DDL
2. Start Matterhorn
3. Using 1.2-RC6

Actual Results:

16:47:01 INFO (SchedulerServiceImpl:165) - Activating Scheduler Service
16:47:02 ERROR (SchedulerServiceDatabaseImpl:218) - Could not retrieve all events:
Internal Exception: org.postgresql.util.PSQLException: ERROR: column "ca_metadata" does not exist
Position: 18
Error Code: 0
Call: SELECT EVENT_ID, CA_METADATA, DUBLIN_CORE FROM SCHED_EVENT
Query: ReadAllQuery(referenceClass=EventEntity sql="SELECT EVENT_ID, CA_METADATA, DUBLIN_CORE FROM SCHED_EVENT")
16:47:02 WARN (SchedulerServiceImpl:189) - Unable to index event instances: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: ERROR: column "ca_metadata" does not exist
Position: 18
Error Code: 0
Call: SELECT EVENT_ID, CA_METADATA, DUBLIN_CORE FROM SCHED_EVENT
Query: ReadAllQuery(referenceClass=EventEntity sql="SELECT EVENT_ID, CA_METADATA, DUBLIN_CORE FROM SCHED_EVENT")
16:47:02 ERROR (?:?) - [org.opencastproject.scheduler.impl.SchedulerServiceImpl] The activate method has thrown an exception
org.osgi.framework.ServiceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: ERROR: column "ca_metadata" does not exist
Position: 18
Error Code: 0
Call: SELECT EVENT_ID, CA_METADATA, DUBLIN_CORE FROM SCHED_EVENT
Query: ReadAllQuery(referenceClass=EventEntity sql="SELECT EVENT_ID, CA_METADATA, DUBLIN_CORE FROM SCHED_EVENT")
at org.opencastproject.scheduler.impl.SchedulerServiceImpl.activate(SchedulerServiceImpl.java:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Activity

Show:
Christopher Brooks
August 8, 2011, 6:20 PM

I don't see this in the mysql ddl either, Tobias, can you handle this one?

cab938@bobble:/opt/matterhorn/matterhorn_1.2.x/docs/scripts/ddl$ more postgres84.sql | grep "ca"
CREATE TABLE capture_agent_state (
local character varying(255)
ALTER TABLE ONLY capture_agent_state
ADD CONSTRAINT capture_agent_state_pkey PRIMARY KEY (name);

cab938@bobble:/opt/matterhorn/matterhorn_1.2.x/docs/scripts/ddl$ more mysql5.sql | grep "CA"
CREATE TABLE `CAPTURE_AGENT_STATE` (

Christopher Brooks
August 10, 2011, 9:03 PM

Adam, please make the appropriate changes to the mysql schema. Please include the other dublin core changes as well. Please make these changes in 1.2.x, then we can merge them into our msub after the next rc

Adam McKenzie
August 10, 2011, 10:26 PM

Fixed in r10856.

Assignee

Adam McKenzie

Reporter

Hank Magnuski

Severity

Incorrectly Functioning Without Workaround

Tags (folksonomy)

Components

Fix versions

Affects versions

Priority

Blocker
Configure