Problem with nuxeo java automation client 6.0

Hello I'm newbie in the nuxeo world and I was trying to follow the examples in . I've deployed the nuxeo 6.0 platform and created a test to try to connect to the automation platform, adding the dependency in the project's pom file:


When I run the test, at the moment to adquire a Session, the program fails with a NoSuchMethodError:

public void conexion() throws Exception {
    HttpAutomationClient client = new HttpAutomationClient(
    Session session = client.getSession("username", "password");

The exception is thrown at Session session = client.getSession();

java.lang.NoSuchMethodError: java.lang.NoSuchMethodError:;
at org.nuxeo.ecm.automation.client.jaxrs.spi.JsonMarshalling.newJsonFactory(
at org.nuxeo.ecm.automation.client.jaxrs.spi.JsonMarshalling.<clinit>(
at org.nuxeo.ecm.automation.client.jaxrs.spi.Request.handleResult(
at org.nuxeo.ecm.automation.client.jaxrs.impl.HttpConnector.execute(
at org.nuxeo.ecm.automation.client.jaxrs.impl.HttpConnector.execute(
at org.nuxeo.ecm.automation.client.jaxrs.spi.ConnectorHandler.execute(
at org.nuxeo.ecm.automation.client.jaxrs.spi.AbstractAutomationClient.connect(
at org.nuxeo.ecm.automation.client.jaxrs.spi.AbstractAutomationClient.getSession(

The jackson dependencies for the automation client seems to be right, version 1.8.1 for jackson-core-asl and jackson-mapper-asl ( and both jars are the same that are included with the Nuxeo Platform).

If a try to GET the url from the browser, I get a JSON describing the automation chains availables (or at least I think so), so the server looks to be working correctly.

Has anyone fall in the same error?

Thanks in advance. Gonzalo Ferreyra

0 votes

1 answers



I'm sorry guys, but it was a class loading problem; In my pom.xml file, there was declared glassfish-embedded-all as a test dependency, which seems to be loading another version of the jackson libs. I revert the order in the pom (first the nuxeo-automation-client dependency, and after that the glassfish-embedded-all dependency) and the problem was gone. I'm connecting with the server without any problems. Thanks, Gonzalo.

0 votes