Cannot create PoolableConnectionFactory (ORA-00923: 未找到预期 FROM 关键字

经检查是数据库连接池配置错误(content.xml)!

配置SQL Server 2000数据库连接池时,属性validationQuery默认值为“select 1”,

而在Oracle数据库连接池中应设置为“validationQuery="select 1 from dual"

 

SQL Server 2000数据库连接池配置:

<Context> <Resource name="jdbc/myOracle" type="javax.sql.DataSource" username="test" password="test" driverClassName="oracle.jdbc.driver.OracleDriver" maxIdle="5" maxWait="5000" validationQuery="select 1" url="jdbc:oracle:thin:@192.168.1.1:1521:mydb" maxActive="20" /> </Context>

 

Oracle数据库连接池配置:

<Context> <Resource name="jdbc/myOracle" type="javax.sql.DataSource" username="test" password="test" driverClassName="oracle.jdbc.driver.OracleDriver" maxIdle="5" maxWait="5000" validationQuery="select 1 from dual" url="jdbc:oracle:thin:@192.168.1.1:1521:mydb" maxActive="20" /> </Context>

你可能感兴趣的:(oracle,sql,jdbc,server,数据库连接池,url)