Blinker NoClassDefFoundError: com/mongodb/internal/binding/ReferenceCounted
Closed this issue · 1 comments
Context:
We have scheduled services (jobs) that run multiple times a day. However, there is an issue where 1-3 runs per day fail with an error. All other runs are problem-free. Therefore, the error seems blinked.
Environment:
- We run these services using an docker image on Kubernetes.
- We connect to AWS DocumentDB.
Versions:
I think the main dependencies are Spring and related MongoDB libraries (such as mongo-driver). We obtain these dependencies through spring-boot-dependencies. Also, every spring version have different mongo related lib versions. We have tested them with different versions:
- spring 3.3.2 - no issues (or we never catch them)
- spring 3.3.4 - error occurs
- spring 3.3.5 - error occurs
- spring 3.4.0 - error occurs
Verification:
Since the issue is not consistent, we have examined the logs and checked for common causes such as missing classpath or empty BOOT-INF data and etc. Everything appears correct (and most of the runs are successful).
Error full stacktrace:
trace.txt
Notes:
- At different versions, sometimes we encounter a NoClassDefFoundError with other com/mongodb classes.
- Mongo FAQ that related to issue but looks like everything at our sine is correct. That why was decided that problem could be on spring side.
- Local Integration test + mongo testcontainer (not AWS DocumentDB) never get error.
- Maybe something related with 38611
Thank you @Osmyslitelny for reporting. Looking at the stack trace I do not see any actionable items from a data project perspective. Please report this to the Spring Boot team. As you mentioned this might be an issue with the class loader.