I'm using in my java 11 project and migrating the code related to cassandra database from 3.60 to 4.13.0.
<cassandra.driver.oss.version>4.13.0</cassandra.driver.oss.version>
</dependency>-->
<!-- Cassandra Driver -->
<dependency>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-core</artifactId>
<version>${cassandra.driver.oss.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<!-- OPTIONAL DEPENDENCIES -->
<dependency>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-query-builder</artifactId>
<version>${cassandra.driver.oss.version}</version>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-mapper-runtime</artifactId>
<version>${cassandra.driver.oss.version}</version>
</dependency>
I can see in 3.x there was a class:
import com.datastax.driver.core.UserType;
which seems not to exist any more in 4.x
Is there any substitute for that in 4.x? How can this be handled in 4.x?
I tried searching for this class and/or its substitute in 4.x but with no luck so far. Just pointing me to this should be enough for me.
As part of CEP-8, DataStax has donated the DataStax Java Driver for Apache Cassandra® to the Apache Software Foundation on Nov 7, 2023. Other language driver donations will be followed shortly.
user@anddev@lists for Apache Cassandra®.Your new coordinates for the Java Driver will be,
with
4.18.0being the latest version as of this writing, but always recommended to leverage the latest version from releases section of the project.Having said the current state,
UserDefinedTypeclass for the4.xseries lives here & direct link to code is here. You could also take a look at this test class which showcases how to use this.There is also this great example repository that showcases how
3.xand4.xcompare and how to implement it.p/s The above repo still uses the
com.datastax.ossgroupId, but you get the concept/point of how to implement.I hope this helps! Good luck, cheers!