Sql sql = Sqls.create("SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));");
sql.forceExecQuery();
dao.execute(sql);
错误
[ERROR] 20:49:53.890 org.nutz.boot.NbApp.execute(NbApp.java:224) - something happen!!
org.nutz.ioc.IocException: IocBean[cloudLauncher] throw Exception when creating
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:153)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:271)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:161)
at org.nutz.boot.NbApp.execute(NbApp.java:214)
at org.nutz.boot.NbApp.run(NbApp.java:182)
at com.kunnit.cloud.job.CloudLauncher.main(CloudLauncher.java:27)
Caused by: org.nutz.dao.DaoException: !Nutz SQL Error: 'SET sql_mode=(SELECT REPLACE(@sql_mode,'ONLY_FULL_GROUP_BY',''));'
PreparedStatement:
'SET sql_mode=(SELECT REPLACE(@sql_mode,'ONLY_FULL_GROUP_BY',''));'
CaseMessage=Variable 'sql_mode' can't be set to the value of 'NULL'
at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:110)
at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:65)
at org.nutz.dao.impl.interceptor.DaoTimeInterceptor.filter(DaoTimeInterceptor.java:23)
at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:63)
at org.nutz.dao.impl.interceptor.DaoLogInterceptor.filter(DaoLogInterceptor.java:22)
at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:63)
at org.nutz.dao.DaoInterceptorChain.invoke(DaoInterceptorChain.java:138)
at org.nutz.dao.impl.sql.run.NutDaoRunner.runCallback(NutDaoRunner.java:163)
at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithoutTransaction(NutDaoRunner.java:130)
at org.nutz.dao.impl.sql.run.NutDaoRunner._run(NutDaoRunner.java:97)
at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:86)
at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:242)
at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:254)
at org.nutz.dao.impl.DaoSupport.execute(DaoSupport.java:238)
at org.nutz.dao.impl.NutDao.execute(NutDao.java:1097)
at com.kunnit.cloud.job.task.FlowDomesticOrderJob.execute(FlowDomesticOrderJob.java:38)
at com.kunnit.cloud.job.CloudLauncher.init(CloudLauncher.java:20)
at com.kunnit.cloud.job.CloudLauncher$FM$init$4fc81930ec07585539fbe7bdbf4dec09.invoke(CloudLauncher.java)
at org.nutz.ioc.impl.ObjectMakerImpl$2.trigger(ObjectMakerImpl.java:181)
at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:89)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:141)
... 6 more