Import org.nuxeo.client.api cannot be resolved

Hi, I try to create a java client nuxeo, I followed this tutorial, but i can't import “org.nuxeo.client.api”. it fails with an error : the import org.nuxeo.client.api cannot be resolved. Does anyone have any idea of this error?

Thank you, Amel.

0 votes

1 answers




Indeed, it's a mistake in our documentation. I will update it.

There's no more api in package declaration, see , the correct package name for NuxeoClient is org.nuxeo.client.NuxeoClient.

0 votes

Hi, When i run the main class i have an exeption : Exception in thread "main" java.lang.NoSuchMethodError: retrofit2.Retrofit.newBuilder()Lretrofit2/Retrofit$Builder; My main class contains just this code : public class TestRest {

static String url = "http://localhost:8080/nuxeo";

public static void main(String[] args)  {

    NuxeoClient nuxeoClient = new NuxeoClient.Builder()
            .authentication("Administrator", "Administrator")

    // Fetch the root document
    Document root = nuxeoClient.repository().fetchDocumentRoot();

Is there another missing import ? Thank you for your reply



Next time don't hesitate to give your stack trace, generally ~10-15 lines are enough. Here it seems you don't depend on Retrofit version required by nuxeo-java-client. The client requires retrofit 2.3.0. Do you need retrofit in your application ? if not you can remove it from your pom and leveragae transitive dependency with maven.


Thank you for your reply.