zoukankan      html  css  js  c++  java
  • 报错OPTION SQL_SELECT_LIMIT=

    org.quartz.JobPersistenceException: Couldn't acquire next trigger: 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 'OPTION SQL_SELECT_LIMIT=1' at line 1
        at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2864) ~[quartz-2.2.3.jar:na]
        at org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:2759) ~[quartz-2.2.3.jar:na]
        at org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:2757) ~[quartz-2.2.3.jar:na]
        at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3803) ~[quartz-2.2.3.jar:na]
        at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2756) ~[quartz-2.2.3.jar:na]
        at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:272) ~[quartz-2.2.3.jar:na]
    Caused by: 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 'OPTION SQL_SELECT_LIMIT=1' at line 1
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_172]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_172]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_172]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_172]
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) ~[mysql-connector-java-5.1.8.jar:na]
        at com.mysql.jdbc.Util.getInstance(Util.java:381) ~[mysql-connector-java-5.1.8.jar:na]
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030) ~[mysql-connector-java-5.1.8.jar:na]
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) ~[mysql-connector-java-5.1.8.jar:na]
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3536) ~[mysql-connector-java-5.1.8.jar:na]
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3468) ~[mysql-connector-java-5.1.8.jar:na]
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1957) ~[mysql-connector-java-5.1.8.jar:na]
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2107) ~[mysql-connector-java-5.1.8.jar:na]
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2642) ~[mysql-connector-java-5.1.8.jar:na]
        at com.mysql.jdbc.StatementImpl.executeSimpleNonQuery(StatementImpl.java:1531) ~[mysql-connector-java-5.1.8.jar:na]
        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2224) ~[mysql-connector-java-5.1.8.jar:na]
        at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92) ~[commons-dbcp-1.2.1.jar:1.2.1]
        at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTriggerToAcquire(StdJDBCDelegate.java:2613) ~[quartz-2.2.3.jar:na]
        at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2798) ~[quartz-2.2.3.jar:na]
        ... 5 common frames omitted

    背景:驱动jar:mysql-connector-java-5.1.8.jar 数据库版本:5.7.16
    问题:JDBC驱动的jar包版本与mysql版本不匹配
    解决方案1:使用数据库版本:5.0.91
    解决方案2:使用驱动jar:5.1.27

  • 相关阅读:
    MVC模式-----struts2框架(2)
    MVC模式-----struts2框架
    html的<h>标签
    jsp脚本元素
    LeetCode "Paint House"
    LeetCode "Longest Substring with At Most Two Distinct Characters"
    LeetCode "Graph Valid Tree"
    LeetCode "Shortest Word Distance"
    LeetCode "Verify Preorder Sequence in Binary Search Tree"
    LeetCode "Binary Tree Upside Down"
  • 原文地址:https://www.cnblogs.com/Jeely/p/11107179.html
Copyright © 2011-2022 走看看