---
schema_version: "1"
id: 8d79a69c645d0637b2c1356406f00668600c5900425a98697f91800e19495521
title: Upgrading and Migrating Cassandra Connector to 5.x
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/cassandra-connector/latest/cassandra-connector-upgrade-migrate.md
canonical_url: https://docs.mulesoft.com/cassandra-connector/latest/cassandra-connector-upgrade-migrate
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 349d5242d79bae3bfd973308e7a921ea6fae55d3e94ec2d48cc98aa57e234308
description: MuleSoft Documentation Site
release: "5.0"
latest: true
---
---
product: Apache Cassandra Connector
version: 5.0
is-latest-version: true
---

# Upgrading and Migrating Cassandra Connector to 5.x

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Upgrade Anypoint Connector for Apache Cassandra (Apache Cassandra Connector) from version 4.x to
version 5.x.

## Supported Upgrade Paths

<table><colgroup><col> <col></colgroup><thead><tr><th>From Version</th><th>To Version</th></tr></thead><tbody><tr><td><div><div><p>4.x</p></div></div></td><td><div><div><p>5.x</p></div></div></td></tr></tbody></table>

## Changes

### 5.0

- This connector now supports Apache Cassandra 5.x. The connector now uses DataStax Java Driver
  4.17.0.

- The [**Cassandra Cluster Name**](https://docs.mulesoft.com/cassandra-connector/latest/cassandra-connector-reference#config_connection) field is removed
  from Studio. It no longer appears on the **General** or **Advanced Settings** tab. Applications
  that still set `clusterName` on `cassandra-db:connection` fail to deploy. Delete the attribute.
  Contact points and [**Cassandra Cluster Nodes**](https://docs.mulesoft.com/cassandra-connector/latest/cassandra-connector-reference#config_connection)
  still select the cluster.

- The new [**Local Datacenter**](https://docs.mulesoft.com/cassandra-connector/latest/cassandra-connector-reference#config_connection) field is on the
  **Advanced Settings** tab. It sets the local datacenter for the driver’s load-balancing policy.
  Set this field when contact points don’t share one datacenter, such as in a multi-DC cluster. You
  can omit it for single-DC clusters.

- The new [**Request Timeout (ms)**](https://docs.mulesoft.com/cassandra-connector/latest/cassandra-connector-reference#config_connection) field is on
  the **Advanced Settings** tab. It sets the per-request timeout for CQL operations. The default is
  `12000` milliseconds, which preserves the 12-second deadline from version 4.1.

- On Apache Cassandra 5.x, the
  [**Change Column Type**](https://docs.mulesoft.com/cassandra-connector/latest/cassandra-connector-reference#changeColumnType) operation fails because
  Cassandra no longer supports altering column types. Add a new column, backfill the data, then drop
  the old column.

- TLS configuration now applies to the driver. The default
  [**Endpoint identification algorithm**](https://docs.mulesoft.com/cassandra-connector/latest/cassandra-connector-reference#config_connection) is
  `DISABLED`. If your XML still sets `HTTPS` or `LDAPS`, version 5.0 validates the server
  certificate against the host.

- Don’t select native protocol `V1` or `V2`. Those values fail at application initialization. Leave
  [**Protocol Version**](https://docs.mulesoft.com/cassandra-connector/latest/cassandra-connector-reference#config_connection) unset to let the driver
  negotiate, including native protocol V5 on Apache Cassandra 5.x.

- These libraries are upgraded to address reported security vulnerabilities:

  - The `jackson-core` and `jackson-databind` libraries are upgraded to version 2.22.2.

  - The `netty-codec` library is upgraded to version 4.2.0.Final.

  - The `netty-handler` library is upgraded to version 4.1.137.Final.

  - The `guava` library is upgraded to version 32.1.3-jre.

  - The `jnr-posix` library is upgraded to version 3.2.2.

  - The `commons-lang3` library is upgraded to version 3.20.0.

  - The `commons-collections4` library is upgraded to version 4.6.0.

## Requirements

Ensure your system meets the following compatibility requirements before you perform the upgrade:

<table><colgroup><col> <col></colgroup><thead><tr><th>Application/Service</th><th>Version</th></tr></thead><tbody><tr><td><p>Mule runtime</p></td><td><p>4.6.0 and later</p></td></tr><tr><td><p>Java</p></td><td><p>8, 11, and 17</p></td></tr><tr><td><p>Apache Cassandra</p></td><td><p>5.x</p></td></tr><tr><td><p>DataStax Java Driver</p></td><td><p>4.17.0</p></td></tr></tbody></table>

Mule versions 4.1 through 4.5 aren’t supported. Applications on these versions must remain on Apache
Cassandra Connector 4.1.x.

## Upgrade Prerequisites

Before you perform the upgrade, you must:

1.  Create a backup of your files, data, and configuration in case you need to restore to the
    previous version.

2.  Ensure that your environment meets the version 5.x requirements, including Mule 4.6.0 or later.

3.  Delete `clusterName` from every `cassandra-db:connection` element. If the attribute remains, the
    app fails to deploy.

4.  Set **Local Datacenter** on the **Advanced Settings** tab when the cluster is multi-DC or
    contact points don’t share one datacenter.

5.  Review `tls:context`. The default hostname validation is `DISABLED`. If XML still has `HTTPS` or
    `LDAPS`, version 5.0 validates the certificate against the host.

6.  Leave **Protocol Version** unset, or select `V3` or `V4`. Don’t select `V1` or `V2`.

## Upgrade Steps

Follow these steps to perform the upgrade from Apache Cassandra Connector 4.x to Apache Cassandra
Connector 5.x:

1.  In Anypoint Studio, create a Mule project.

2.  In the Mule Palette view, click **Search in Exchange**.

3.  In the **Add Dependencies to Project** window, enter `cassandra` in the search field.

4.  In the **Available modules** section, select **Cassandra** and click **Add**.

5.  Click **Finish**.

6.  Verify that the Cassandra Connector dependency version is `5.x.x` in the `pom.xml` file, where
    `x.x` is the minor release and patch version number. For example, if you are upgrading to v5.0,
    the dependency version in the `pom.xml` file should be `5.0.0`.

Studio upgrades the connector automatically.

## Verify the Upgrade

After you install the latest version of the connector, follow these steps to verify the upgrade:

1.  In Studio, verify that there are no errors in the **Problems** or **Console** views.

2.  Check the project `pom.xml` file and verify that there are no problems.

3.  Test the connection and verify that the operations work.

## Troubleshooting

If the app fails to deploy, check `cassandra-db:connection` for a `clusterName` attribute and delete
it.

If the app fails to deploy with an `InitialisationException` that native protocol `V1` or `V2` is no
longer supported, leave **Protocol Version** unset, or select `V3` or `V4`.

If the connection fails against a multi-DC cluster, set **Local Datacenter** on the **Advanced
Settings** tab to the datacenter that contains your contact points.

If **Change Column Type** fails with `Altering column types is no longer supported`, you are
connected to Apache Cassandra 5.x. Add a new column, backfill the data, then drop the old column.

If the TLS handshake fails, the certificate might not match the host. Set **Endpoint identification
algorithm** to `DISABLED`, or update the server certificate.

## Revert the Upgrade

If it is necessary to revert to the previous version of Apache Cassandra Connector, change the
Cassandra Connector dependency version in the project’s `pom.xml` file to the previous version.

You must update the project’s `pom.xml` file in Anypoint Studio.

## See Also

- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)

- [Salesforce Help](https://help.salesforce.com)
