java.util.concurrent.ExecutionException: com.alibaba.otter.node.etl.load.exception.LoadException: org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [insert into aa-test.tb_aa_test(`username` , `phone` , `mail` , `id`) values (? , ? , ? , ?) on duplicate key update `username`=values(`username`) , `phone`=values(`phone`) , `mail`=values(`mail`) , `id`=values(`id`)]; SQL state [3D000]; error code [1046]; No database selected; nested exception is java.sql.BatchUpdateException: No database selected

GitHub | Shannon1 | 3 months ago
  1. 0

    双向同步时出现No database selected错误

    GitHub | 3 months ago | Shannon1
    java.util.concurrent.ExecutionException: com.alibaba.otter.node.etl.load.exception.LoadException: org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [insert into aa-test.tb_aa_test(`username` , `phone` , `mail` , `id`) values (? , ? , ? , ?) on duplicate key update `username`=values(`username`) , `phone`=values(`phone`) , `mail`=values(`mail`) , `id`=values(`id`)]; SQL state [3D000]; error code [1046]; No database selected; nested exception is java.sql.BatchUpdateException: No database selected
  2. 0

    DataIntegrity Exception with Multiple Web Application Containers and 1 Database

    Stack Overflow | 6 years ago | Melissa W
    java.sql.BatchUpdateException: null, message from server: "Duplicate entry '56' for key 'PRIMARY'"
  3. 0

    Not able to insert a record in mysql table with auto-increment key as PK

    Stack Overflow | 6 years ago | yogi
    java.sql.BatchUpdateException: 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 'FROM, TO, DISTANCE, TIME, ROUTE_ID) values ('A099', 'Hadapser', 'Pune Station', ' at line 1 at </code></pre> <hr> <pre><code>com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2024)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Sonarqube 5.0 upgrade error

    Stack Overflow | 2 years ago | msa
    java.sql.BatchUpdateException: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.
  6. 0

    Grails MySQLIntegrityConstraintViolationException thrown

    Stack Overflow | 4 years ago | littleK
    org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update

  1. linxiaolong 26 times, last 3 weeks ago
  2. linxiaolong 4 times, last 3 months ago
  3. mortalman7 32 times, last 5 months ago
9 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.sql.SQLException

    No database selected

    at com.mysql.jdbc.SQLError.createSQLException()
  2. MySQL jdbc
    PreparedStatement.executeBatch
    1. com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998)
    2. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3835)
    3. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3771)
    4. com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)
    5. com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)
    6. com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2535)
    7. com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1911)
    8. com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2145)
    9. com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2081)
    10. com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2066)
    11. com.mysql.jdbc.PreparedStatement.executeBatchedInserts(PreparedStatement.java:1568)
    12. com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1272)
    12 frames
  3. Commons DBCP
    DelegatingStatement.executeBatch
    1. org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
    2. org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
    2 frames
  4. Spring Framework
    JdbcTemplate.batchUpdate
    1. org.springframework.jdbc.core.JdbcTemplate$4.doInPreparedStatement(JdbcTemplate.java:899)
    2. org.springframework.jdbc.core.JdbcTemplate$4.doInPreparedStatement(JdbcTemplate.java:1)
    3. org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:587)
    4. org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:615)
    5. org.springframework.jdbc.core.JdbcTemplate.batchUpdate(JdbcTemplate.java:884)
    5 frames
  5. etl module for otter
    DbLoadAction$DbLoadWorker$1.doInTransaction
    1. com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker$1.doInTransaction(DbLoadAction.java:587)
    1 frame
  6. Spring Tx
    TransactionTemplate.execute
    1. org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
    1 frame
  7. etl module for otter
    DbLoadAction$DbLoadWorker.call
    1. com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker.doCall(DbLoadAction.java:578)
    2. com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker.call(DbLoadAction.java:541)
    3. com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker.call(DbLoadAction.java:513)
    3 frames
  8. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:266)
    2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    4. java.lang.Thread.run(Thread.java:745)
    4 frames