Here is 3.0 driver based code:
This worked fine against cassandra 2.0. We do have some cassandra 1.2 clusters. There it fails with
Here is the error on cassandra:
Looking through cassandra code, server gets the count of bound variables as 10 for some reasons and tries to read them and obviously fails. Adding .withProtocolVersion(ProtocolVersion.V1) did not make any difference.