Access to default repository via WebEngine

I've been trying to upgrade our existing Nuxeo setup (5.3) to 5.6.

I have all the documents loading up in nuxeo correctly and have been trying to get our WebEngine code converted over from the old module.xml setup into the newer annotations setup.

When I try and hit the url for one of WebEngine modules, I'm getting the following error about the repository not being available and this is causing errors when it tries to access the CoreSession. We are using a PostreSQL database and I ran through the setup wizard which seems to have generated the updated default-repository-config.xml file.

Caused by: javax.ws.rs.WebApplicationException: java.lang.IllegalStateException: Unable to get X-NXRepository repository

at 

org.nuxeo.ecm.webengine.jaxrs.session.CoreSessionProvider.createSession(CoreSessionProvider.java:71)

at org.nuxeo.ecm.webengine.jaxrs.session.CoreSessionProvider.getSessionRef(CoreSessionProvider.java:56)
at org.nuxeo.ecm.webengine.jaxrs.session.CoreSessionProvider.getSession(CoreSessionProvider.java:64)
at org.nuxeo.ecm.webengine.jaxrs.session.SessionFactory.getSession(SessionFactory.java:87)
at org.nuxeo.ecm.webengine.jaxrs.session.SessionFactory.getSession(SessionFactory.java:83)
at org.nuxeo.ecm.webengine.model.impl.AbstractWebContext.getCoreSession(AbstractWebContext.java:156)
at org.nuxeo.ecm.webengine.model.impl.AbstractWebContext.initializeBindings(AbstractWebContext.java:681)
... 70 more

Caused by: java.lang.IllegalStateException: Unable to get X-NXRepository repository

at org.nuxeo.ecm.webengine.jaxrs.session.CoreSessionProvider._createSession(CoreSessionProvider.java:88)
at org.nuxeo.ecm.webengine.jaxrs.session.CoreSessionProvider.createSession(CoreSessionProvider.java:69)
... 76 more

I'm not sure where the word X-NXRepository has come from. We've only ever used the default repository.

EDIT - When I make a request to a WebEngine url, I'm getting this warning coming up straight away :

[org.nuxeo.ecm.platform.web.common.ServletHelper] Invalid request transaction timeout: Nuxeo-Transaction-Timeout

I'm guessing that the database connection isn't working for some reason.

0 votes

1 answers

3664 views

ANSWER

Hi,

I just saw on this documentation: http://doc.nuxeo.com/display/NXDOC/Session+And+Transaction+Management#SessionAndTransactionManagement-SelectingTheDefaultRepository that you can specify your repo when accessing by JAXRS.

Maybe it could help…

12/31/2012



Hello Vladimir, thank you for your documentation. Alexis from Solutis.

0 votes