sijocherian / google-bigquery

Automatically exported from code.google.com/p/google-bigquery
0 stars 0 forks source link

[Known issue] Java SDK: 400 Error executing a query with BigQuery API, appengine-mapreduce and jackson-core-2.6.0-rc1 dependency #252

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Symptom:
=========
400
{
  "code" : 400,
  "errors" : [ {
    "domain" : "global",
    "location" : "query",
    "locationType" : "other",
    "message" : "Encountered \" <MAX_TOKEN_VAL> \"\\u0000 \"\" at line 1, column 1.\nWas expecting:\n    <EOF> \n    ",
    "reason" : "invalidQuery"
  } ],
  "message" : "Encountered \" <MAX_TOKEN_VAL> \"\\u0000 \"\" at line 1, column 1.\nWas expecting:\n    <EOF> \n    "
}

when trying to execute a statement using BigQuery API library BigQuery API V2 
Rev209 1.20.0 » v2-rev209-1.20.0 (The same query runs without any problems 
from command line or through BigQuery console)

Cause:
=========
there is an issue with UTF8JsonGenerator class in jackson-core-2.6.0-rc1.jar.
The line 431 writes _charBuffer without populating it with values.
This library is pulled through maven dependency of appengine-mapreduce

Workaround:
=========
has to explicitly exclude the faulty newer jackson version from mapreduce 
library.

Resolution
===========
jackson-core-2.6.0-rc1.jar is a third party library provided by FasterXML, LLC
the issue resolution on the upstream is tracked here 
https://github.com/FasterXML/jackson-core/issues/194

Original issue reported on code.google.com by s...@google.com on 25 May 2015 at 3:56

GoogleCodeExporter commented 9 years ago
Resolution
=======
the following fix was provided by FasterXML
https://github.com/FasterXML/jackson-core/commit/f93c9c8d390706abd2ebcda367c460f
5368b12db

Original comment by s...@google.com on 26 May 2015 at 3:06