OpenGammaRuntimeException: rsk schema too old

Hello,

I am trying to run the Open Gamma demo on PostgreSQL.

scripts/init-examples-simulated-db.sh has worked properly and the DB contains data

But when I try to run ‘scripts/examples-simulated.sh start’ and tail the log, I get :

com.opengamma.OpenGammaRuntimeException: Failed to init component factory: ‘dbBatchMaster’ with {factory=com.opengamma.component.factory.master.DbBatchMasterComponentFactory, classifier=shared, dbConnector=::bat, computationTargetResolver=::combined}

Caused by: com.opengamma.OpenGammaRuntimeException: rsk schema too old. This build of the OpenGamma Platform works with version 51 of the rsk schema, but the database contains version 50.
(full stack below)

And I cannot open the web UI.

OS: CentOS 6.4 x86_64
JVM: java-openjdk-1.7.0
OpenGamma: 2.1.0 binary distribution

It works with the default settings (HSQLDB).

Thanks in advance for your help!

Mathieu

FULL STACK

com.opengamma.OpenGammaRuntimeException: Failed to init component factory: ‘dbBatchMaster’ with {factory=com.opengamma.component.factory.master.DbBatchMasterComponentFactory, classifier=shared, dbConnector=::bat, computationTargetResolver=::combined}
at com.opengamma.component.ComponentManager.initComponent(ComponentManager.java:360)
at com.opengamma.component.ComponentManager.initComponents(ComponentManager.java:325)
at com.opengamma.component.ComponentManager.init(ComponentManager.java:300)
at com.opengamma.component.ComponentManager.start(ComponentManager.java:205)
at com.opengamma.component.ComponentManager.start(ComponentManager.java:192)
at com.opengamma.component.OpenGammaComponentServer.run(OpenGammaComponentServer.java:291)
at com.opengamma.component.OpenGammaComponentServer.run(OpenGammaComponentServer.java:158)
at com.opengamma.component.OpenGammaComponentServer.main(OpenGammaComponentServer.java:87)
Caused by: com.opengamma.OpenGammaRuntimeException: rsk schema too old. This build of the OpenGamma Platform works with version 51 of the rsk schema, but the database contains version 50.
at com.opengamma.component.factory.master.AbstractDbMasterComponentFactory.checkSchemaVersion(AbstractDbMasterComponentFactory.java:149)
at com.opengamma.component.factory.master.AbstractDbMasterComponentFactory.checkSchema(AbstractDbMasterComponentFactory.java:71)
at com.opengamma.component.factory.master.DbBatchMasterComponentFactory.init(DbBatchMasterComponentFactory.java:65)
at com.opengamma.component.ComponentManager.initFactory(ComponentManager.java:555)
at com.opengamma.component.ComponentManager.initComponent(ComponentManager.java:358)
… 7 more
======== OPENGAMMA STARTUP FAILED ========

toolcontext-examplessimulated.properties

Properties files are loaded in a chain ending with an INI file

Once a property is set, it cannot be change (same as Ant)

Thus the most specific properties go in the first file specified

Next configuration file in the chain is the INI file

MANAGER.NEXT.FILE = classpath:toolcontext/toolcontext-examplessimulated.ini

db.dialect = com.opengamma.util.db.PostgresDbDialect
db.driver = org.postgresql.Driver
db.url = jdbc:postgresql://localhost/opengamma
db.username = argeo
db.password = argeo

db.schemaNames = cfg,eng,exg,pos,prt,sec,snp,usr,org

Configuration parameters for the infrastructure

ehcache.configFile = classpath:toolcontext/toolcontext-ehcache.xml

db.standard.dialect = com.opengamma.util.db.PostgresDbDialect
db.standard.driver = org.postgresql.Driver
db.standard.url = jdbc:postgresql://localhost/opengamma
db.standard.username = argeo
db.standard.password = argeo

db.hts.dialect = com.opengamma.util.db.PostgresDbDialect
db.hts.driver = org.postgresql.Driver
db.hts.url = jdbc:postgresql://localhost/opengamma
db.hts.username = argeo
db.hts.password = argeo

db.batch.dialect = com.opengamma.util.db.PostgresDbDialect
db.batch.driver = org.postgresql.Driver
db.batch.url = jdbc:postgresql://localhost/opengamma
db.batch.username = argeo
db.batch.password = argeo

db.userfinancial.dialect = com.opengamma.util.db.PostgresDbDialect
db.userfinancial.driver = org.postgresql.Driver
db.userfinancial.url = jdbc:postgresql://localhost/opengamma
db.userfinancial.username = argeo
db.userfinancial.password = argeo

activeMQ.brokerURL=failover:(tcp://localhost:61616?daemon=true)?timeout=3000

fullstack-examplessimulated.properties

Properties files are loaded in a chain ending with an INI file

Once a property is set, it cannot be change (same as Ant)

Thus the most specific properties go in the first file specified

Next configuration file in the chain is the INI file

MANAGER.NEXT.FILE = classpath:fullstack/fullstack-examplessimulated.ini

Configuration parameters for the infrastructure

og.cluster.name = fullstack-examplessimulated
ehcache.configFile = classpath:default-ehcache.xml

db.standard.dialect = com.opengamma.util.db.PostgresDbDialect
db.standard.driver = org.postgresql.Driver
db.standard.url = jdbc:postgresql://localhost/opengamma
db.standard.username = argeo
db.standard.password = argeo

db.hts.dialect = com.opengamma.util.db.PostgresDbDialect
db.hts.driver = org.postgresql.Driver
db.hts.url = jdbc:postgresql://localhost/opengamma
db.hts.username = argeo
db.hts.password = argeo

db.batch.dialect = com.opengamma.util.db.PostgresDbDialect
db.batch.driver = org.postgresql.Driver
db.batch.url = jdbc:postgresql://localhost/opengamma
db.batch.username = argeo
db.batch.password = argeo

db.userfinancial.dialect = com.opengamma.util.db.PostgresDbDialect
db.userfinancial.driver = org.postgresql.Driver
db.userfinancial.url = jdbc:postgresql://localhost/opengamma
db.userfinancial.username = argeo
db.userfinancial.password = argeo

#db.standard.dialect = com.opengamma.util.db.HSQLDbDialect
#db.standard.driver = org.hsqldb.jdbcDriver
#db.standard.url = jdbc:hsqldb:file:data/masterdb/hsqldb/example-db
#db.standard.username = OpenGamma
#db.standard.password = OpenGamma

#db.hts.dialect = com.opengamma.util.db.HSQLDbDialect
#db.hts.driver = org.hsqldb.jdbcDriver
#db.hts.url = jdbc:hsqldb:file:data/masterdb/hsqldb/example-db
#db.hts.username = OpenGamma
#db.hts.password = OpenGamma

#db.batch.dialect = com.opengamma.util.db.HSQLDbDialect
#db.batch.driver = org.hsqldb.jdbcDriver
#db.batch.url = jdbc:hsqldb:file:data/masterdb/hsqldb/example-db
#db.batch.username = OpenGamma
#db.batch.password = OpenGamma

#db.userfinancial.dialect = com.opengamma.util.db.HSQLDbDialect
#db.userfinancial.driver = org.hsqldb.jdbcDriver
#db.userfinancial.url = jdbc:hsqldb:file:data/userdb/hsqldb/og-fin-user
#db.userfinancial.username = OpenGamma
#db.userfinancial.password = OpenGamma

temptarget.path = data/temptarget

Configuration for activeMQ server

activeMQ.brokerURL=failover:(tcp://localhost:61616?daemon=true)?timeout=3000
activemq.base = temp/activemq
activemq.port = 61616

Configuration parameters for the simulated live data

livedata.example.file=classpath:com/opengamma/examples/simulated/livedata/market-data.csv
livedata.example.subscription.topic = OpenGamma.LiveData.example.subscription
livedata.example.entitlement.topic = OpenGamma.LiveData.example.entitlement
livedata.example.heartbeat.topic = OpenGamma.LiveData.example.heartbeat

For notifications when market data providers become available

livedata.example.availability.topic = OpenGamma.LiveData.example.availability

Configuration parameters for jetty

server.spring = classpath:dummy-non-existent*.xml
#jetty.resourceBase = ## must be specified, use example-bin or example-dev
jetty.port = 8080
jetty.securePort = 8443
jetty.log.dir = logs

Test infrastructure (disabled)

tests.createSecurityMaster = false
tests.createSnapshotMaster = false
tests.createInterpolatedYieldCurveDefinitionMaster = false

View processor configuration

vp.main.cache.port = 0
vp.main.query.port = 0
vp.main.job.port = 0

Web config

component.webBundle.deployMode = DEV
freemarker.template.locations = servlet-context:WEB-INF/pages

Fixed by this commit:


http://jira.opengamma.com/browse/PLAT-4880

But there are a number of other fixes:

I would advise doing a git clone of the OpenGamma source code and checkout the “dev/v2.1.x” branch to get all the fixes:
http://docs.opengamma.com/display/DOC210/Working+with+the+source+code

Thanks a lot for the quick answer!

I am now trying to build the dev/v2.1.x branch but I get the following error :

[ERROR] Failed to execute goal on project og-utildb: Could not resolve dependencies for project com.opengamma.platform:og-utildb:jar:2.1.11-SNAPSHOT: Could not find artifact com.opengamma.external.microsoft:sqljdbc:jar:4.0 in og-public (http://maven.opengamma.com/nexus/content/groups/public) -> [Help 1]

Indeed, I cannot find the com.opengamma.external.microsoft:sqljdbc:jar:4.0 artifact in:
http://maven.opengamma.com/nexus/content/groups/public/com/opengamma/external/

Does it need to be added manually ? (because it is closed source?)

You can comment out that dependency as it is optional. If you want it because you you want to suport SQL server then you’ll need to add the dependency locally (as we cannot publish it for you due to licensing reasons).

Update: I’ve pushed the change to comment the dependency out.