Normally you have to use driver.executeDocumentQuery(...) for document queries.
To illustrate the differences between driver.executeDocumentQuery(...) and driver.executeAqlQuery(...) I added an example.
Download the ArangoDB java driver on github and compile it with maven:
mvn clean install -DskipTests=true -Dgpg.skip=true -Dmaven.javadoc.skip=true -B
Maven creates the standalone driver JAR file (arangodb-java-driver-X.X.X-SNAPSHOT-standalone.jar) containing all dependencies in the target directory.
Fetch the example code:
wget https://gist.githubusercontent.com/anonymous/bd68b523647548e5fb36d27c29561cfe/raw/f2922d431b9f1e5a3f3239e9024cf342536f55f7/AqlExample.java
Compile the example code:
javac -classpath arangodb-java-driver-X.X.X-SNAPSHOT-standalone.jar AqlExample.java
Start the ArangoDB without authentication on the default port and run the example code:
java -classpath arangodb-java-driver-X.X.X-SNAPSHOT-standalone.jar:. AqlExample
CursorResult<BaseDocument> rs = driver.executeAqlQuery(query, null, null, BaseDocument.class);-- hereexecuteAqlQueryRawand notexecuteAqlQuery?