Jdbc调用阻塞但不返回..下面是堆栈跟踪
Oracle服务器= 11.1.0.7 Oracle瘦驱动程序使用@ client
非常感谢你的帮助....
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:140)
at oracle.net.ns.Packet.receive(Packet.java:240)
at oracle.net.ns.DataPacket.receive(DataPacket.java:92)
at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:172)
at oracle.net.ns.NetInputStream.read(NetInputStream.java:117)
at oracle.net.ns.NetInputStream.read(NetInputStream.java:92)
at oracle.net.ns.NetInputStream.read(NetInputStream.java:77)
at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1034)
at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1010)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:588)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:780)
at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:855)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1377)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1377)
at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:387)
at oracle.jdbc.driver.OracleDatabaseMetaData.getTypeInfo(OracleDatabaseMetaData.java:670)
答案 0 :(得分:2)
可能没有什么理由:
答案 1 :(得分:1)
如果您正在运行存储过程,那么它显然是JDBC THIN驱动程序BUG。
将JDBC驱动程序更新为11.0.2.2。它应该修复getNextPacket问题的挂起:
Oracle JDBC Drivers release 11.2.0.2 Readme.txt
===============================================
Note: this readme is specific to fixes in 11.2.0.2 patch-set; see
the master readme of the 11.2 release at http://download.oracle.com/otn/utilities_drivers/jdbc/112/Readme.txt
Bug# Description
======= ===========================================================================================
2935043 SQLException Invalid conversion error when binding short JDBC type to Oracle number column
5071698 PropertyCheckInterval of zero causes high CPU
6748410 registerOutParameter does not perform well in JDBC Thin
7208615 NUMBER column shows as precision 22 in JDBC
7281435 ORA-30006 during xa_commit cause XAER_RMERR in JDBC
8588311 PreparedStatement.setBinaryStream() does not read all the data from the stream
8592559 JDBC Thin cannot fetch PlsqlIndexByTable with more than 32k items
8617180 ORA-1458 error with large batch sizes using JDBC OCI driver
8832811 Non ASCII characters inserted into US7ASCII DB using JDBC Thin
8834344 Binding date of the Julian calendar throws IllegalArgumentException
8873676 JDBC This throws SqlException while reading invalid characters
8874882 ORA-22922 reusing large string bind for a LOB in JDBC
8889839 XA_RMERR being thrown on the recover(TMNOFLAGS) call from JDBC
8891187 JDBC does not close the connection after a fatal error
8980899 JDBC Thin new property enableDataInLocator for LOB data
8980918 JDBC Thin should use "data in locator" feature to save round-trips for small Lobs
8982104 Add JDBC support for SQLXML
9045206 11.2 JDBC driver returns zero rows with REF CURSOR OUT parameter
9099863 ps.setbytes on BLOB columns in batch does not inherit value to following lines
9105438 ORA-22275 during ps.executeBatch with LOBs
9121586 ORA-22925 getting large LOB via JDBC Thin 11.2
9139227 Wrong error code on JDBC connection failure
9147506 Named parameter in callable statement not working from JDBC
9180882 JDBC Statement.Execute does not handle comments as first elements for INSERT
9197956 JDBC Data Change Notification fails with IllegalArgumentException
9240210 Silent truncation reading 4gb BLOB with JDBC Thin 11.2
9259830 DatabaseChangeNotification fails to clean up
9260568 isValidObjectName() rejects valid object names
9341542 getmetadata().getindexinfo fails with quoted table names (ORA-947)
9341742 setBinaryStream causes dump/ORA-24804 if an unread stream is bound to a DML
9374132 Territory is allowed to be NULL resulting in ORA-12705
9394224 Poor performance for batch PreparedStatement execute with XMLType or objects.
9445675 "No more data" / ORA-3137 using end to end metrics with JDBC Thin
9468517 JDBC OCI and OCI do not behave the same on TAF failover
9491385 Memory not released using registerIndexTableOutParameter in JDBC Thin
9491954 RuntimeException "Assertion botch: negative time" from Timestamp bind
9660015 JDBC Thin hangs by waiting getnextpacket when calling stored procedure
9767715 TIMESTAMPTZ stringvalue truncates leading zeros in decimal part
9786503 Cannot use OS authentication with OracleXADataSource
查看错误#9660015。
希望它有所帮助。
答案 2 :(得分:-1)
可能是防火墙问题,您是否尝试检查,连接是否在数据库中处于活动状态,或者数据库是否将10Byte ping数据发送到此特定连接并且它没有问题? 如果JDBC能够从Connections创建PreparedStatement,则意味着从客户端角度看Connections是正常的,但是DB和Client之间有什么关系?防火墙?路由器?检查他们的设置。