Exception "NET: Unknown error 1" with Direct mode in OraDirect 4.35

Exception "NET: Unknown error 1" with Direct mode in OraDirect 4.35

Postby HansenHungster » Tue 08 Jan 2008 06:10

We've just upgraded to the new version of OraDirect-4.35 last week from version 3.55.18, and been getting this error in DIRECT mode during execution OraCommand:

"NET: Unknown error 1"

We've gone through the forum and found this article(posted on Jan 03, 2007):

Exception "NET: Unknown error 1" during execution OraCommand in Direct mode.

This article describing the same problem, but Alexey had informed in this forum (on Wed Jan 10, 2007) that, this problem will be fixed in the next release (which was ver 3.50.17 of OraDirect)

Looks like this problem has been re-introduced back into the lastest version? as we're keep getting this error in Version 4.35Pro of OraDirect. Please advice on the solution/workaround/fixes.

Below is the CallStack of the error:

at CoreLab.Oracle.bj.b(Int32 A_0)
at CoreLab.Oracle.bf.a()
at CoreLab.Oracle.an.f(Int32 A_0, Byte[] A_1, Int32 A_2, Int32 A_3)
at CoreLab.Oracle.an.b(Int32 A_0, Byte[] A_1, Int32 A_2, Int32 A_3)
at CoreLab.Oracle.OracleLob.b()
at CoreLab.Oracle.OracleLob..ctor(OracleConnection A_0, OracleDataReader A_1, Int32 A_2, b A_3, OracleDbType A_4)
at CoreLab.Oracle.OracleParameter.a(OracleDbType A_0, Object A_1, Type& A_2, Object& A_3, Byte[] A_4, Int32 A_5, Int32 A_6, Int32 A_7, Int32 A_8, Boolean A_9, Boolean A_10, OracleCommand A_11, ParameterDirection A_12, aq A_13, String A_14)
at CoreLab.Oracle.OracleParameter.a(b4& A_0, Boolean A_1, Boolean A_2, OracleCommand A_3, Byte[] A_4, aq A_5)
at CoreLab.Oracle.OracleCommand.a(OracleParameterCollection A_0, b4[] A_1, av A_2, aq A_3)
at CoreLab.Oracle.OracleCommand.a(CommandBehavior A_0, IDisposable A_1, Int32 A_2, Int32 A_3)
at CoreLab.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
at CoreLab.Common.DbCommand.ExecuteReader()
at CoreLab.Common.DbCommandBase.ExecuteScalar()
at hubNET.Data.CL_Oracle_DataHelper.ExecuteScalar(HubExecutionContext& ExecutionContext, String Name, Collection OutputParametersCollection, Collection& Parameters, String[] Tables) in C:\Inetpub\Views\HubNet\net_framework\Toolbox\hubdatasources\connector\corelab_oracledatahelper.vb:line 724"

Thanks and regards
Posts: 3
Joined: Thu 27 Dec 2007 11:10

Postby Alexey.mdr » Tue 08 Jan 2008 09:15

This exception "NET: Unknown error 1" might be caused by many reasons.
Could you please send a small test project to reproduce the error message, that appears in C:\Inetpub\Views\HubNet\net_framework\Toolbox\hubdatasources\connector\corelab_oracledatahelper.vb:line 724?
Include SQL script for creating tables and stored procedures on the server side, please.
Posts: 729
Joined: Thu 13 Dec 2007 10:24

32k buffer seems to be causing an issue

Postby HansenHungster » Wed 09 Jan 2008 15:07

Further to this issue it seems the LOB payload size is very sensitive to the issue with generating this error.

We've transmitted a LOB across a package call that is exactly 329,614 bytes. This seems to result in the error as quoted. 1 byte less is ok. 1 byte more is ok. Is it possible the LOB datatype happens to be multiples of exactly "n" bytes then landing on a sensitive boundary such as 32Kb?

We'll try and provide other such sensitive file sizes but it looks like this is the issue. Providing the full project and script maybe very hard as it's a big project. if we gave you a PLSQL function to call returning a size payload would this be enough to prove the problem?
Posts: 3
Joined: Thu 27 Dec 2007 11:10

Postby Alexey.mdr » Wed 09 Jan 2008 16:17

Could you post a function? Try to reproduce this error on another random LOB with the size 329,614 bytes. Also we need to know the full version of your Oracle server.
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Postby ieichens » Wed 16 Jan 2008 08:22

I'm evaluating Version and encountered a similar Problem, try:

create table clobtest(
k integer primary key,
v clob);

then insert data using:

OracleLob lob = new OracleLob(con, OracleDbType.Clob);
OracleCommand cmd = new OracleCommand("insert into clobtest(k, v) values(:k, :v)", con);
OracleParameter pk = cmd.Parameters.Add("k", OracleDbType.Integer);
OracleParameter pv = cmd.Parameters.Add("v", OracleDbType.Clob);
pk.Value = (int)1;
pv.Value = lob;

this creates an empty (but non null) lob, then read data:

OracleCommand cmd = new OracleCommand("select k, v from clobtest", con);
OracleDataReader reader = cmd.ExecuteReader();
while (reader.Read())

this will throw a NullReferenceException followed by 'NET: Unknown error 1'
Servers tried:,
Only if Direct=true

Unfortunately our production database contains such emtpy lobs.
Posts: 8
Joined: Wed 16 Jan 2008 08:08

Postby Alexey.mdr » Thu 17 Jan 2008 12:59

We are investigating this problem.
I will let you know on our progress.
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Postby Alexey.mdr » Thu 17 Jan 2008 15:44

This bug will be fixed in the next build, which we are planning to issue by the end of this week.
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Return to dotConnect for Oracle