OCI-01555 exception on calling OracleXmlType .Value method
806214Oct 18 2010 — edited May 15 2012Hi,
I'm using Oracle 10g EX, and ODAC 1020221. I created an ODP.net based C# webservice that reads/writes xml data using stored procedures.
I implemented the read as illustrated below:
...
OracleConnection connection = new OracleConnection(...);
OracleCommand command = connection.CreateCommand();
...
OracleParameter param = command.CreateParameter();
param.ParameterName = "XML_COL";
param.OracleDbType = OracleDbType.XmlType;
param.Direction = ParameterDirection.Output;
...
command.ExecuteNonQuery();
...
OracleParameter param = command.Parameters["XML_COL"];
OracleXmlType xmlType = (OracleXmlType)param.Value;
string value = xmlType.Value;
This works fine as long I call it in a single-threaded test.
However, when I run a multi-threaded test with more than 2 threads I'm getting the occasional exception on calling xmlType.Value:
OCI-01555: Message 1555 not found; product=RDBMS; facility=OCI
at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx,
Object src, String procedure)
at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src)
at Oracle.DataAccess.Types.OracleXmlType.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src)
at Oracle.DataAccess.Types.OracleXmlType.get_Value()
Surprisingly, I have not been able to find any documentation regarding this error, though there is a ORA error with the same number indicating some rollback size issues.
The problem seem to occur when another thread in my webservice updates the same record. The stored procedure is "safe-guarded" by a lock, however, I didn't implement additional locking in my webservice, because a) I thought odp.net can cope, and b) ado.net/sql has no problem with this approach, but perhaps I assumed wrongly?
Has anybody seen this exception before and can explain what this is all about?
Many thanks,
Frank
Edited by: 803211 on 19-Oct-2010 01:46