OG Startup failed (Debugging via Eclipse)

Hi,

I’m new to the site/OG so apologies if this noobie question. I managed to get the code built in eclipse (Mac OS X) using the source from the website and using Ivy to grab the dependencies. I’ve subsequently tried to debug using: “ExampleComponentServerDev.java”. But after seemingly initialising I get the following error message:

Can anyone suggest what is wrong/what I’m doing wrong?

Thanks in advance for any assistance.

23:23:21.091 [main] DEBUG o.s.j.support.SQLErrorCodesFactory - Database product name cached for DataSource [com.jolbox.bonecp.BoneCPDataSource@2dc663a3]: name is 'HSQL Database Engine’
23:23:21.091 [main] DEBUG o.s.j.support.SQLErrorCodesFactory - SQL error codes for ‘HSQL Database Engine’ found
23:23:21.092 [main] DEBUG o.s.j.s.SQLErrorCodeSQLExceptionTranslator - Unable to translate SQLException with Error code ‘-5501’, will now try the fallback translator
com.opengamma.OpenGammaRuntimeException: Failed to init component factory: ‘viewDefinitionRepository’ with {factory=com.opengamma.component.factory.source.UserFinancialViewDefinitionRepositoryComponentFactory, classifier=combined, underlyingClassifier=shared, underlyingConfigMaster=::central, userClassifier=user}
======== OPENGAMMA STARTUP FAILED ========
at com.opengamma.component.ComponentManager.initComponent(ComponentManager.java:318)
at com.opengamma.component.OpenGammaComponentServer$VerboseManager.initComponent(OpenGammaComponentServer.java:281)
at com.opengamma.component.ComponentManager.init(ComponentManager.java:278)
at com.opengamma.component.ComponentManager.loadIni(ComponentManager.java:251)
at com.opengamma.component.OpenGammaComponentServer$VerboseManager.loadIni(OpenGammaComponentServer.java:270)
at com.opengamma.component.ComponentManager.start(ComponentManager.java:202)
at com.opengamma.component.OpenGammaComponentServer$VerboseManager.start(OpenGammaComponentServer.java:257)
at com.opengamma.component.ComponentManager.start(ComponentManager.java:184)
at com.opengamma.component.ComponentManager.start(ComponentManager.java:199)
at com.opengamma.component.OpenGammaComponentServer$VerboseManager.start(OpenGammaComponentServer.java:257)
at com.opengamma.component.ComponentManager.start(ComponentManager.java:184)
at com.opengamma.component.ComponentManager.start(ComponentManager.java:199)
at com.opengamma.component.OpenGammaComponentServer$VerboseManager.start(OpenGammaComponentServer.java:257)
at com.opengamma.component.ComponentManager.start(ComponentManager.java:184)
at com.opengamma.component.OpenGammaComponentServer.run(OpenGammaComponentServer.java:162)
at com.opengamma.component.OpenGammaComponentServer.run(OpenGammaComponentServer.java:121)
at com.opengamma.bloombergexample.ExampleComponentServerDev.main(ExampleComponentServerDev.java:41)
Caused by: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT COUNT(id) FROM cfg_config WHERE ver_from_instant <= ? AND ver_to_instant > ? AND corr_from_instant <= ? AND corr_to_instant > ? AND config_type = ? ]; nested exception is java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: CFG_CONFIG
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 org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.queryForInt(NamedParameterJdbcTemplate.java:217)
at com.opengamma.masterdb.config.DbConfigWorker.search(DbConfigWorker.java:214)
at com.opengamma.masterdb.config.DbConfigMaster.search(DbConfigMaster.java:186)
at com.opengamma.financial.view.ConfigDbViewDefinitionRepository.(ConfigDbViewDefinitionRepository.java:49)
at com.opengamma.component.factory.source.UserFinancialViewDefinitionRepositoryComponentFactory.initUnderlying(UserFinancialViewDefinitionRepositoryComponentFactory.java:80)
at com.opengamma.component.factory.source.UserFinancialViewDefinitionRepositoryComponentFactory.init(UserFinancialViewDefinitionRepositoryComponentFactory.java:63)
at com.opengamma.component.ComponentManager.initFactory(ComponentManager.java:511)
at com.opengamma.component.ComponentManager.initComponent(ComponentManager.java:316)
… 16 more
Caused by: java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: CFG_CONFIG
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)
… 29 more
Caused by: org.hsqldb.HsqlException: user lacks privilege or object not found: CFG_CONFIG
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)
… 34 more

Looks like you haven’t installed the example database. See these instructions:
http://docs.opengamma.com/display/DOC/Running+the+Example+Engine+using+Ant
ant new-hsqldb
ant init-database

or use the binary release:
http://docs.opengamma.com/display/DOC/Installation+Guide