Problem accessing /jax/ Reason: Not Found


#1

Hello,

I managed to build and setup an OG instance using Postgress DB.
Everything was fine and I could play during a few days with OG.
This morning I tried to create a new Equity and a trade to a portfolio. Then I shutdown the OG server
Later, I started it up again and got this message on this URL http://localhost:8080/jax/

Problem accessing /jax/
Reason: Not Found

It worked fine ! But now it does not work anymore and the only thing I did was creating a new Equity !
none of these URL are working !
http://localhost:8080/jax/bundles/fm/prototype/admin.ftl#/portfolios/
http://localhost:8080/jax/bundles/fm/prototype/admin.ftl#/portfolios/DbPrt~1035/name=undefined

I tried a mvn clean install. Unsuccessful.

I start the server with “%JAVA_HOME%\bin\java” -Xms512m -Xmx1024m -XX:MaxPermSize=256M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -cp “%OG_HOME%\examples\examples-simulated\target\server-dir\scripts…\config;%OG_HOME%\examples\examples-simulated\target\server-dir\scripts…\lib\examples-simulated-2.1.1-SNAPSHOT.jar;%OG_HOME%\examples\examples-simulated\target\server-dir\lib\postgresql-9.3-1101.jdbc3.jar” -Dlogback.configurationFile=jetty-logback.xml com.opengamma.component.OpenGammaComponentServer config\fullstack\fullstack-examplessimulated-bin.properties

And I got the message =====OPENGAMMA STARTED IN 59654ms ===

jetty.log does not show anything. I mean it is just empty.

Googling the issue, it noticed people facing the same issue but they having an error 404 showing up AND the message Reason: Not Found.
I don’t have this 404.
Probably the context is not loading but I do not know (anymore) where to start digging.

Any help, please

Regards,


#2

A common reason for this is that the server could not find the WEB-INF directory. You are running the config\fullstack\fullstack-examplessimulated-bin.properties file which expects the code to have been built into a full server distribution with the web-engine directory (holding WEB-INF) location in a specific place. If you have moved the web-engine or WEB-INF directory, or are running from an IDE rather than a deployed server it might be that the directory is not found.

Try adding “-v” to your server startup and you should see a printout of all the config parameters. One will be a reference to the WEB-INF directory. Check that the directory matches and change the config file if necessary.


#3

Hello,

I tried adding the -v to the server startup and did not see anything suspicious.
However I’ve noticed when starting the Server, the last log message before seeing the == OpenGamma started === should have been:
–Starting Lifecycle–
… com.sun.jersey.server.impl.WebApplicationImpl_initiate

That last line was missing and probably that prevented actually starting the server.

What I did was building up all projects again but data still pointing to a postgres database and got the same error again even though build was successful.
The only way to had it work again was to building also the whole database again.
Is there any config information loaded from the database ?

Now it works again but I am afraid this error would occur again. So I did backup the database.

Bonus question: you may have noticed that I changed the server start script to include Postgress jdbc driver jar in the classpath. Any idea to have this jar included in the examples-simulated-2.1.0.jar package ?