[JAVA-5305] com.mongodb.MongoWriteException is not java.io.Serializable Created: 31/Jan/24 Updated: 05/Feb/24 |
|
| Status: | Waiting for Reporter |
| Project: | Java Driver |
| Component/s: | API |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Govind Balaji S | Assignee: | Jeffrey Yemin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Java Drivers
|
||||||||
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
||||||||
| Description |
| Comments |
| Comment by Govind Balaji S [ 01/Feb/24 ] |
|
Ah, I could not find the open ticket. The framework is internal, so I am able to workaround now by falling back to gson if java-serialization fails. I will pick this and audit soon. |
| Comment by Jeffrey Yemin [ 01/Feb/24 ] |
|
Ah, interesting. Is is an open source framework or something internal? If open source, please drop a link. An audit would be useful. Thanks. By the way, this is already in the backlog with JAVA-2131. |
| Comment by Govind Balaji S [ 01/Feb/24 ] |
|
I stumbled across this when an exception chain containing this could not make it across a grpc call. The framework I am using happens to use java-serialization for propagating exceptions. This looks fair enough since `java.lang.Exception implements Serializable` I can audit other exceptions as well and fix if that is okay. |
| Comment by Jeffrey Yemin [ 01/Feb/24 ] |
|
govind.balaji@sprinklr.com why do you need this particular exception (or any exception) to be serializable? I'm not sure, but I have a feeling if we look deeper we will find many more that are not. |
| Comment by Govind Balaji S [ 01/Feb/24 ] |
| Comment by Govind Balaji S [ 31/Jan/24 ] |
|
This only needs a minor fix. Let me know if I can pick this, or if there is any reason for `WriteError` to remain non-Serializable |
| Comment by PM Bot [ 31/Jan/24 ] |
|
Hi govind.balaji@sprinklr.com, thank you for reporting this issue! The team will look into it and get back to you soon. |