The best knowledge base on Apache Cassandra®

Helping platform leaders, architects, engineers, and operators build scalable real time data platforms.

Cannot make Apache Java Cassandra Driver talk to Azure Cosmos

I have an existing application which uses Apache Cassandra, and I am attempting to check its compatibility with Azure Cosmos DB for Apache Cassandra

My application uses a recent 4.x version of the DataStax Java Driver for Cassandra (this has subsequently been adopted by Apache themselves).

To eliminate my app from the equation, I took the sample from here and tried it - then updated it to the newest driver and tried again:

https://github.com/Azure-Samples/azure-cosmos-db-cassandra-java-getting-started-v4/tree/master

No matter what I do, this is the error I get:

com.datastax.oss.driver.internal.core.protocol.FrameDecodingException: Error decoding frame for streamId 21584
        at com.datastax.oss.driver.internal.core.protocol.FrameDecoder.decode(FrameDecoder.java:108)
        at io.netty.handler.codec.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:333)
        at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:530)
        at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:469)
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1519)

...

Caused by: com.datastax.oss.driver.api.core.connection.FrameTooLongException: Adjusted frame length exceeds 268435456: 825110825 - discarded
[s0] Error connecting to Node(endPoint=xxxx.documents.azure.com/xxx:443, hostId=null, hashCode=1e66f887), trying next node 

Has anyone got Java code working against Cosmos using the Cassandra wire protocol?