JOIN or NEST on same bucket

[Java]
Thanks @gadipati.
The fact that the same query sometimes works sometimes not is weird.
From the look of the stack trace, the parser tries to find a response section (like signature/errors/results) right at the beginning of the response (which should have been parsed separately before to extract the requestID part)…

Can you try and reproduce it with full logging enabled and post the full log on pastebin, gist.github.com or similar site? To activate full logging, for example if you have/add log4j in your classpath, you can use the following log4j.properties configuration (the TRACE being the important part):

# Root logger option
log4j.rootLogger=TRACE, stdout

# Direct log messages to stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%t] %d{HH:mm:ss} %-5p %c{1}:%L - %m%n

This will give us every network message and allow me to see how the response was transmitted (eg. was it split into chunks, how are the chunks looking, …).

Also can you tell us more about your setup? Does this happen in a local test with just one node for example, or on a larger cluster? Does it show inconsistency in the same client (eg. querying in a loop) or in multiple clients, or in multiple executions? Running the same query in cbq command line client, what do you obtain from the n1ql server?

Thanks
Simon