1

如何在 tomcat 6.0 context.xml 中设置 Oracle XA 客户端?

我试过了

<Resource name="jdbc/notification" auth="Container" type="javax.sql.XADataSource"
     factory="org.objectweb.jotm.datasource.DataSourceFactory"
            maxActive="100" maxIdle="30" maxWait="10000" removeAbandoned="true" 
            username="NOTIFICATION" password="password" driverClassName="oracle.jdbc.xa.client.OracleXADataSource"
                        defaultAutoCommit="false" jdbcInterceptors="ConnectionState;StatementFinalized" 
            url="jdbc:oracle:thin:@localhost:1521:ORCL" poolPreparedStatements="true" />

但它是扔

Caused by: org.apache.ibatis.exceptions.PersistenceException: 
### Error opening session.  Cause: java.sql.SQLException: SQLException in StandardPoolDataSource:getConnection exception: java.sql.SQLException: SQLException in StandardPoolDataSource:getConnection no connection available java.sql.SQLException: Error trying to load driver: oracle.jdbc.xa.client.OracleXADataSource : oracle.jdbc.xa.client.OracleXADataSource cannot be cast to java.sql.Driver
### Cause: java.sql.SQLException: SQLException in StandardPoolDataSource:getConnection exception: java.sql.SQLException: SQLException in StandardPoolDataSource:getConnection no connection available java.sql.SQLException: Error trying to load driver: oracle.jdbc.xa.client.OracleXADataSource : oracle.jdbc.xa.client.OracleXADataSource cannot be cast to java.sql.Driver

请举例说明如何在 tomcat 6 中设置 oracle XA 客户端。

谢谢!!

4

0 回答 0