I've developed a new application with Spring Data Cassandra 2.2.1 and want to run it against a Cassandra 2.1.9 server (old, I know). But we get the error
com.datastax.driver.core.exceptions.UnsupportedProtocolVersionException: Host does not support protocol version V4 but V3
The Spring Data Cassandra manual claims that Spring Data 2.2.1 needs at least Cassandra 2.1, so this should work but it doesn't. The only cassandra-specific dependency we include is org.springframework.boot:spring-boot-starter-data-cassandra
How can I get this to work?
Turns out you can configure the protocol version the driver uses. The default with Spring Boot Cassandra 2.2.1 and
com.datastax.driver.core3.7.2 is V4, i.e. at least Cassandra 2.2.0.To configure it:
And e.g. in your
application.ymlfor Cassandra 2.1.9: