【发布时间】:2021-07-12 10:12:32
【问题描述】:
跑步:
- Ubuntu 18.04.5 LTS(MacOS BigSur 一切正常)
- 播放框架版本 2.7.4。
- play_slick 4.0.2
- sqlite%3.34.0 或 h2%1.4.192
- openjdk 版本“11.0.11”(MacOS:openjdk 版本“11.0.8”2020-07-14)
我在 Mac 上开发,生产环境是 Ubuntu。在 Mac 上一切正常。在 Ubuntu 上,灵巧的动作崩溃了。 这是 slick 和 hikari 的调试输出:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/home/robert/tourneyservice-1.4.6/lib/com.google.inject.guice-4.2.2.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[info] c.z.h.HikariDataSource - db - Starting...
[info] c.z.h.HikariDataSource - db - Start completed.
...
[debug] s.b.B.action - #1: StreamingInvokerAction$HeadOptionAction [select "id", "uuid", "club", "orgDir", "licStr", "email", "name", "address", "password", "reqTStamp", "allowContact", "fullVersion" from "LICENSE" where "orgDir" = 'exampleclub']
[debug] s.j.J.statement - Preparing statement: select "id", "uuid", "club", "orgDir", "licStr", "email", "name", "address", "password", "reqTStamp", "allowContact", "fullVersion" from "LICENSE" where "orgDir" = 'exampleclub'
在巧妙的操作之后,播放框架错误处理程序被调用。 任何帮助表示赞赏。谢谢。
【问题讨论】:
-
这可能与 prod 与本地的数据库差异有关吗?你没有更多的日志吗?错误处理程序返回什么?
-
非常感谢,您给了我重要的提示。我有一个自定义错误处理程序,它试图响应一个 Ajax 调用的页面(所以我得到一个意外异常[ServerResultException:HTTP 1.0 客户端不支持分块响应])。我删除了错误处理程序,我得到了真正的原因:意外异常[SQLTransientConnectionException: db - Connection is not available, request timed out after 30001ms.]。
标签: playframework crash slick-3.0