-
Notifications
You must be signed in to change notification settings - Fork 379
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
BasePreparedStatement的初始化策略问题 #233
Comments
bug又没人管吗? |
这个问题内部已经评审过了,会放在下个 2.4.1 / 3.0.6 版本中修复 |
那就好,我只是怕没人理会那就不太棒了 |
首先,sofa-tracer-datasource-plugin 思路确实不错 这种错误太致命了,直接影响生产环境
|
@iamcyw do you have demo code? |
抱歉没有,我只是阅读jdbctemlate代码 |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
java.lang.IllegalStateException: BasePreparedStatement has not been initialized at com.alipay.sofa.tracer.plugins.datasource.BasePreparedStatement.checkState(BasePreparedStatement.java:98)
当使用JdbcTemplate.update(JdbcTemplate.java:927)方法,由于tracer-datasource-plugin中的BasePreparedStatement会在getParameterMetaData执行前做checkState,但BasePreparedStatement的initialized是被延迟到第一次执行 SQL时才会被初始化,所以会导致checkState失败。
Steps to reproduce
调用JdbcTemplate.update(String sql, @nullable PreparedStatementSetter pss)
Environment
java -version
): 1.8uname -a
): Win10The text was updated successfully, but these errors were encountered: