在Jfinal中,使用druid配置oracle报错
//连接池插件 DruidPlugin druidPluginOracle = new DruidPlugin( getProperty("db.oracle.jdbcUrl"), getProperty("db.oracle.user"), getProperty("db.oracle.password") ); druidPluginOracle.setDriverClass(getProperty("db.oracle.driver")); me.add(druidPluginOracle); ActiveRecordPlugin arp = new ActiveRecordPlugin(druidPluginOracle); me.add(arp); arp.setDialect(new OracleDialect()); arp.setContainerFactory(new CaseInsensitiveContainerFactory()); arp.addMapping("stat_sys_menu","ID", MenuModel.class);
三月 16, 2015 10:14:52 下午 com.alibaba.druid.support.logging.JakartaCommonsLoggingImpl error
严重: invalid oracle validationQuery. select 1, may should be : select 1 FROM DUAL
三月 16, 2015 10:14:53 下午 com.alibaba.druid.support.logging.JakartaCommonsLoggingImpl error
严重: init datasource error, url: jdbc:oracle:thin:@localhost :1521:NWZTJC
java.sql.SQLSyntaxErrorException: ORA-00923: 未找到要求的 FROM 关键字
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:221)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:118)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:224)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:468)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:418)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1085)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:188)
at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:1005)
at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:1112)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1472)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1736)
at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:1278)
at com.alibaba.druid.pool.DruidAbstractDataSource.validateConnection(DruidAbstractDataSource.java:1229)
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1439)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:632)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:934)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:930)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:102)
at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:36)
at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:171)
at com.jfinal.core.Config.startPlugins(Config.java:87)
at com.jfinal.core.Config.configJFinal(Config.java:48)
at com.jfinal.core.JFinal.init(JFinal.java:67)
at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)
at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:724)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:277)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at com.jfinal.server.JettyServer.doStart(JettyServer.java:120)
at com.jfinal.server.JettyServer.start(JettyServer.java:64)
at com.jfinal.core.JFinal.main(JFinal.java:181)
druidPluginOracle.setValidationQuery("select 1 from dual");######druid哪个版本,oracle哪个版本
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。