Skip to content

"No value specified" for non-declared bind parameter #177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Queatz opened this issue Feb 16, 2018 · 10 comments
Closed

"No value specified" for non-declared bind parameter #177

Queatz opened this issue Feb 16, 2018 · 10 comments
Assignees
Labels
Milestone

Comments

@Queatz
Copy link

Queatz commented Feb 16, 2018

I'm experiencing a bit of an odd behavior.

The following error is being thrown sporadically (about every 20-50th query):

com.arangodb.ArangoDBException: Response: 400, Error: 1551 - AQL: no value specified for declared bind parameter 'client' (while parsing)
	at com.arangodb.internal.util.ResponseUtils.checkError(ResponseUtils.java:53)
	at com.arangodb.internal.velocystream.VstCommunication.checkError(VstCommunication.java:116)
	at com.arangodb.internal.velocystream.VstCommunicationSync.execute(VstCommunicationSync.java:143)
	at com.arangodb.internal.velocystream.VstCommunicationSync.execute(VstCommunicationSync.java:48)
	at com.arangodb.internal.velocystream.VstCommunication.execute(VstCommunication.java:100)
	at com.arangodb.internal.velocystream.VstProtocol.execute(VstProtocol.java:47)
	at com.arangodb.internal.ArangoExecutorSync.execute(ArangoExecutorSync.java:71)
	at com.arangodb.internal.ArangoExecutorSync.execute(ArangoExecutorSync.java:53)
	at com.arangodb.internal.ArangoExecutorSync.execute(ArangoExecutorSync.java:49)
	at com.arangodb.ArangoDatabase.query(ArangoDatabase.java:358)
	at com.inceptionnotes.sync.store.NoteStore.updateRelationshipsForNoteProp(NoteStore.java:201)

The query is:

    private static final String AQL_UPDATE_RELATIONSHIPS_INSERT_STEP = "FOR target IN @value\n" +
            "    UPSERT { _from: @note, _to: target, kind: @prop }\n" +
            "        INSERT { _from: @note, _to: target, kind: @prop }\n" +
            "        UPDATE {}\n" +
            "        IN relationships";

As you can observe, there is no @client binding in this query.

Note #1 This is in a multi-threaded websocket environment (running on Tomcat.)

Note #2 Other queries using the same ArangoDatabase object do use@client and it is very likely for those queries to execute close in time to the one throwing the error above.

@Queatz Queatz changed the title No value declared "No value specified" for non-declared bind parameter Feb 16, 2018
@mvollmary
Copy link

Hi @Queatz,

thanks for reporting. This problem belongs to our network protocol VelocyStream. We are currently investigating if the bug is in our Server or the driver.

As long as we have not fixed the error you can use HTTP in driver as a workaround.

ArangoDB arango = new ArangoDB.Builder().useProtocol(HTTP_VPACK).build();

@mvollmary mvollmary self-assigned this Feb 16, 2018
@mvollmary mvollmary added the bug label Feb 16, 2018
@Queatz
Copy link
Author

Queatz commented Feb 16, 2018

Thanks @mpv1989 - I went ahead and tested .useProtocol(Protocol.HTTP_VPACK) and .useProtocol(Protocol.HTTP_JSON) and observed the error with them both.

Here it is over HTTP:

16-Feb-2018 23:11:58.399 INFO [https-openssl-nio-0.0.0.0-8443-exec-8] com.inceptionnotes.sync.ws.WebsocketClient.onError WEBSOCKET (ERROR): Response: 400, Error: 1552 - AQL: bind parameter 'prop' was not declared in the query (while parsing)
com.arangodb.ArangoDBException: Response: 400, Error: 1552 - AQL: bind parameter 'prop' was not declared in the query (while parsing)
	at com.arangodb.internal.util.ResponseUtils.checkError(ResponseUtils.java:53)
	at com.arangodb.internal.http.HttpConnection.checkError(HttpConnection.java:340)
	at com.arangodb.internal.http.HttpConnection.execute(HttpConnection.java:204)
	at com.arangodb.internal.http.HttpCommunication.execute(HttpCommunication.java:144)
	at com.arangodb.internal.http.HttpCommunication.execute(HttpCommunication.java:129)
	at com.arangodb.internal.http.HttpProtocol.execute(HttpProtocol.java:49)
	at com.arangodb.internal.ArangoExecutorSync.execute(ArangoExecutorSync.java:71)
	at com.arangodb.internal.ArangoExecutorSync.execute(ArangoExecutorSync.java:53)
	at com.arangodb.internal.ArangoExecutorSync.execute(ArangoExecutorSync.java:49)
	at com.arangodb.ArangoDatabase.query(ArangoDatabase.java:358)
	at com.inceptionnotes.sync.store.NoteStore.setPropSeenByClient(NoteStore.java:175)

@mvollmary
Copy link

@Queatz Ok, interesting. I wasn't able to reproduce this behavior. Are you able to share parts of your source code which could belong to this problem.

@mvollmary
Copy link

@Queatz Thanks.

I think I found the bug. I was able to reproduce your problem if one of the bind parameters has the value null. The driver does not serialize null values by default. I changed this for the bind parameters. You can try my fix with driver version 4.3.4-SNAPSHOT. Please let me know if this fixes your problem.

This fix should also solve your problem arangodb/arangodb#4582

@mvollmary mvollmary added this to the 4.3.4 milestone Feb 20, 2018
@Queatz
Copy link
Author

Queatz commented Feb 20, 2018

This does fix arangodb/arangodb#4582 I have still seen this error with 4.3.4-SNAPSHOT When printing out the param bindings, they all are strings.

@pilot4u
Copy link

pilot4u commented Mar 8, 2018

I started getting this error, when executing my Foxx service:
AQL: no value specified for declared bind parameter 'lat' (while parsing)

my query:
for rest in Rest
let dist = distance(rest.location.geo[0],rest.location.geo[1], @lat, @lng)
sort dist
return MERGE(rest,{distance:dist})

query parameters:
{"lng":31.749314,"lat":34.9937314}
this issue started today after I upgraded from version 3.3.3 to version 3.3.4

the same query is running OK using arangosh , and arangojs driver.
but when running on Foxx service receiving described error

might it be related to this bug fix, which should be implemented for inner js @arrangodb ?

@mvollmary
Copy link

Hi @pilot4u ,

as I understand you correctly, in your case the Java driver is not involved. So the problem could be on server side. Can you please open a github issue in https://github.com/arangodb/arangodb with all information about your setup?

Thanks & best
Mark

@mvollmary
Copy link

released version 4.3.4

@mvollmary
Copy link

@Queatz if you have still the same problem, please open the issue again and I will take another look

@mvollmary mvollmary reopened this Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants