Weblogic

时间:2018-06-13 05:52:23

标签: weblogic oracledb

在我公司我在OEL 6.5上使用Weblogic 10.3.6.0连接到另一个位置的Oracle数据库,当我尝试连接weblogic到db时出现错误

    Error encountered:

java.sql.SQLRecoverableException: IO Error: Connection reset
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:467)
        at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
        at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)
        at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
        at java.sql.DriverManager.getConnection(DriverManager.java:582)
        at java.sql.DriverManager.getConnection(DriverManager.java:154)
        at utils.dbping.main(dbping.java:204)
Caused by: java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(SocketInputStream.java:167)
        at oracle.net.ns.Packet.receive(Packet.java:300)
        at oracle.net.ns.DataPacket.receive(DataPacket.java:106)
        at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:315)
        at oracle.net.ns.NetInputStream.read(NetInputStream.java:260)
        at oracle.net.ns.NetInputStream.read(NetInputStream.java:185)
        at oracle.net.ns.NetInputStream.read(NetInputStream.java:102)
        at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:124)
        at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:80)
        at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1137)
        at oracle.jdbc.driver.T4C8TTIdty.receive(T4C8TTIdty.java:669)
        at oracle.jdbc.driver.T4C8TTIdty.doRPC(T4C8TTIdty.java:578)
        at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1166)
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:322)
        at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
        at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:94)
        at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
        at java.sql.DriverManager.getConnection(DriverManager.java:582)
        at java.sql.DriverManager.getConnection(DriverManager.java:154)
        at utils.dbping.main(dbping.java:205)

所以我将SID更改为无效的SID并获得该错误

Error encountered:

java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:458)
        at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
        at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)
        at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
        at java.sql.DriverManager.getConnection(DriverManager.java:582)
        at java.sql.DriverManager.getConnection(DriverManager.java:154)
        at utils.dbping.main(dbping.java:204)
Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

        at oracle.net.ns.NSProtocol.connect(NSProtocol.java:395)
        at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1102)
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:320)
        ... 7 more

从那里我发现我与数据库的连接没问题

我尝试使用我公司的其他服务器和使用JDK 8的Weblogic 12c并再次出现“连接重置”错误

我尝试使用Windows操作系统上的本地Weblogic并获得成功 所以...我能做什么

1 个答案:

答案 0 :(得分:0)

请你检查一下这样的事情:

  • 是您尝试测试时从控制台成功连接的 数据源?
  • 是否有任何防火墙限制您的数据库和Weblogic服务器之间的连接。
  • 您正在使用的驱动程序是什么?是吗? 和你的Windows PC一样吗?
  • 每次都会发生这种情况还是间歇性问题?

检查以下帖子以获取更多提示: Oracle 11g connection reset error