[cosmo-dev] Cosmo db migration failure/corruption
Mike Dawson
mdawson at totton.ac.uk
Fri Oct 26 02:24:57 PDT 2007
Hello,
I attempted to migrate my db from a 0.7.1 cosmo server to 0.8. The
migration.properties are set to:
migration.dialect=Derby
migration.datasource.driverClassName=org.apache.derby.jdbc.EmbeddedDriver
migration.datasource.url=jdbc:derby:/opt/local/chandler/db;user=sa;upgrade=true
migration.datasource.username=sa
migration.datasource.password=
and the output of the migration process is:
# java -jar cosmo-migration-0.8-jar-with-dependencies.jar -v
migration.properties
INFO - CollectionFactory.<clinit>(76) | JDK 1.4+ collections available
INFO - XmlBeanDefinitionReader.loadBeanDefinitions(347) | Loading XML
bean definitions from class path resource [applicationContext-migrate.xml]
INFO - AbstractRefreshableApplicationContext.refreshBeanFactory(100) |
Bean factory for application context [org.springframework.context.support
.ClassPathXmlApplicationContext;hashCode=188006096]:
org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans [dataSo
urce,zeroPointFiveToZeroPointSix,zeroPointSixToZeroPointSixZeroOne,zeroPointSixZeroOneToZeroPointSixOne,zeroPointSixOneToZeroPointSeven,zeroPoin
tSevenToZeroPointEight,propertyPlaceHolderConfigurer,migrationManager];
root of BeanFactory hierarchy
INFO - AbstractApplicationContext.refresh(322) | 8 beans defined in
application context [org.springframework.context.support.ClassPathXmlApplica
tionContext;hashCode=188006096]
INFO - AbstractApplicationContext.initMessageSource(473) | Unable to
locate MessageSource with name 'messageSource': using default [org.springfr
amework.context.support.DelegatingMessageSource at 2b275d39]
INFO - AbstractApplicationContext.initApplicationEventMulticaster(495) |
Unable to locate ApplicationEventMulticaster with name 'applicationEven
tMulticaster': using default
[org.springframework.context.event.SimpleApplicationEventMulticaster at 2087c268]
INFO - DefaultListableBeanFactory.preInstantiateSingletons(261) |
Pre-instantiating singletons in factory
[org.springframework.beans.factory.sup
port.DefaultListableBeanFactory defining beans
[dataSource,zeroPointFiveToZeroPointSix,zeroPointSixToZeroPointSixZeroOne,zeroPointSixZeroOneToZe
roPointSixOne,zeroPointSixOneToZeroPointSeven,zeroPointSevenToZeroPointEight,propertyPlaceHolderConfigurer,migrationManager];
root of BeanFactor
y hierarchy]
INFO - DriverManagerDataSource.setDriverClassName(155) | Loaded JDBC
driver: org.apache.derby.jdbc.EmbeddedDriver
INFO - MigrationManager.migrate(85) | Found Cosmo schema version 110
INFO - MigrationManager.migrate(92) | Found 1 migrations using dialect:
Derby
INFO - MigrationManager.migrate(95) | Migrating 110 to 120
DEBUG - AbstractMigration.migrateSchema(83) | begin migrateSchema()
INFO - AbstractMigration.migrateSchema(92) | found script:
/110-to-120-Derby-pre.sql
DEBUG - AbstractMigration.migrateSchema(102) | executing alter table
subscription add column etag varchar(255)
DEBUG - AbstractMigration.migrateSchema(102) | executing alter table
users add column etag varchar(255)
DEBUG - AbstractMigration.migrateSchema(102) | executing alter table
user_preferences add column etag varchar(255)
DEBUG - AbstractMigration.migrateSchema(102) | executing alter table
item add column etag varchar(255)
DEBUG - AbstractMigration.migrateSchema(102) | executing alter table
stamp add column etag varchar(255)
DEBUG - AbstractMigration.migrateSchema(102) | executing alter table
attribute add column etag varchar(255)
DEBUG - AbstractMigration.migrateSchema(102) | executing update item set
icaluid=null where modifiesitemid is not null
DEBUG - AbstractMigration.migrateSchema(102) | executing update
attribute set etag='';
java.sql.SQLException: Syntax error: Encountered ";" at line 1, column 29.
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
at
org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
Source)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
Source)
at
org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
at
org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown
Source)
at
org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(Unknown Source)
at
org.osaf.cosmo.migrate.AbstractMigration.migrateSchema(AbstractMigration.java:103)
at
org.osaf.cosmo.migrate.AbstractMigration.migrate(AbstractMigration.java:60)
at
org.osaf.cosmo.migrate.MigrationManager.migrate(MigrationManager.java:96)
at org.osaf.cosmo.migrate.Main.main(Main.java:90)
Caused by: ERROR 42X01: Syntax error: Encountered ";" at line 1, column 29.
at
org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at
org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown Source)
at
org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown
Source)
at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown
Source)
... 6 more
The original db is left in a state unusable by either 0.7.1 or 0.8 - let
me know if you want any error output from there or any other info.
Mike
More information about the cosmo-dev
mailing list