Starting with version 1.2.10, prepared statements don't work, if running Cassandra with IBM Java.
For every prepared statement excution after a few one, we get the following error:
com.netflix.astyanax.connectionpool.exceptions.BadRequestException: BadRequestException: [host=localhost(127.0.0.1):9160, latency=1(1), attempts=1]InvalidRequestException(why:Prepared query with ID 2077244094 not found (either the query was not prepared on this host (maybe the host has been restarted?) or you have prepared too many queries and it has been evicted from the internal cache))
Astyanax version is 1.56.44.
This error only occurs with IBM Java, with Oracle Java the same code works fine.
We did some investigation about the different Cassandra and JRE versions:
Cassandra 1.2.9: works fine with any JRE-Version
Cassandra 1.2.10, 1.2.11: does not work with IBM Java 1.6/1.7. Works find with Oracle Java 1.6/1.7
Cassandra 2.0.0: works fine with any JRE-Version
Cassandra 2.0.2: does not work with IBM Java 1.6/1.7. Works fine with Oracle Java 1.6/1.7