项目启动时有时会出错:java.sql.SQLException: ResultSet is from UPDATE. No Data

DruidPlugin连部署在云上数据库做开发的时候,有时启动时会报错,不是每次都报,有点像是网络不太好时出错,但不知道具体原因,代码是这样:

DruidPlugin druidPlugin =new DruidPlugin(PropKit.get("jdbcUrl"), PropKit.get("user"), PropKit.get("password").trim());

me.add(druidPlugin);

报错是这样:

[ERROR]-[Thread: localhost-startStop-1]-[com.alibaba.druid.pool.DruidDataSource.init()]: init datasource error, url: jdbc:mysql://xx.xx.xx.xx:3306/mypro?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull

.java.sql.SQLException: ResultSet is from UPDATE. No Data.

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)

at com.mysql.jdbc.ResultSetImpl.next(ResultSetImpl.java:6870)

at com.mysql.jdbc.ConnectionImpl.getTransactionIsolation(ConnectionImpl.java:3215)

at com.alibaba.druid.pool.DruidConnectionHolder.<init>(DruidConnectionHolder.java:145)

at com.alibaba.druid.pool.DruidConnectionHolder.<init>(DruidConnectionHolder.java:83)

at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:735)

at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1060)

at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1056)

at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:104)

at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:43)

at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:226)

at com.jfinal.core.Config.startPlugins(Config.java:107)

at com.jfinal.core.Config.configJFinal(Config.java:51)

at com.jfinal.core.JFinal.init(JFinal.java:63)

at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)

at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)

at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)

at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)

at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4583)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)

at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1101)

at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1816)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

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)




评论区

隔壁班的林夕

2018-10-29 10:39

我也是。。

热门反馈

扫码入社