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

Samebug tips

  1. ,
    Expert tip

    MySQL doesn't support some types of characters (such as emojis) with the utf8 encoding. You need to be on MySQL 5.5+ and force utf8mb4 (everywhere, client and server). You can do this sending the query "SET NAMES utf8mb4". Check this https://goo.gl/3E2qzg

  2. ,

    Make sure you are using InnoDB storage engine and READ-COMMITTED transaction isolation level and increase the database server innodb_lock_wait_timeout variable to about 500.

Solutions on the web

via okky.kr by Unknown author, 1 year ago
java.sql.SQLException: No database selected	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3603)	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3535)	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1989)	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2150)	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626)	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)	at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1362)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)	at java.lang.reflect.Method.invoke(Method.java:597)	at com.ibatis.common.jdbc.logging.PreparedStatementLogProxy.invoke(PreparedStatementLogProxy.java:62)	at $Proxy21.execute(Unknown Source)	at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:81)	at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteUpdate(GeneralStatement.java:200)	at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:78)	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:505)	at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.update(SqlMapSessionImpl.java:90)	at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.update(SqlMapClientImpl.java:67)	at com.gcaddy.dwr.service.SystemService.updateUserStatsInfo(SystemService.java:560)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)	at java.lang.reflect.Method.invoke(Method.java:597)	at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:740)	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:744)	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:593)	at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:90)	at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)	at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:141)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)	at java.lang.Thread.run(Thread.java:662)