1
votes

We are trying to upgrade DSE from 4.6 to 4.8.11 but we are facing version not supportable issue when connecting with client driver version 2.1.6. upgrade is happening in rolling fashion and we are getting com.datastax.driver.core.UnsupportedProtocolVersionException. After triaging, it looks like we need to specify protocol version to be used. Currently we connect to Cassandra using spring data Cassandra jar (1.3.2.RELEASE) but looks like XML config doesn't have option to set protocol version. Any help ?

This is what we want to achieve:

Cluster cluster = Cluster.builder().addContactPoint("x.x.x.x").withProtocolVersion(ProtocolVersion.V2).build();

http://docs.datastax.com/en/developer/java-driver/2.1/manual/native_protocol/#protocol-version-with-mixed-clusters

1

1 Answers

1
votes

The answer is yes and no:

  • Configuration of ProtocolVersion was introduced with version 1.5.
  • It's not possible to set ProtocolVersion through namespace config <cassandra:cluster port=… />.
  • It's possible to set ProtocolVersion on CassandraCqlClusterFactoryBean using Spring Data for Apache Cassandra 1.5. You can reference CassandraCqlClusterFactoryBean from your XML config (<bean class="o.s.c.c.CassandraCqlClusterFactoryBean">…</bean>) but you won't be able to benefit from the improved namespace configuration support.

Ideally, switch for CassandraCqlClusterFactoryBean to Java-config. You can mix XML and JavaConfig.

References: