CoreProtect-CE 24.0 throws a SQLite exception when using the new typed lookup APIs with a player filter.
Affected methods include:
CoreProtectAPI.chatLookup(...)
CoreProtectAPI.commandLookup(...)
The exception happens while CoreProtect is resolving the player ID.
Error
java.sql.SQLException: no such column: 'rowid'
at org.sqlite.jdbc3.JDBC3ResultSet.findColumn(JDBC3ResultSet.java:51)
at org.sqlite.jdbc3.JDBC3ResultSet.getInt(JDBC3ResultSet.java:336)
at net.coreprotect.api.MessageAPI.getUserId(MessageAPI.java:99)
at net.coreprotect.api.LookupFilter.fromOptions(LookupFilter.java:32)
at net.coreprotect.api.MessageAPI.performLookup(MessageAPI.java:53)
at net.coreprotect.api.MessageAPI.performChatLookup(MessageAPI.java:30)
at net.coreprotect.CoreProtectAPI.chatLookup(CoreProtectAPI.java:291)
The same issue also occurs with commandLookup(...).
Expected behavior
The typed API should return matching chat or command results for the specified player.
Actual behavior
CoreProtect logs the SQL exception and returns an empty result list.
API consumers therefore only see “no results,” even when matching data exists.
Possible cause
The problem appears related to SQLite rowid alias handling.
For example, if a query uses:
but the result is later read using:
resultSet.getInt("rowid")
SQLite JDBC cannot find a result column named rowid, because it was aliased as id.
The result should instead be read using:
or the query should return rowid without renaming it.
Environment
- CoreProtect-CE: 24.0
- Database: SQLite
- Server software: Folia
- Minecraft: 1.21.11
- Java: 21
Steps to reproduce
- Enable the CoreProtect API.
- Use SQLite.
- Call a typed lookup method with a player filter:
LookupOptions options = LookupOptions.builder()
.user("PlayerName")
.time(86400)
.limit(0, 100)
.build();
coreProtectApi.chatLookup(options);
- Check the server console.
Additional information
The older generic performLookup(...) API does not produce this exact exception.
The problem started when switching an integration from the generic lookup API to the new typed APIs.
CoreProtect-CE 24.0 throws a SQLite exception when using the new typed lookup APIs with a player filter.
Affected methods include:
The exception happens while CoreProtect is resolving the player ID.
Error
The same issue also occurs with
commandLookup(...).Expected behavior
The typed API should return matching chat or command results for the specified player.
Actual behavior
CoreProtect logs the SQL exception and returns an empty result list.
API consumers therefore only see “no results,” even when matching data exists.
Possible cause
The problem appears related to SQLite
rowidalias handling.For example, if a query uses:
but the result is later read using:
SQLite JDBC cannot find a result column named
rowid, because it was aliased asid.The result should instead be read using:
or the query should return
rowidwithout renaming it.Environment
Steps to reproduce
Additional information
The older generic
performLookup(...)API does not produce this exact exception.The problem started when switching an integration from the generic lookup API to the new typed APIs.