Closed
Description
Hi,
I'm using server 3.1.14 and java driver 4.1.10 and i got an issue when the server shutdown when a request is sent.
When i try to execute this code :
try {
users = ArangoDB.db().query("FOR u IN User RETURN u", new MapBuilder().get(), null, User.class).asListRemaining();
} catch (ArangoDBException e) {
Logger.error(e, "error : %s", e.getMessage())
}
Here is a StackTrace i got :
play.exceptions.JavaExecutionException: java.net.SocketException: Relais brisé (pipe)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:231)
at Invocation.HTTP Request(Play!)
Caused by: java.lang.RuntimeException: java.net.SocketException: Relais brisé (pipe)
at com.arangodb.internal.velocystream.Connection.writeIntern(Connection.java:212)
at com.arangodb.internal.velocystream.ConnectionSync.write(ConnectionSync.java:85)
at com.arangodb.internal.velocystream.CommunicationSync.send(CommunicationSync.java:124)
at com.arangodb.internal.velocystream.CommunicationSync.execute(CommunicationSync.java:108)
at com.arangodb.internal.velocystream.CommunicationSync.authenticate(CommunicationSync.java:129)
at com.arangodb.internal.velocystream.Communication.connect(Communication.java:79)
at com.arangodb.internal.velocystream.CommunicationSync.execute(CommunicationSync.java:105)
at com.arangodb.internal.velocystream.CommunicationSync.execute(CommunicationSync.java:1)
at com.arangodb.internal.ArangoExecutorSync.execute(ArangoExecutorSync.java:58)
at com.arangodb.internal.ArangoExecutorSync.execute(ArangoExecutorSync.java:47)
at com.arangodb.ArangoDatabase.query(ArangoDatabase.java:237)
at controllers.Application.index(Application.java:16)
at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:544)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:494)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:489)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:458)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:162)
... 1 more
Caused by: java.net.SocketException: Relais brisé (pipe)
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at com.arangodb.internal.velocystream.Connection.writeIntern(Connection.java:210)
... 17 more
After a little digging, com.arangodb.internal.velocystream.Connection.writeIntern
is the only method that throws directly a RuntimeException
.
Is there a reason for such a 'feature', or do you think it can be an ArangoDBException
?
because this code
try {
users = ArangoDB.db().query("FOR u IN User RETURN u", new MapBuilder().get(), null, User.class).asListRemaining();
} catch (ArangoDBException | RuntimeException e) {
Logger.error(e, "error : %s", e.getMessage());
}
is absurd due to the inheritance beetwen ArangoDBException
and RuntimeException
Am i completely wrong or is there a misunderstanding ?
Thanks