Running OpenGammaServer from sesame-examples/example-server


#1

Hi,
I try to run the exaple sesame server from IntelliJ Idea. However, when I start the application (using OpenGammaServer.main()) I get the following exception:

com.opengamma.component.ComponentConfigException: Failed to set component factory properties: 'webEndpoints' with {factory=com.opengamma.sesame.web.WebComponentFactory, marketDataEnvironmentFactory=::default}
	at com.opengamma.component.ComponentManager.initComponent(ComponentManager.java:353)
	at com.opengamma.component.ComponentManager.initComponents(ComponentManager.java:322)
	at com.opengamma.component.ComponentManager.init(ComponentManager.java:297)
	at com.opengamma.component.ComponentManager.start(ComponentManager.java:206)
	at com.opengamma.component.ComponentManager.start(ComponentManager.java:193)
	at com.opengamma.component.OpenGammaComponentServer.run(OpenGammaComponentServer.java:307)
	at com.opengamma.component.OpenGammaComponentServer.run(OpenGammaComponentServer.java:173)
	at com.opengamma.solutions.server.OpenGammaServer.main(OpenGammaServer.java:17)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: java.lang.IllegalArgumentException: Argument 'viewRunner' must not be null
	at org.joda.beans.JodaBeanUtils.notNull(JodaBeanUtils.java:492)
	at com.opengamma.sesame.web.WebComponentFactory.setViewRunner(WebComponentFactory.java:108)
	at com.opengamma.sesame.web.WebComponentFactory$Meta.propertySet(WebComponentFactory.java:311)
	at org.joda.beans.impl.direct.DirectMetaProperty.set(DirectMetaProperty.java:259)
	at com.opengamma.component.ComponentManager.setProperty(ComponentManager.java:428)
	at com.opengamma.component.ComponentManager.setFactoryProperties(ComponentManager.java:406)
	at com.opengamma.component.ComponentManager.initComponent(ComponentManager.java:351)
	... 12 more
======== OPENGAMMA STARTUP FAILED ========

Is it possible, that it doesn’t work because I don’t have Bloomberg installed? If not, can you tell me what could be the reason of the issue?

Best regards,
Jacek Witkowski


#2

You do not need Bloomberg to run the examples, the examples/tests run from sample snapshot data.

There are is a slight problem with the configuration file you are using. See the following commit for the fix: https://github.com/OpenGamma/OG-Platform/commit/2ce581523db66ceca57ff0170a753c2e5ceee982


#3

Thank you very much for the answer. Now I have the example server up and running. However, I still don’t know how to run it with a sample data snapshot. There is only one file in sesame-examples/example-server/src/test and it is a logback-test.xml. If there is any other “examples” directory in the whole project, then it is not present in the “master” branch.


#4

Another issue which I have with the example server is getting error 404 after going into localhost:8080 (I am being redirected to http://localhost:8080/jax/bundles/fm/prototype/analytics.ftl#/ and then I get the error 404 rendered with OpenGamma).


#5

With regard to your first question. Have a look at the tests in sesame-examples/exampl-remote-app for examples of running against the example server. Also see tests in the sesame-examples/example-library-app for pricing that uses OG as a library rather than a full server solution.

For the second issue, it looks like the incorrect html resources have been pulled down. I imagine this is from us merging the sesame and platform repos. I will log an item to have that looked at. But this will only cause a problem with the anaytics page. The http://localhost:8080/jax/ page will give you the web interface into all the data persisted fo the server.