Cannot create PoolableConnectionFactory (ORA-00923

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

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

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

 

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

  1. <</span>Context>  
        <</span>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"  
         />  
    </</span>Context>

 

Oracle数据库连接池配置:

<</span>Context>  
    <</span>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"  
     />  
</</span>Context>

你可能感兴趣的:(Cannot create PoolableConnectionFactory (ORA-00923)