[Performance] OGNL 3.4.9 synchronized lock causes thread blocking under high concurrency (fixed in OGNL 3.5.0 BETA2)
Author: kradmeCreated Dec 4, 2025Updated Aug 31, 2026
Labelsbug
About the Bug...
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of MyBatis.
I have confirmed this bug reproduces without 3rd party extensions (e.g. mybatis-plus).
Database Version
Oracle
JDBC Driver Version
ojdbc8
Issue Description
We are using MyBatis 3.5.19 in a high-concurrency business scenario (QPS ~ 11000+). During pressure testing, we found severe thread blocking issues, and we analysis showed the root cause is the global synchronized lock in method:ognl.internal.ClassCacheHandler.getHandler
ognl3.4.9 has Performance issue https://github.com/orphan-oss/ognl/pull/406,and fixed in 3.5.0 BETA1
About your report...
I did not use images ️ for showing text information (code, error, etc.).
I checked the Preview and my report looks awesome!
Source: mybatis/mybatis-3