Hi DBAs,

I posted this question in Developer forum, no answers, let me try this forum ---
I have an JDBC application which executes insert statement, this application has been running for 5 years well, but recently, insert hanging. I checked Oracle, it says: sql*net is waiting, table has many locks; but check JDBC, it says:"oracle busy".
I insert the same statement from sql*plus, fine.

What's wrong with it?
The JDBC code as below:
public void execute(Connection conn, Vector params, DataWrapper result) {
PreparedStatement stmt = null;
int count;
try {
stmt = conn.prepareStatement(getStatement()) ;

bindVariables(stmt, params);
//log.debug("Executing DML");
count = stmt.executeUpdate();
//log.debug("Returning Results");
result.setUpdateCount(count);

stmt.close();
} catch (SQLException e) {
result.setError(e);
} finally {
try {
stmt.close();
} catch (Exception ignored) {};
}
}
The connection is initialized with setAutoCommit(true) before any statement is executed.
We know the code gets to executeUpdate because we can see the affect of the insert statement in Oracle. We also know that the java code below never gets to the line result.setUpdateCount because the applications never get data back.

Thanks!

Betty