[JAVA-2800] ChangeStreamDocumentCodec unable to decode POJO using PojoCodecProvider configured with automatic(true) Created: 05/Mar/18 Updated: 28/Oct/23 Resolved: 07/Mar/18 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | POJO |
| Affects Version/s: | 3.6.3 |
| Fix Version/s: | 3.6.4, 3.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Sanjay Gianchandani | Assignee: | Ross Lawley |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | java | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Description |
|
Customer was trying to use MongoCollection#watch feature with a POJO for a document class, and got an exception. Reproduced (by Jeff Yemin) with a registry through this code:
Causes:
|
| Comments |
| Comment by Githook User [ 07/Mar/18 ] |
|
Author: {'email': 'ross.lawley@gmail.com', 'name': 'Ross Lawley', 'username': 'rozza'}Message: Fix ChangeStreamDocumentCodec registry order Previously, prevented the use of automatic codecs.
|
| Comment by Githook User [ 07/Mar/18 ] |
|
Author: {'email': 'ross.lawley@gmail.com', 'name': 'Ross Lawley', 'username': 'rozza'}Message: Fix ChangeStreamDocumentCodec registry order Previously, prevented the use of automatic codecs.
|
| Comment by Ross Lawley [ 05/Mar/18 ] |
|
This is occurs when using an automatic PojoCodecProvider, the current workaround is to explictly declare your classes / packages with the PojoCodecProvider rather than using the automatic. |