Skip to content
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

Get IllegalStateException when putting an object into the BlockingCache #3326

Open
lingyufei opened this issue Dec 23, 2024 · 1 comment
Open

Comments

@lingyufei
Copy link

Bug report?

  • When I create a BlockingCache and try to putObject, I get an error IllegalStateException("Detected an attempt at releasing unacquired lock. This should never happen."); which is caused by the empty lock when releaseLock

To fix a bug, we need to reproduce it first.
And we spend a lot of time just trying to reproduce the reported problem, so please consider creating a failing test case or an example project.

Feature request?

MyBatis version

3.5.17

Database vendor and version

Test case or example project

Steps to reproduce

Expected result

Actual result

@lingyufei lingyufei changed the title Get IllegalStateException when putting an object into the BlockingCach Get IllegalStateException when putting an object into the BlockingCache Dec 23, 2024
@harawata
Copy link
Member

Hello @lingyufei ,

BlockingCache (or any of MyBatis' internal cache classes) is not designed to be used in users' code directly.
So, it is not a bug if that is what you are trying to do.

If the exception is thrown in MyBatis' normal usage scenario, we need you to provide an executable demo project or test case.
Here are some project templates and examples : https://github.com/harawata/mybatis-issues
There also are some unit tests for blocking cache in this directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants