[BUG] Operation not allowed for a result set of type ResultSet.TYPE_FORWARD_ONLY
viveleroi opened this issue ยท 2 comments
Apparently jdbc driver 7.6 changed the default resultset type to not allow scrolling, so this exception gets thrown whenever you use resultSet.first
or similar non-forward methods. The solution is to either pass in different resultset types when creating the statement, or avoid using non-forward methods.
[11:07:39] [Craft Scheduler Thread - 11/ERROR]: [Prism] Database connection error: Operation not allowed for a result set of type ResultSet.TYPE_FORWARD_ONLY.
[11:07:39] [Craft Scheduler Thread - 11/WARN]: java.sql.SQLException: Operation not allowed for a result set of type ResultSet.TYPE_FORWARD_ONLY.
[11:07:39] [Craft Scheduler Thread - 11/WARN]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
[11:07:39] [Craft Scheduler Thread - 11/WARN]: at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
[11:07:39] [Craft Scheduler Thread - 11/WARN]: at com.mysql.cj.jdbc.result.ResultSetImpl.first(ResultSetImpl.java:603)
[11:07:39] [Craft Scheduler Thread - 11/WARN]: at com.botsko.prism.libs.hikari.pool.HikariProxyResultSet.first(HikariProxyResultSet.java)
[11:07:39] [Craft Scheduler Thread - 11/WARN]: at me.botsko.prism.database.sql.SqlSelectIdQueryBuilder.execute(SqlSelectIdQueryBuilder.java:63)
[11:07:39] [Craft Scheduler Thread - 11/WARN]: at me.botsko.prism.actionlibs.ActionsQuery.getQueryExtents(ActionsQuery.java:166)
[11:07:39] [Craft Scheduler Thread - 11/WARN]: at me.botsko.prism.purge.PurgeTask.run(PurgeTask.java:66)
[11:07:39] [Craft Scheduler Thread - 11/WARN]: at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:100)
[11:07:39] [Craft Scheduler Thread - 11/WARN]: at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54)
[11:07:39] [Craft Scheduler Thread - 11/WARN]: at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[11:07:39] [Craft Scheduler Thread - 11/WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[11:07:39] [Craft Scheduler Thread - 11/WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[11:07:39] [Craft Scheduler Thread - 11/WARN]: at java.base/java.lang.Thread.run(Thread.java:829)
To Reproduce
Use prism with recent jdbc drivers.
Expected behavior
No errors.
Server (please complete the following information):
- Prism Version: 2.1.7.6
- Server Type: Paper
- Server Version: 1.16.5
Hmm, even though I used github's search function, I didn't see #257
Ok this appears to be Paper-related, not another plugin. I'm still looking. I switched back to paper build 332
and I have no errors. I switch to build 674 and get these errors. I use version control for my server stuff so I can verify no other changes are present.
Looks like #258 already addresses this. I'll try the dev builds.