Skip to content
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

Malformed SQL query causing log spam #103

Open
SXRWahrheit opened this issue Mar 22, 2021 · 2 comments
Open

Malformed SQL query causing log spam #103

SXRWahrheit opened this issue Mar 22, 2021 · 2 comments
Assignees
Labels
Type: Bug Something isn't working

Comments

@SXRWahrheit
Copy link

This error is absolutely obliterating my logs:

[08:54:26] [Craft Scheduler Thread - 4/WARN]: org.h2.jdbc.JdbcSQLDataException: Scalar subquery contains more than one row; SQL statement:
[08:54:26] [Craft Scheduler Thread - 4/WARN]: SELECT balance, worldName, currency_id, username_id FROM cc3_balance LEFT JOIN cc3_currency ON cc3_balance.currency_id = cc3_currency.name WHERE cc3_balance.username_id = (SELECT id FROM cc3_account WHERE name =?) AND worldName=? AND cc3_currency.name=? [90053-199]
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.h2.message.DbException.getJdbcSQLException(DbException.java:587)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.h2.message.DbException.get(DbException.java:205)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.h2.message.DbException.get(DbException.java:181)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.h2.message.DbException.get(DbException.java:170)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.h2.expression.Subquery.getValue(Subquery.java:49)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.h2.index.IndexCondition.getCurrentValue(IndexCondition.java:138)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.h2.index.IndexCursor.prepare(IndexCursor.java:108)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.h2.index.IndexCursor.find(IndexCursor.java:154)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.h2.table.TableFilter.next(TableFilter.java:475)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.h2.command.dml.Select$LazyResultQueryFlat.fetchNextRow(Select.java:1882)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.h2.result.LazyResult.hasNext(LazyResult.java:101)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.h2.result.LazyResult.next(LazyResult.java:60)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.h2.command.dml.Select.queryFlat(Select.java:742)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.h2.command.dml.Select.queryWithoutCache(Select.java:884)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.h2.command.dml.Query.queryWithoutCacheLazyCheck(Query.java:151)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.h2.command.dml.Query.query(Query.java:435)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.h2.command.dml.Query.query(Query.java:397)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.h2.command.CommandContainer.query(CommandContainer.java:145)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.h2.command.Command.executeQuery(Command.java:202)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:115)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at com.greatmancode.craftconomy3.storage.sql.SQLStorageEngine.getBalance(SQLStorageEngine.java:368)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at com.greatmancode.craftconomy3.account.Account.getBalance(Account.java:147)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at net.milkbowl.vault.economy.plugins.Economy_Craftconomy3.getBalance(Economy_Craftconomy3.java:279)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at net.milkbowl.vault.economy.plugins.Economy_Craftconomy3.getBalance(Economy_Craftconomy3.java:121)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at net.milkbowl.vault.economy.AbstractEconomy.getBalance(AbstractEconomy.java:22)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at com.extendedclip.papi.expansion.vault.VaultEcoHook.getBalance(VaultEcoHook.java:220)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at com.extendedclip.papi.expansion.vault.BalTopTask.run(BalTopTask.java:48)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:99)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[08:54:26] [Craft Scheduler Thread - 4/WARN]: 	at java.lang.Thread.run(Thread.java:748)
@pavog
Copy link
Owner

pavog commented Mar 22, 2021

Hi and thanks for reporting this issue.
I think I have found the solution to fix it.
I uploaded a new release here, can you test it?

@pavog pavog self-assigned this Mar 22, 2021
@pavog pavog added the Type: Bug Something isn't working label Mar 22, 2021
@SXRWahrheit
Copy link
Author

I had to pull the plugin off live and replace it with a custom solution because of the log spam, but I can test the new version on a development environment later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants