更换Tomcat9后出现下面的错误,Tomcat7是正常的,怎么换了就连接不上了 org.springframework.jdbc.UncategorizedSQLException: ### Error querying database. Cause: java.sql.SQLException: Cannot create PoolableConnectionFactory (Io 异常: The Network Adapter could not establish the connection) ### The error may exist in com/sbdm/dao/CodeLkupDAO.java (best guess) ### The error may involve com.sbdm.dao.CodeLkupDAO.getSysDate ### The error occurred while executing a query ### Cause: java.sql.SQLException: Cannot create PoolableConnectionFactory (Io 异常: The Network Adapter could not establish the connection) ; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; Cannot create PoolableConnectionFactory (Io 异常: The Network Adapter could not establish the connection); nested exception is java.sql.SQLException: Cannot create PoolableConnectionFactory (Io 异常: The Network Adapter could not establish the connection) 在Tomcat7的context.xml里面加了一段下面类似的,把这段搬到9就不行了,是不是这段导致的? <Resource url="jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = xx) (PORT = xx))(ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 14001)) (ADDRESS = (PROTOCOL = TCP)(HOST = xx)(PORT = xx))(ADDRESS = (PROTOCOL = TCP) (HOST = xx.xx.xx.xx)(PORT = xx))(LOAD_BALANCE = yes)(CONNECT_DATA =(SERVER = DEDICATED) (SERVICE_NAME =spbuat)))" driverClassName="oracle.jdbc.driver.OracleDriver" password="xx" username="xx" maxWait="10000" maxIdle="30" maxActive="10" type="javax.sql.DataSource" auth="Container" name="jdbc/BomWebPortalDS"/>
你这是代码问题吧
原本Tomcat7运行正常的,换成Tomcat9才报错,是因为9不兼容?