MappingException for Map type of data

While saving Map type data in couchBase I am getting an exception

Caused by: Couldn’t find PersistentEntity for type java.lang.Object!

I’ve taken a map in DataModel

public class test { 
  private Map<String,Object> testMap;

I found this and override couchBase configuration to do customMapping in case of Object Type like

protected <R> R read(final TypeInformation<R> type, final CouchbaseDocument source,
        final Object parent) {
      if (Object.class == typeMapper.readType(source, type).getType()) {
        return (R) source.export();
      } else {
        return, source, parent);

It worked for the request like


But failed for

{“dummyMap”: {
“key1”: “val1”,
“key2”: “val2”,
“objects”: [
“key1”: “val1”,
“key2”: “val2”

with exception

Caused by: java.lang.IllegalArgumentException: Basic type must not be null!

I guess it is because of the array. Please let me know what I am doing wrong.

I am using spring-data-couchbase version 2.0.4.RELEASE.

Hi @abhishekmbmit,

In the future, you may be better off asking Java related questions in the Java SDK forum here:

I’m tagging @daschl and @subhashni as a couple of people who might be able to help you.

I am also facing same issue please help…

did you solve it brother ?

I am also facing The same issue can anyone resolved it??

If I have This type of data in Couchbase Like in One Json Array Conatins Json Object and Json Array then how to define Entity Object In Java for couchbase . When i am defining Through Map . I am getting error while fetching data from Couchbase through Java or Spring Boot
Caused by: java.lang.IllegalArgumentException: Basic type must not be null!