Error with starting Example Server- fullstack example


#1

I have been using the last stable version of OG, starting the server using the eclipse run configuration, Example Server - fullstack-example. It has been fine until today. To be sure I had not edited something, I did a full clean check out and build and I still get the error. I suspect it is something on my machine I am not sure what it is. I am using windows 8, with 8GB memory.

Gary

Registered component: ActiveMQJmsConfiguration::main
— Initialized activeMQ in 1076ms —
— Initializing dbConfigMaster —
Initializing factory 'com.opengamma.component.factory.master.DbConfigMasterComponentFactory
Using properties {classifier=central, dbConnector=::cfg}
com.opengamma.OpenGammaRuntimeException: Failed to init component factory: ‘dbConfigMaster’ with {factory=com.opengamma.component.factory.master.DbConfigMasterComponentFactory, classifier=central, dbConnector=::cfg}
at com.opengamma.component.ComponentManager.initComponent(ComponentManager.java:339)
at com.opengamma.component.ComponentManager.init(ComponentManager.java:290)
at com.opengamma.component.ComponentManager.loadIni(ComponentManager.java:254)
at com.opengamma.component.ComponentManager.start(ComponentManager.java:220)
at com.opengamma.component.ComponentManager.start(ComponentManager.java:200)
at com.opengamma.component.ComponentManager.start(ComponentManager.java:217)
at com.opengamma.component.ComponentManager.start(ComponentManager.java:200)
at com.opengamma.component.ComponentManager.start(ComponentManager.java:217)
at com.opengamma.component.ComponentManager.start(ComponentManager.java:200)
at com.opengamma.component.OpenGammaComponentServer.run(OpenGammaComponentServer.java:169)
at com.opengamma.component.OpenGammaComponentServer.run(OpenGammaComponentServer.java:132)
at com.opengamma.examples.ExampleComponentServerDev.main(ExampleComponentServerDev.java:41)
Caused by: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT version_value FROM cfg_schema_version WHERE version_key = ? ]; nested exception is java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: CFG_SCHEMA_VERSION
at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:94)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:602)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:636)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:661)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:701)
at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.queryForObject(NamedParameterJdbcTemplate.java:177)
at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.queryForObject(NamedParameterJdbcTemplate.java:190)
at com.opengamma.masterdb.AbstractDbMaster.getSchemaVersion(AbstractDbMaster.java:369)
at com.opengamma.component.factory.master.DbConfigMasterComponentFactory.init(DbConfigMasterComponentFactory.java:96)
at com.opengamma.component.ComponentManager.initFactory(ComponentManager.java:534)
at com.opengamma.component.ComponentManager.initComponent(ComponentManager.java:337)
… 11 more
Caused by: java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: CFG_SCHEMA_VERSION
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.JDBCPreparedStatement.(Unknown Source)
at org.hsqldb.jdbc.JDBCConnection.prepareStatement(Unknown Source)
at com.jolbox.bonecp.ConnectionHandle.prepareStatement(ConnectionHandle.java:820)
at org.springframework.jdbc.core.PreparedStatementCreatorFactory$PreparedStatementCreatorImpl.createPreparedStatement(PreparedStatementCreatorFactory.java:245)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:580)
… 20 more
Caused by: org.hsqldb.HsqlException: user lacks privilege or object not found: CFG_SCHEMA_VERSION
at org.hsqldb.error.Error.error(Unknown Source)
at org.hsqldb.error.Error.error(Unknown Source)
at org.hsqldb.SchemaManager.getTable(Unknown Source)
at org.hsqldb.ParserDQL.readTableName(Unknown Source)
at org.hsqldb.ParserDQL.readTableOrSubquery(Unknown Source)
at org.hsqldb.ParserDQL.XreadTableReference(Unknown Source)
at org.hsqldb.ParserDQL.XreadFromClause(Unknown Source)
at org.hsqldb.ParserDQL.XreadTableExpression(Unknown Source)
at org.hsqldb.ParserDQL.XreadQuerySpecification(Unknown Source)
at org.hsqldb.ParserDQL.XreadSimpleTable(Unknown Source)
at org.hsqldb.ParserDQL.XreadQueryPrimary(Unknown Source)
at org.hsqldb.ParserDQL.XreadQueryTerm(Unknown Source)
at org.hsqldb.ParserDQL.XreadQueryExpressionBody(Unknown Source)
at org.hsqldb.ParserDQL.XreadQueryExpression(Unknown Source)
at org.hsqldb.ParserDQL.compileCursorSpecification(Unknown Source)
at org.hsqldb.ParserCommand.compilePart(Unknown Source)
at org.hsqldb.ParserCommand.compileStatement(Unknown Source)
at org.hsqldb.Session.compileStatement(Unknown Source)
at org.hsqldb.StatementManager.compile(Unknown Source)
at org.hsqldb.Session.execute(Unknown Source)
… 25 more
======== OPENGAMMA STARTUP FAILED ========


#2

I suspect somehow my database was corrupted, on the new clean check out I had forgotten to initialise the database…

http://docs.opengamma.com/display/DOC120/Running+the+Example+Engine+using+Ant

It is fine now.