I am able to telnet to the datasource I need and the same code allows me to connect to other instance.
OracleDataSource Initialization
java.sql.SQLException: The Network Adapter could not establish the connection
at oracle.jdbc.driver.SQLStateMapping.newSQLException (SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(D atabaseError.java:133)
at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:199)
at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:480)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnecti on.java:413)
at oracle.jdbc.driver.PhysicalConnection.<init>(Physi calConnection.java:508)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnect ion.java:203)
at oracle.jdbc.driver.T4CDriverExtension.getConnectio n(T4CDriverExtension.java:33)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriv er.java:510)
at oracle.jdbc.pool.OracleDataSource.getPhysicalConne ction(OracleDataSource.java:275)
at oracle.jdbc.pool.OracleDataSource.getConnection(Or acleDataSource.java:206)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.ge tPhysicalConnection(OracleConnectionPoolDataSource .java:139)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.ge tPooledConnection(OracleConnectionPoolDataSource.j ava:88)
at oracle.jdbc.pool.OracleImplicitConnectionCache.mak eCacheConnection(OracleImplicitConnectionCache.jav a:1567)
at oracle.jdbc.pool.OracleImplicitConnectionCache.mak eOneConnection(OracleImplicitConnectionCache.java: 499)
at oracle.jdbc.pool.OracleImplicitConnectionCache.def aultUserPrePopulateCache(OracleImplicitConnectionC ache.java:218)
at oracle.jdbc.pool.OracleImplicitConnectionCache.<in it>(OracleImplicitConnectionCache.java:194)
at oracle.jdbc.pool.OracleConnectionCacheManager.crea teCache(OracleConnectionCacheManager.java:269)
at oracle.jdbc.pool.OracleDataSource.cacheInitialize( OracleDataSource.java:391)
at oracle.jdbc.pool.OracleDataSource.getConnection(Or acleDataSource.java:372)
at oracle.jdbc.pool.OracleDataSource.getConnection(Or acleDataSource.java:178)
at oracle.jdbc.pool.OracleDataSource.getConnection(Or acleDataSource.java:156)
at Queries.JDBCUtils.getConnection(JDBCUtils.java:90)
at Queries.JDBCUtils.getConnection(JDBCUtils.java:82)
at Queries.PostTransactions.validConnection(PostTrans actions.java:35)
at Queries.PostTransactions.main(PostTransactions.jav a:151)
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.ja va:328)
at oracle.net.resolver.AddrResolution.resolveAndExecu te(AddrResolution.java:421)
at oracle.net.ns.NSProtocol.establishConnection(NSPro tocol.java:630)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:3 10)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnec tion.java:966)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnecti on.java:292)
... 21 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Un known Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress( Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.ja va:127)
at oracle.net.nt.ConnOption.connect(ConnOption.java:1 26)
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.ja va:306)
... 26 more
Yes
Any suggestions?