Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ERROR: ORA-22920: 1

Status
Not open for further replies.

BangI

Programmer
Apr 10, 2002
5
DE
I have a problem with JDBC-client thin driver, which I can not solve.I use the following Java code:
*
String sql="SELECT ID, SMILES, NO_ATOMS, NO_BONDS" +
" COORD_STRING,SCREEN_VECTOR " +
" FROM MOL_GLOBAL " +
" WHERE ID=" + nID+ " FOR UPDATE";
//-------- nID is a string ------
try { //========================= SQL try
dbConnection.setAutoCommit(false);

infoMsg="ERROR: deriving ResultSet ";
//=========================================================================
ResultSet RS=dbStatement.executeQuery(sql);
//=========================================================================

infoMsg="ERROR: deriving BLOB locator ";

//=========================================================================

OracleResultSet oRS=(OracleResultSet)RS;

oRS.next();

oracle.sql.BLOB bLob=oRS.getBLOB("SCREEN_VECTOR");
//=========================================================================

infoMsg="ERROR: writing into BLOB ";

//dbStatement.execute("LOCK TABLE MOL_GLOBAL IN ROW" +
// " EXCLUSIVE MODE");
bLob.putBytes(1, bytelen);
/* After this statement an ERROR is issued:
ERROR: ORA-22920: row containing the LOB value
is not locked
*/

bLob.putBytes(3, bsv.getBits());
oRS.updateBlob("SCREEN_VECTOR",bLob));

dbConnection.commit();

} catch (SQLException sqlE) { //------------------- SQL
infoMsg=infoMsg+sqlE.getMessage();
tools.writeToLogFile(infoMsg);
} //---------------------------------------------- SQL

and as shown I recieve an Error in atempting to write into BLOB. The error is:
ERROR: ORA-22920: row containing the LOB value
is not locked

thou I use SELECT FOR UPDATE which has to lock the rows. Even explicitely locking by:
dbStatement.execute("LOCK TABLE MOL_GLOBAL IN ROW" +
" EXCLUSIVE MODE");
does not help.
Have somebody an idea where is my mistake?
 
What versions of driver/database do you use?
 
BangI
I use Oracle 8.1.7 version and the drivers supplied with.
 
Try to use more recent driver, it was a bug fixed in 8.1.7.3.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top