切换到宽版
  • 4492阅读
  • 0回复

invalid oracle validationQuery. SELECT 'x', may should be : SELECT 'x' FROM DUAL [复制链接]

上一主题 下一主题
离线admin
 

只看楼主 倒序阅读 使用道具 楼主  发表于: 2016-09-03
在ORACLE11g部署时容器报如下错误:
22:07:27,226 INFO  [STDOUT] ERROR 2016-09-03 22:07:27,224 (com.alibaba.druid.poo
l.DruidDataSource:840)- invalid oracle validationQuery. SELECT 'x', may should be : SELECT 'x' FROM DUALCaused by:
-------------------------------
java.lang.NullPointerException
at com.thams.dao.base.DataBaseDao.existTable(DataBaseDao.java:108)
at com.thams.service.impl.DataBaseService.existTable(DataBaseService.java:143)
at com.thams.service.impl.DBinfoServiceImpl.initData(DBinfoServiceImpl.java:647)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1581)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1522)
--------------------------------------------
此错误需要到jdbc.properties 里面找到 druid.datasource.validationQuery=SELECT 'x'   把其改为:druid.datasource.validationQuery=SELECT 'x' FROM DUAL
保存后拉到部署包内,重启容器即可
快速回复
限100 字节
如果您在写长篇帖子又不马上发表,建议存为草稿
 
上一个 下一个