-
Notifications
You must be signed in to change notification settings - Fork 40.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intermittent NoClassDefFoundError: com/mongodb/internal/binding/ReferenceCounted #43290
Comments
Thanks for the report. There certainly appears to be some similarity with #38611, but in this case it seems that the failure's occurring during startup and on the main thread. The problem in #38611 was occurring off the main thread and only when it had been interrupted. Unfortunately, without a way to reproduce the failure, I don't think we'll be able to diagnose the problem and either fix it or determine that it has an external cause. You could try using the classic loader implementation to see if that makes a difference. The new loader was introduced in Spring Boot 3.2.0 so, given that 3.3.2 works, it may not make a difference. It would also be interesting to know if the problem occurs with 3.3.3 as that would narrow down the differences between a working version and a failing version. Beyond that, I think we're really going to need a minimal sample that reproduces the problem to make any progress here. |
We tried using the classic loader on Spring 3.4.0 with a cron job set to run every 5 minutes. In the past 24 hours, we haven't had any failures, which is better than our usual rate of around 3 failures. Next, we will test version 3.3.3 without the classic loader for the next 24 hours, and also continue running the job without the classic loader for 48 hours to further evaluate its result. Unfortunately, I have no idea how to reproduce the failure because when you get 3 failures at day with this (5 min) schedule there is no idea what to do to reproduce that or catch. Tomorrow, I will update the information regarding 3.3.3. If you have any ideas on how to reproduce or expand the logs, or any other suggestions, please feel free to share them. |
We checked other version and current data is: spring 3.3.2 - no issues (or we never catch them) If its also needed we use amazoncorretto:21.0.5 |
Thanks for the additional details. Looking more closely at the original stack trace, I've noticed a couple of things:
1 requires some non-default configuration of Mongo. Please share that configuration with us. For 2, if I call The loader can be configured to output some debug information ( |
I will collect all the mentioned information on various versions to compare. The error hasn't happened again in the last few days, but please don't close the issues for now. Once I have all the required logs, I will update the thread. |
looks like -Dloader.debug=true solved or masked real problem |
That may well be because the |
Yes - exactly - by my opinion |
That's unfortunate, but thanks for trying it. Working on the theory that it may be a race condition, could you try deploying the apps with |
We collected full logs with different settings that you requested. Mongo settings could be found at 'without debug file'. They printed as 'log info' object. spring_335_wihtout_debug_failed.log Also, I run |
With |
Thanks, @Osmyslitelny. I had hoped to compare the Would it be possible to capture the output again please? |
I agree that logs from |
Sorry, I don't know why that would be. The |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Introduction:
Before, I created an issue at spring-data-mongodb, but they recommended creating an issue for spring boot. Therefore, I copied the issue and created a new one in this repository.
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:
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:
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:
The text was updated successfully, but these errors were encountered: