I have a java class with @UDT and @Field annotations, the automatic mapping used to wrok with 2.1 but does not work anymore with 2.2.0-rc2.
It is difficult for me to provide a sample test because our project have another layer above the driver.
I think I found the problem in the com.datastax.driver.mapping.MappedUDTCodec.deserialize(ByteBuffer, ProtocolVersion) method. The mapping is correctly read but the ByteBuffer deserialization is done as values are read rather than explicitly requesting each field of the UDT.
I attached a fix proposal to this Jira issue.
Cassandra 2.2.0
your patch is outdated wrt the current 3.0 branch. We do not create an intermediary UDTValue instance anymore when deserializing. Are you still able to reproduce this bug? If yes, please provide a code snippet that shows how to reproduce.
I'm currently OOO for two weeks, I'll test again when I'll be back.
Can I use V3.0 driver with Cassandra 2.2?
Can I use V3.0 driver with Cassandra 2.2?
Yes.
It's been reported by another user on the mailing list (thread). As hinted by Jacques-Henri, the problem is that we serialize UDT field in the order that they come from annotation parsing, which might be different from the correct UDT definition order.
FYI we upgraded to 3.0 rc1 and problem is fixed, thx!