Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by Shannon1
, 1 year ago
(? , ? , ? , ?) 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
java.sql.SQLException: No database selected	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998)	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3835)	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3771)	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2535)	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1911)	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2145)	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2081)	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2066)	at com.mysql.jdbc.PreparedStatement.executeBatchedInserts(PreparedStatement.java:1568)	at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1272)	at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)	at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)	at org.springframework.jdbc.core.JdbcTemplate$4.doInPreparedStatement(JdbcTemplate.java:899)	at org.springframework.jdbc.core.JdbcTemplate$4.doInPreparedStatement(JdbcTemplate.java:1)	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:587)	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:615)	at org.springframework.jdbc.core.JdbcTemplate.batchUpdate(JdbcTemplate.java:884)	at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker$1.doInTransaction(DbLoadAction.java:587)	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)	at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker.doCall(DbLoadAction.java:578)	at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker.call(DbLoadAction.java:541)	at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$DbLoadWorker.call(DbLoadAction.java:513)	at java.util.concurrent.FutureTask.run(FutureTask.java:266)	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)	at java.lang.Thread.run(Thread.java:745)