-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
connectWithSpringSupport出现空指针异常 #376
Comments
经过排查,我发现引起此问题的原因是我使用了自定SQL语句同时执行出错,更改为正确的SQL语句后不再出现此问题 |
这里应该分为两个问题:
第2点我认为是框架没有正确处理,
|
abop
added a commit
to abop/ktorm
that referenced
this issue
Mar 4, 2024
kotlin-orm#376 `exceptionTranslator` 声明为 `return non-null`,但 `connectWithSpringSupport `用到的 `org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator` 在 `translator.translate("Ktorm", null, ex) `时会返回 `null`
@abop 有道理,之前没有注意到,后续考虑优化 |
@vincentlauvlwj #524 我看已经有 PR 了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
线上环境出现了NPE,测试环境却无法复现
查看日志:
对应库中源码:
猜测是
translate
方法为Nullable
而exceptionTranslator
仅接收Throwable
类型参数spring-boot-starter-jdbc
版本为2.6.2
,对应spring-jdbc
版本为5.3.14
ktorm
版本为3.4.1
The text was updated successfully, but these errors were encountered: