org.bson.codecs.configuration.CodecConfigurationException: Can't find a codec for class com.XXX.persistence.mongo.integration.model.pojo.model.ComplexValue.


Samebug tips

Current Spark-Mongodb does not support 3.x mongo drivers. Use long instead of Date until it is upgraded.


,
via GitHub by pmadrigal

Current Spark-Mongodb does not support 3.x mongo drivers. Use long instead of Date until it is upgraded.


,
via github.com by Unknown author

Solutions on the web

Solution icon of googlegroups
Can't find a codec for class com.XXX.persistence.mongo.integration.model.pojo.model.ComplexValue.

Solution icon of github
Can't find a codec for class com.mongodb.DBRef.

Solution icon of github
Can't find a codec for class java.math.BigDecimal.

Solution icon of googlegroups
via Google Groups by Jonathan Marston, 10 months ago
Can't find a codec for class com.babelcentral.services.element.identity.Identity.

Solution icon of googlegroups
via Google Groups by Saju Joseph, 9 months ago
Can't find a codec for class io.airlift.slice.Slice.

Solution icon of web
via JIRA by Stanislav, 1 year ago
Can't find a codec for class [Ljava.lang.String;.

Solution icon of web
via JIRA by Alexander Azarov, 1 year ago
Can't find a codec for class java.sql.Timestamp.

Solution icon of spring
via Spring JIRA by Mark Paluch, 1 year ago
Can't find a codec for class java.time.ZonedDateTime.

Solution icon of stackoverflow
via Stack Overflow by 0xFF
, 1 year ago
Can't find a codec for class com.mongodb.course.com.mongodb.course.model.User.

Solution icon of stackoverflow
via Stack Overflow by svaret
, 11 months ago
Can't find a codec for class java.time.YearMonth.

Stack trace

org.bson.codecs.configuration.CodecConfigurationException: Can't find a codec for class com.XXX.persistence.mongo.integration.model.pojo.model.ComplexValue.
	at org.bson.codecs.configuration.CodecCache.getOrThrow(CodecCache.java:46)
	at org.bson.codecs.configuration.ProvidersCodecRegistry.get(ProvidersCodecRegistry.java:63)
	at org.bson.codecs.configuration.ProvidersCodecRegistry.get(ProvidersCodecRegistry.java:37)
	at com.mongodb.DBObjectCodec.writeValue(DBObjectCodec.java:210)
	at com.mongodb.DBObjectCodec.encodeIterable(DBObjectCodec.java:269)
	at com.mongodb.DBObjectCodec.writeValue(DBObjectCodec.java:198)
	at com.mongodb.DBObjectCodec.encodeMap(DBObjectCodec.java:220)
	at com.mongodb.DBObjectCodec.writeValue(DBObjectCodec.java:196)
	at com.mongodb.DBObjectCodec.encode(DBObjectCodec.java:128)
	at com.mongodb.DBObjectCodec.encode(DBObjectCodec.java:61)
	at com.mongodb.CompoundDBObjectCodec.encode(CompoundDBObjectCodec.java:48)
	at com.mongodb.CompoundDBObjectCodec.encode(CompoundDBObjectCodec.java:27)
	at org.bson.codecs.BsonDocumentWrapperCodec.encode(BsonDocumentWrapperCodec.java:63)
	at org.bson.codecs.BsonDocumentWrapperCodec.encode(BsonDocumentWrapperCodec.java:29)
	at com.mongodb.connection.RequestMessage.addDocument(RequestMessage.java:216)
	at com.mongodb.connection.RequestMessage.addCollectibleDocument(RequestMessage.java:182)
	at com.mongodb.connection.UpdateMessage.encodeMessageBody(UpdateMessage.java:66)
	at com.mongodb.connection.RequestMessage.encode(RequestMessage.java:132)
	at com.mongodb.connection.WriteProtocol.sendMessage(WriteProtocol.java:107)
	at com.mongodb.connection.WriteProtocol.execute(WriteProtocol.java:59)
	at com.mongodb.connection.UpdateProtocol.execute(UpdateProtocol.java:61)
	at com.mongodb.connection.UpdateProtocol.execute(UpdateProtocol.java:36)
	at com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:155)
	at com.mongodb.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:219)
	at com.mongodb.connection.DefaultServerConnection.update(DefaultServerConnection.java:84)
	at com.mongodb.operation.UpdateOperation.executeProtocol(UpdateOperation.java:66)
	at com.mongodb.operation.BaseWriteOperation$1.call(BaseWriteOperation.java:113)
	at com.mongodb.operation.BaseWriteOperation$1.call(BaseWriteOperation.java:106)
	at com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:186)
	at com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:177)
	at com.mongodb.operation.BaseWriteOperation.execute(BaseWriteOperation.java:106)
	at com.mongodb.operation.BaseWriteOperation.execute(BaseWriteOperation.java:58)
	at com.mongodb.Mongo.execute(Mongo.java:747)
	at com.mongodb.Mongo$2.execute(Mongo.java:730)
	at com.mongodb.DBCollection.executeWriteOperation(DBCollection.java:327)
	at com.mongodb.DBCollection.replaceOrInsert(DBCollection.java:405)
	at com.mongodb.DBCollection.save(DBCollection.java:394)
	at org.mongodb.morphia.DatastoreImpl.save(DatastoreImpl.java:1006)
	at org.mongodb.morphia.DatastoreImpl.save(DatastoreImpl.java:1080)
	at org.mongodb.morphia.DatastoreImpl.save(DatastoreImpl.java:1063)[...]

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
32 more bugmates