Sesame example does not seem to work


#1

Hi,

I have tried to run the example within sesame folder with Eclipse IDE (Mars version).
I have managed to run the server properly, but when I try to access to localhost:8008/jax, I have an error:

Cannot access localhost:8008/jax
Reason: Unknown

There is nothing else written.

Do you know if there is a configuration error?

Kind regards


#2

Hey,

I am not using Eclipse but Intellij IDEA, but I had pretty the same problem. I changed the path for jetty.resourceBase in fullstack.properties and marketdata.properties because it pointed to local directory which didn’t exist. The strange thing is that a server managed to start without any errors. Now my path looks like this: “projects/OG-Web/web-engine”.


#3

Thanks for the reply.
I ll have a look tonight and see if this solves everything…

On the side: why using Intellij IDEA vs. Eclipe?


#4

I don’t want to go off-topic here, but in short: in my opinion it is much more “intelligent” than Eclipse. Honestly, I’ve never met anyone who would use both Eclipse and Idea and said that Eclipse is better. There is only one thing that I still use Eclipse for: it’s Latex.


#5

Hi,

in sesame-server/config/fullstack/fullstack.properties and in sesame-server/config/marketdata/marketdata.properties, I have made the changes discussed, but now the project example-server does not run anymore
(Prints the ASM code to generate the given class.
Usage: ASMifierClassVisitor [-debug] )

Even reverting back to the old values, the example-server does not run anymore.

I am a bit lost on what to launch or change to make a simple example work…

Thanks for the help


#6

You should change files under “sesame/sesame-examples/example-server/config/”. This is where your example configuration is being got from. When you’ll check your example-server run configuration in Eclipse, you’ll probably have the com.opengamma.solutions.server.OpenGammaServer (from example-server directory) as main class run with additional arguments, where the first one is a path to your configuration file (eg. classpath:fullstack/fullstack-in-memory.properties). You can read more about the configuration system on OG website (however it is pretty outdated).

By the way, it is strange that changing files in sesame-server affected your example-server configuration. I don’t know the OpenGamma platform very well yet, but best to my knowledge: it shouldn’t happen. Maybe one of the OG developers could help.


#7

This is where I don’t fully understand.

The files you describe are not located in “sesame/sesame-examples/example-server/config/”

but in “sesame/sesame-server/example-server/config/”

On a side note, how do you run the examples in IntelliJ?
I have tried to run the following:

but I get a lot of errors (first one being Error:(10, 23) java: package org.threeten.bp does not exist).

Thanks


#8

So in example-server there is a fullstack-in-memory.properties file where you’ll find jetty.resourceBase. From what I see, the property is already set up properly, so you actually shouldn’t need to change it.

I see that you switched to Idea, so what you’ll need to do to run it from IDE is:

  • go to Edit configurations menu (top right corner by default),
  • add new configuration (Application),
  • set com.opengamma.solutions.server.OpenGammaServer as your main class,
  • set example-server module as classpath.

That should be enough to run the examples. However what I’m still working on is setting up the web analytics module which is not included in examples and fullstack configuration (from sesame-server) as well.


#9

Thanks for the help, this is really helpful…

I have found in the meantime how to run the server with intelliJ… :smile:

My server is now running
======== STARTING OPENGAMMA ========
======== OPENGAMMA STARTED in 119989ms ========

But I still run in the starting error when opening http://127.0.0.1:8080/jax/

Problem accessing /jax/
Reason: Not Found

If I also put the physical machine IP I still get the same error.
Looks like a path is badly defined, but I am struggling to find what exactly…


#10

Nailed it…

the jetty.resourceBase was pointing to a directory that was probably not correct due to the Working Directory set to MODULE_DIR
Now with in sesame/sesame-examples/example-server/config/fullstack/fullstack-in-memory.properties
jetty.resourceBase = web-engine

I can get access to the ressources: