从 tomcat 迁移到 tc 服务器 - 启动时接收 java.sql.SQLException

从 tomcat 迁移到 tc 服务器 - 启动时接收 java.sql.SQLException

当我启动 tcServer 时,我收到以下错误。在独立版 tomcat 上我没有收到此错误。我需要为 tcServer 添加额外的配置吗?

警告:解析引用 java.sql.SQLException 时发生意外异常:Io 异常:网络适配器无法建立连接,位于 oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112),位于 oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146),位于 oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255),位于 oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387),位于 oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:441),位于 oracle.jdbc.driver.T4CConnection.(T4CConnection.java:165),位于oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801) at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:277) at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182) at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:699) at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:631) at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:485) at org.apache.tomcat.jdbc.pool.ConnectionPool.(ConnectionPool.java:143) at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:116) at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:103) at org.apache.tomcat.jdbc.pool.DataSourceFactory.createDataSource(DataSourceFactory.java:539) at org.apache.tomcat.jdbc.pool.DataSourceFactory.getObjectInstance(DataSourceFactory.java:237) at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:140) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) at org.apache.naming.NamingContext.lookup(NamingContext.java:793) at org.apache.naming.NamingContext.lookup(NamingContext.java:140) at org.apache.naming.NamingContext.lookup(NamingContext.java:781) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at org.apache.catalina.core.NamingContextListener.addResource(NamingContextListener.java:1028) at org.apache.catalina.core.NamingContextListener.createNamingContext(NamingContextListener.java:637) at org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingContextListener.java:238) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.StandardServer.start(StandardServer.java:747) 在 org.apache.catalina.startup.Catalina.start(Catalina.java:595) 在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 在 java.lang.reflect.Method.invoke(Method.java:597) 在 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) 在 org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

答案1

从该转储中我能判断出您的连接字符串有问题,或者 TNSNAMES.ORA 文件配置不正确。

相关内容