Objectmapper serialization failed for Map<text,UDT>

46 views
Skip to first unread message

Amol Khanolkar

unread,
Sep 15, 2020, 9:59:59 AM9/15/20
to DataStax Java Driver for Apache Cassandra User Mailing List
Hi 

I have entity A which has structure
- timestamp Date
- mapValues map[text,udt_b]

I am fetching and mapping results to bean using 
@Query("Select * from A where ..")
CompletionStage<MappedAsyncPagingIterable<A>> getEntity(...);

I am able to read all values and are getting mapped to POJO howerver POJO internally has additional UDT functions. So when POJO is serialized to Json I get below exceptions
[simple type, class com.datastax.dse.driver.internal.core.tracker.MultiplexingRequestTracker]; 
nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class com.datastax.dse.driver.internal.core.tracker.MultiplexingRequestTracker and 
no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) 

Jackson is finding below fields in the POJO>java.util.LinkedHashMap[\"mapValues\"]->com.myapp.udt_B[\"udtValue\"]->com.datastax.oss.driver.internal.core.data.DefaultUdtValue[\"type\"]->com.datastax.oss.driver.internal.core.type.DefaultUserDefinedType[\"attachmentPoint\"]->com.datastax.oss.driver.internal.core.context.DefaultDriverContext[\"requestTracker\"])"}

However instead of Map if my Entity is normal entity with UDT as field

- timestamp Date
- b udt_b
everything works as expected

Is this a bug ? or do i need to enable any setting to get Pojo Mapped

Regards
Amol

Amol Khanolkar

unread,
Sep 15, 2020, 11:42:18 AM9/15/20
to java-dri...@lists.datastax.com
Please ignore this email

This issue is not related to Datastax driver

Sorry for inconvenience

--
You received this message because you are subscribed to the Google Groups "DataStax Java Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-us...@lists.datastax.com.
To view this discussion on the web visit https://groups.google.com/a/lists.datastax.com/d/msgid/java-driver-user/1a4ce7d2-6cdb-4460-b791-50e868c7737en%40lists.datastax.com.
Reply all
Reply to author
Forward
0 new messages