-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: POJO
-
None
Hi,
I'm getting a NPE at DecoderContext.decodeWithChildContext, but I'm not able to reproduce it at will..
The query works for some time, and suddenly starts to fail erratically (some times it fails some times it doestn't).
I tried to find if it was a concurrency type of issue, tried to syncronize access but didn't mattered.
Also happens with many version of the server (3.6.x, 4.0.x).
Tried changing the driver version (now running 3.11.0-rc0) but also didn't mattered.
Anything else you think I can try to corner it?
Regards,
Juan.
Caused by: java.lang.NullPointerException at org.bson.codecs.DecoderContext.decodeWithChildContext(DecoderContext.java:93) ~[bson-3.11.0-rc0.jar:?] at org.bson.codecs.pojo.PojoCodecImpl.decodePropertyModel(PojoCodecImpl.java:213) ~[bson-3.11.0-rc0.jar:?] at org.bson.codecs.pojo.PojoCodecImpl.decodeProperties(PojoCodecImpl.java:197) ~[bson-3.11.0-rc0.jar:?] at org.bson.codecs.pojo.PojoCodecImpl.decode(PojoCodecImpl.java:121) ~[bson-3.11.0-rc0.jar:?] at org.bson.codecs.pojo.PojoCodecImpl.decode(PojoCodecImpl.java:125) ~[bson-3.11.0-rc0.jar:?] at org.bson.codecs.pojo.MapPropertyCodecProvider$MapCodec.decode(MapPropertyCodecProvider.java:92) ~[bson-3.11.0-rc0.jar:?] at org.bson.codecs.pojo.MapPropertyCodecProvider$MapCodec.decode(MapPropertyCodecProvider.java:60) ~[bson-3.11.0-rc0.jar:?] at org.bson.codecs.DecoderContext.decodeWithChildContext(DecoderContext.java:93) ~[bson-3.11.0-rc0.jar:?] at org.bson.codecs.pojo.PojoCodecImpl.decodePropertyModel(PojoCodecImpl.java:213) ~[bson-3.11.0-rc0.jar:?] at org.bson.codecs.pojo.PojoCodecImpl.decodeProperties(PojoCodecImpl.java:197) ~[bson-3.11.0-rc0.jar:?] at org.bson.codecs.pojo.PojoCodecImpl.decode(PojoCodecImpl.java:121) ~[bson-3.11.0-rc0.jar:?] at org.bson.codecs.pojo.PojoCodecImpl.decode(PojoCodecImpl.java:125) ~[bson-3.11.0-rc0.jar:?] at com.mongodb.operation.CommandResultArrayCodec.decode(CommandResultArrayCodec.java:52) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at com.mongodb.operation.CommandResultDocumentCodec.readValue(CommandResultDocumentCodec.java:60) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at org.bson.codecs.BsonDocumentCodec.decode(BsonDocumentCodec.java:84) ~[bson-3.11.0-rc0.jar:?] at org.bson.codecs.BsonDocumentCodec.decode(BsonDocumentCodec.java:41) ~[bson-3.11.0-rc0.jar:?] at org.bson.codecs.configuration.LazyCodec.decode(LazyCodec.java:47) ~[bson-3.11.0-rc0.jar:?] at org.bson.codecs.BsonDocumentCodec.readValue(BsonDocumentCodec.java:101) ~[bson-3.11.0-rc0.jar:?] at com.mongodb.operation.CommandResultDocumentCodec.readValue(CommandResultDocumentCodec.java:63) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at org.bson.codecs.BsonDocumentCodec.decode(BsonDocumentCodec.java:84) ~[bson-3.11.0-rc0.jar:?] at org.bson.codecs.BsonDocumentCodec.decode(BsonDocumentCodec.java:41) ~[bson-3.11.0-rc0.jar:?] at com.mongodb.internal.connection.ReplyMessage.<init>(ReplyMessage.java:51) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at com.mongodb.internal.connection.InternalStreamConnection.getCommandResult(InternalStreamConnection.java:413) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at com.mongodb.internal.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:309) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at com.mongodb.internal.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:259) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at com.mongodb.internal.connection.UsageTrackingInternalConnection.sendAndReceive(UsageTrackingInternalConnection.java:99) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection.sendAndReceive(DefaultConnectionPool.java:450) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at com.mongodb.internal.connection.CommandProtocolImpl.execute(CommandProtocolImpl.java:72) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at com.mongodb.internal.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:218) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at com.mongodb.internal.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:269) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at com.mongodb.internal.connection.DefaultServerConnection.command(DefaultServerConnection.java:131) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at com.mongodb.internal.connection.DefaultServerConnection.command(DefaultServerConnection.java:123) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at com.mongodb.operation.CommandOperationHelper.executeCommand(CommandOperationHelper.java:341) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at com.mongodb.operation.CommandOperationHelper.executeCommand(CommandOperationHelper.java:332) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at com.mongodb.operation.CommandOperationHelper.executeCommandWithConnection(CommandOperationHelper.java:218) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at com.mongodb.operation.FindOperation$1.call(FindOperation.java:730) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at com.mongodb.operation.FindOperation$1.call(FindOperation.java:724) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:463) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at com.mongodb.operation.FindOperation.execute(FindOperation.java:724) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at com.mongodb.operation.FindOperation.execute(FindOperation.java:88) ~[mongodb-driver-core-3.11.0-rc0.jar:?] at com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.execute(MongoClientDelegate.java:189) ~[mongodb-driver-3.11.0-rc0.jar:?] at com.mongodb.client.internal.MongoIterableImpl.execute(MongoIterableImpl.java:143) ~[mongodb-driver-3.11.0-rc0.jar:?] at com.mongodb.client.internal.MongoIterableImpl.iterator(MongoIterableImpl.java:92) ~[mongodb-driver-3.11.0-rc0.jar:?] at com.mongodb.client.internal.MongoIterableImpl.forEach(MongoIterableImpl.java:121) ~[mongodb-driver-3.11.0-rc0.jar:?] at com.mongodb.client.internal.MongoIterableImpl.into(MongoIterableImpl.java:133) ~[mongodb-driver-3.11.0-rc0.jar:?] at [my code]