0
votes

My aplication is performing a very simple update on a table :

UPDATE TABLE SET COLUMN = 'XYZ' WHERE PK = 123

The problem is, when Hibernate tries to update the table like this, the table get locked with ORA event : SQL*Net more data from client.

I tried to replicate the error on my local database but i couldn't.

Does Anybody know what is happening?

Database's version where the error is happening: Oracle Database 10g Release 10.2.0.3.0 - 64bit Production

My local database's version: Oracle Database 10g Release 10.2.0.5.0 - 64bit Production

PS: The column being updated is a CLOB type and the OJDBC driver version is 1.4

2
The shadow process has received part of a call from the client process (for example, SQLPlus, ProC, and JDBC) in the first network package and is waiting for more data for the call to be complete. Examples are large SQL or PL/SQL block and insert statements with large amounts of data. - Darshan Lila
A 101292 caracters lenght clob is being sent(this is the size of the value being setted in the column). Do you know how to fix it? - Jeyvison

2 Answers

0
votes

Do you know what exactly is being sent to oracle db? I've seen something similar when Hibernate was sending very long sql command and it failed on JDBC driver.

I would suggest starting from getting latest JDBC driver version.

0
votes

Prepared statement should be used. We should not directly assign the values. For example:

String updateSQL = UPDATE TABLE SET COLUMN = ? WHERE PK = ? . 
PreparedStatement pstmt = null;
pstmt=dbresourceAgent.getPreparedStatement(updateSQL);
pstmt.setString(1,"XYZ");
pstmt.setString(2,"123");
pstmt.executeUpdate();