-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Using @CacheNamespace
with <cache-ref />
could cause exception
#1194
Comments
Hi @abel533 , |
@harawata I uploaded an executable test case. |
Thank you, @abel533 ! I took a look and the problem, in this case, is the way you configured the mapper cache. It would be nice if we could remove the restriction, of course. |
I can't believe I had mentioned it twice. Although this may be limit, but if (!incompleteStatements.isEmpty()) {
synchronized (incompleteStatements) {
// This always throws a BuilderException.
incompleteStatements.iterator().next().parseStatementNode();
}
} When will incompleteStatements be cleared? |
I have the same problem. I think incomplete statement should be removed after reparsed correctly. And also incompleteResultMaps, incompleteCacheRefs, incompleteMethods. |
I`m using mybatis 3.4.6 release, this problem did not appear。 but In the 3.4.6 changes, this bug was not found to be fixed. |
@CacheNamespace
with <cache-ref />
could cause exception
Hi guys, Most problems reported with buildAllStatements() should be resolved in the latest 3.5.0-SNAPSHOT. |
mybatis-3/src/main/java/org/apache/ibatis/session/Configuration.java
Lines 772 to 797 in b5b3fb2
when
incompleteStatements
is not empty and theparseStatementNode
execute successful,incompleteStatements
not remove it. it's also not empty.Test
Screenshots
invoke selectById:
configuration.hasStatement(statementId)
will callbuildAllStatements
:configuration.getMappedStatement(statementId)
will callbuildAllStatements
:The text was updated successfully, but these errors were encountered: