我已将Tomcat从7升级到9。启动时出现异常。它抛出以下异常:
oracle.jdbc.xa.client.OracleXADataSource cannot be cast to java.sql.Driver
context.xml具有以下内容:
<Resource auth="Container" driverClassName="oracle.jdbc.xa.client.OracleXADataSource"
logAbandoned="true" initialSize="1" maxActive="2" maxIdle="2"
minIdle="2" timeBetweenEvictionRunsMillis="34000"
inEvictableIdleTimeMillis="55000" validationQuery="SELECT 1 FROM DUAL"
validationInterval="34" testOnBorrow="true" removeAbandoned="true"
removeAbandonedTimeout="600" name="jdbc/regionalDS" password="XXX"
type="javax.sql.DataSource" url="jdbc:oracle:thin:@oraasgtd75-scan.nam.nsroot.net:8889:EMDD7D"
username="XXX" />
请让我知道,我需要做什么更改。
请参阅此处的Tomcat Servlet示例