gpt4 book ai didi

grails - 如何在Grails中使用Quartz Scheduler?

转载 作者:行者123 更新时间:2023-12-02 14:00:53 25 4
gpt4 key购买 nike

我正在使用Grails 2.3.11,我想在Grails应用程序中进行Quartz调度。

为此,我添加了两个库quartz-all-2.1.1.jarc3p0-0.9.1.1.jar,但是当我运行项目时会出现此错误

DEBUG [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1] BasicResourcePool.attemptRefurbishResourceOnCheckin(1616) | A resource could not be refurbished on checkin. [com.mchange.v2.c3p0.impl.NewPooledConnection@5d12d30f]
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 '.' at line 1
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.finerLoggingTestPooledConnection(C3P0PooledConnectionPool.java:324)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.refurbishResourceOnCheckin(C3P0PooledConnectionPool.java:299)
at com.mchange.v2.resourcepool.BasicResourcePool.attemptRefurbishResourceOnCheckin(BasicResourcePool.java:1606)
at com.mchange.v2.resourcepool.BasicResourcePool.access$200(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$1RefurbishCheckinResourceTask.run(BasicResourcePool.java:1228)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)

最佳答案

关闭日志记录 c3p0 连接池

加载连接池之前添加此行(在启动调度程序之前)

Properties p = new Properties(System.getProperties());
p.put("com.mchange.v2.log.MLog", "com.mchange.v2.log.FallbackMLog");
p.put("com.mchange.v2.log.FallbackMLog.DEFAULT_CUTOFF_LEVEL", "OFF"); // Off or any other level
System.setProperties(p);

关于grails - 如何在Grails中使用Quartz Scheduler?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37209461/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com