killbill/killbill-commons

org.killbill.queue.org.skife.jdbi.v2.exceptions.UnableToExecuteStatementException

yxz1025 opened this issue · 6 comments

Caused by: org.killbill.queue.org.skife.jdbi.v2.exceptions.UnableToExecuteStatementException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'getReadyEntries' at line 1 [statement:"getReadyEntries", located:"getReadyEntries", rewritten:"getReadyEntries", arguments:{ positional:{}, named:{max:100,now:Fri Sep 04 15:26:39 CST 2020}, finder:[]}]
at org.killbill.queue.org.skife.jdbi.v2.SQLStatement.internalExecute(SQLStatement.java:1340)
at org.killbill.queue.org.skife.jdbi.v2.Query.fold(Query.java:177)
at org.killbill.queue.org.skife.jdbi.v2.Query.list(Query.java:86)
at

org.killbill.queue.org.skife.jdbi.v2.sqlobject.ResultReturnThing$IterableReturningThing.result(ResultReturnThing.java:259)
at org.killbill.queue.org.skife.jdbi.v2.sqlobject.ResultReturnThing.map(ResultReturnThing.java:52)
at org.killbill.queue.org.skife.jdbi.v2.sqlobject.QueryHandler.invoke(QueryHandler.java:49)
at org.killbill.queue.org.skife.jdbi.v2.sqlobject.SqlObject.invoke(SqlObject.java:184)
at org.killbill.queue.org.skife.jdbi.v2.sqlobject.SqlObject$2.intercept(SqlObject.java:97)
at org.killbill.queue.org.skife.jdbi.v2.sqlobject.CloseInternalDoNotUseThisClass$$EnhancerByCGLIB$$3ecc764e.getReadyEntries()
at org.killbill.queue.DBBackedQueueWithPolling.fetchReadyEntries(DBBackedQueueWithPolling.java:122)
at org.killbill.queue.DBBackedQueueWithPolling.access$000(DBBackedQueueWithPolling.java:46)
at org.killbill.queue.DBBackedQueueWithPolling$1.inTransaction(DBBackedQueueWithPolling.java:81)
at org.killbill.queue.DBBackedQueueWithPolling$1.inTransaction(DBBackedQueueWithPolling.java:76)
at org.killbill.queue.DBBackedQueue$9.inTransaction(DBBackedQueue.java:354)
at org.killbill.queue.org.skife.jdbi.v2.tweak.transactions.LocalTransactionHandler.inTransaction(LocalTransactionHandler.java:188)
at org.killbill.queue.org.skife.jdbi.v2.BasicHandle.inTransaction(BasicHandle.java:332)
at org.killbill.queue.org.skife.jdbi.v2.DBI$5.withHandle(DBI.java:332)
at org.killbill.queue.org.skife.jdbi.v2.DBI.withHandle(DBI.java:302)
... 14 common frames omitted

Could you share more information about your environment? Which version of Kill Bill are you running? How did you trigger this stacktrace?

An error was reported after initializing the DefaultPersistentBus class :

@bean(initMethod ="startQueue", destroyMethod = "stopQueue")
public DefaultPersistentBus persistentBus(@qualifier("DataSource") DruidDataSource druidDataSource){
final Properties properties = new Properties();
properties.setProperty("org.killbill.persistent.bus.main.inMemory", "false");
properties.setProperty("org.killbill.persistent.bus.main.queue.mode", "STICKY_POLLING");
properties.setProperty("org.killbill.persistent.bus.main.max.failure.retry", "3");
properties.setProperty("org.killbill.persistent.bus.main.claimed", "100");
properties.setProperty("org.killbill.persistent.bus.main.claim.time", "5m");
properties.setProperty("org.killbill.persistent.bus.main.sleep", "1000");
properties.setProperty("org.killbill.persistent.bus.main.off", "false");
properties.setProperty("org.killbill.persistent.bus.main.nbThreads", "1");
properties.setProperty("org.killbill.persistent.bus.main.queue.capacity", "3000");
properties.setProperty("org.killbill.persistent.bus.main.tableName", "bus_events");
properties.setProperty("org.killbill.persistent.bus.main.historyTableName", "bus_events_history");
DefaultPersistentBus bus = new DefaultPersistentBus(druidDataSource, properties);
return bus;
}

Which version of Kill Bill are you running?

The following code isn't part of our codebase:

@bean(initMethod ="startQueue", destroyMethod = "stopQueue")
public DefaultPersistentBus persistentBus(@qualifier("DataSource") DruidDataSource druidDataSource)

version is 0.24.5
image

This piece of code isn't part of our code base and we do not offer support for our queue library outside of the Kill Bill environment.