<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Exception while communicating with Nuxeo Automation Server in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/exception-while-communicating-with-nuxeo-automation-server/m-p/324779#M11780</link>
    <description>&lt;P&gt;I just took the same example (modified slightly) and ran without issue against an existing 5.5 repository using Administrator credentials. If you paste the Automation server URL into a browser command line, enter credentials, can you then download and open the resulting JSON? Is there any chance it's a rights issue? Do you have all the required libraries on the build path? Here are the versions I used: httpclient-4.1.1, httpcore-4.1, nuxeo-automation-client-5.5-SNAPSHOT, ezmorph-1.0.4, json-lib-2.2.1-jdk15, mail-1.4.jar, jackson-mapper-asl-1.81, and jackson-core-asl-1.8.1 (actually the last two aren't mentioned in Nuxeo docs as dependencies but i did need them to get my example to work).&lt;/P&gt;
&lt;P&gt;Anywhere here's the code I just created and used...&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;import org.nuxeo.ecm.automation.client.Session;
import org.nuxeo.ecm.automation.client.jaxrs.impl.HttpAutomationClient;
import org.nuxeo.ecm.automation.client.model.Documents;

public class testautomation {   
  public static void main(String[] args) {

      String url = "http://192.168.5.115:8080/nuxeo/site/automation";
		
      HttpAutomationClient client = new HttpAutomationClient(url);
		
      Session session = client.getSession("Administrator", "Administrator");
      Documents docs = null;

		try {
			docs = (Documents) session.newRequest("Document.Query").set(
			        "query", "SELECT * FROM Document").execute();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		if (docs != null)
			System.out.println(docs);
		else
			System.out.println("No documents found");
  
     client.shutdown();
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 28 Mar 2012 14:54:43 GMT</pubDate>
    <dc:creator>bruce_Grant</dc:creator>
    <dc:date>2012-03-28T14:54:43Z</dc:date>
    <item>
      <title>Exception while communicating with Nuxeo Automation Server</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/exception-while-communicating-with-nuxeo-automation-server/m-p/324778#M11779</link>
      <description>&lt;P&gt;I have nuxeo DM 5.5 up and running at &lt;A href="http://localhost:8080/nuxeo/site/automation" target="test_blank"&gt;http://localhost:8080/nuxeo/site/automation&lt;/A&gt;
I am trying to access Nuxeo EP 5.5 Automation server from Nuxeo Java automation client as under:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;public static void main(String[] args) throws Exception {
    HttpAutomationClient client = new HttpAutomationClient(
           "http://localhost:8080/nuxeo/site/automation");    
    Session session = client.getSession("Administrator", "Administrator");
    Documents docs = (Documents) session.newRequest("Document.Query").set(
           "query", "SELECT * FROM Document").execute();
    System.out.println(docs); 
    client.shutdown();
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But, the above code giving me the following exception:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;java.lang.RuntimeException: Cannot execute {Content-Type=application/json+nxrequest, Accept=application/json+nxentity, */*, Authorization=Basic QWRtaW5pc3RyYXRvcjpBZG1pbmlzdHJhdG9y}
at org.nuxeo.ecm.automation.client.jaxrs.impl.HttpConnector.execute(HttpConnector.java:87)
at org.nuxeo.ecm.automation.client.jaxrs.spi.ConnectorHandler.execute(ConnectorHandler.java:28)
at org.nuxeo.ecm.automation.client.jaxrs.spi.DefaultSession.execute(DefaultSession.java:94)
at org.nuxeo.ecm.automation.client.jaxrs.spi.DefaultOperationRequest.execute(DefaultOperationRequest.java:155)
at com.redmath.recm.versionrnd.VersionManipulator.main(VersionManipulator.java:22)
Caused by: java.lang.NullPointerException
at org.nuxeo.ecm.automation.client.jaxrs.spi.marshallers.DocumentMarshaller.readDocument(DocumentMarshaller.java:53)
at org.nuxeo.ecm.automation.client.jaxrs.spi.marshallers.DocumentsMarshaller.readDocumentEntries(DocumentsMarshaller.java:42)
at org.nuxeo.ecm.automation.client.jaxrs.spi.marshallers.DocumentsMarshaller.readDocuments(DocumentsMarshaller.java:53)
at org.nuxeo.ecm.automation.client.jaxrs.spi.marshallers.DocumentsMarshaller.read(DocumentsMarshaller.java:94)
at org.nuxeo.ecm.automation.client.jaxrs.spi.marshallers.DocumentsMarshaller.read(DocumentsMarshaller.java:1)
at org.nuxeo.ecm.automation.client.jaxrs.spi.JsonMarshalling.readEntity(JsonMarshalling.java:143)
at org.nuxeo.ecm.automation.client.jaxrs.spi.Request.handleResult(Request.java:115)
at org.nuxeo.ecm.automation.client.jaxrs.impl.HttpConnector.execute(HttpConnector.java:121)
at org.nuxeo.ecm.automation.client.jaxrs.impl.HttpConnector.execute(HttpConnector.java:83)
... 4 more
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I am stuck &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; please help me out.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2012 09:08:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/exception-while-communicating-with-nuxeo-automation-server/m-p/324778#M11779</guid>
      <dc:creator>SMAH_Haider</dc:creator>
      <dc:date>2012-03-28T09:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Exception while communicating with Nuxeo Automation Server</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/exception-while-communicating-with-nuxeo-automation-server/m-p/324779#M11780</link>
      <description>&lt;P&gt;I just took the same example (modified slightly) and ran without issue against an existing 5.5 repository using Administrator credentials. If you paste the Automation server URL into a browser command line, enter credentials, can you then download and open the resulting JSON? Is there any chance it's a rights issue? Do you have all the required libraries on the build path? Here are the versions I used: httpclient-4.1.1, httpcore-4.1, nuxeo-automation-client-5.5-SNAPSHOT, ezmorph-1.0.4, json-lib-2.2.1-jdk15, mail-1.4.jar, jackson-mapper-asl-1.81, and jackson-core-asl-1.8.1 (actually the last two aren't mentioned in Nuxeo docs as dependencies but i did need them to get my example to work).&lt;/P&gt;
&lt;P&gt;Anywhere here's the code I just created and used...&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;import org.nuxeo.ecm.automation.client.Session;
import org.nuxeo.ecm.automation.client.jaxrs.impl.HttpAutomationClient;
import org.nuxeo.ecm.automation.client.model.Documents;

public class testautomation {   
  public static void main(String[] args) {

      String url = "http://192.168.5.115:8080/nuxeo/site/automation";
		
      HttpAutomationClient client = new HttpAutomationClient(url);
		
      Session session = client.getSession("Administrator", "Administrator");
      Documents docs = null;

		try {
			docs = (Documents) session.newRequest("Document.Query").set(
			        "query", "SELECT * FROM Document").execute();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		if (docs != null)
			System.out.println(docs);
		else
			System.out.println("No documents found");
  
     client.shutdown();
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Mar 2012 14:54:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/exception-while-communicating-with-nuxeo-automation-server/m-p/324779#M11780</guid>
      <dc:creator>bruce_Grant</dc:creator>
      <dc:date>2012-03-28T14:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Exception while communicating with Nuxeo Automation Server</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/exception-while-communicating-with-nuxeo-automation-server/m-p/324780#M11781</link>
      <description>&lt;P&gt;Bruce, I am able to download JSON response when I hit the URL on my browser. Actually I am able to run my example successfully with Nuxeo 5.4.2. But with Nuxeo 5.5 it gives me the above exception.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Mar 2012 14:23:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/exception-while-communicating-with-nuxeo-automation-server/m-p/324780#M11781</guid>
      <dc:creator>SMAH_Haider</dc:creator>
      <dc:date>2012-03-30T14:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Exception while communicating with Nuxeo Automation Server</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/exception-while-communicating-with-nuxeo-automation-server/m-p/324781#M11782</link>
      <description>&lt;P&gt;I'm running 1.6.0_30 - 64 bit&lt;/P&gt;</description>
      <pubDate>Fri, 30 Mar 2012 15:00:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/exception-while-communicating-with-nuxeo-automation-server/m-p/324781#M11782</guid>
      <dc:creator>bruce_Grant</dc:creator>
      <dc:date>2012-03-30T15:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Exception while communicating with Nuxeo Automation Server</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/exception-while-communicating-with-nuxeo-automation-server/m-p/324782#M11783</link>
      <description>&lt;P&gt;Can you give us the exact version of the nuxeo-automation-client jar. The line given in the stack do not correspond to the 5.5 source code.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2012 18:08:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/exception-while-communicating-with-nuxeo-automation-server/m-p/324782#M11783</guid>
      <dc:creator>slacoin_Lacoin</dc:creator>
      <dc:date>2012-04-06T18:08:39Z</dc:date>
    </item>
  </channel>
</rss>

