BeginTransaction exception

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
slaxman
Posts: 51
Joined: Wed 16 Sep 2009 20:09
Location: United States

BeginTransaction exception

Post by slaxman » Fri 09 Jul 2010 18:10

I get this exception sometimes during update. any ideas?

--
System.Data.EntityException: An error occurred while starting a transaction on the provider connection. See the inner exception for details. ---> System.Exception: NET: Unknown error 1
at Devart.Data.Oracle.n.b(Int32 A_0)
at Devart.Data.Oracle.n.a()
at xc.l.a(Byte A_0)
at xc.b.a(Byte A_0)
at xc.a.a()
at xc.d.a()
at Devart.Data.Oracle.d.a()
at Devart.Data.Oracle.r.a(Int32 A_0, a5 A_1)
at Devart.Data.Oracle.OracleCommand.InternalExecute(CommandBehavior behavior, IDisposable disposable, Int32 startRecord, Int32 maxRecords, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Data.Oracle.OracleCommand.ExecuteNonQuery()
at Devart.Data.Oracle.OracleTransaction..ctor(OracleConnection A_0, IsolationLevel A_1)
at Devart.Data.Oracle.OracleConnection.BeginTransaction(IsolationLevel il)
at Devart.Data.Oracle.OracleConnection.BeginDbTransaction(IsolationLevel isolationLevel)
at System.Data.Common.DbConnection.BeginTransaction(IsolationLevel isolationLevel)
at System.Data.EntityClient.EntityConnection.BeginDbTransaction(IsolationLevel isolationLevel)

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 12 Jul 2010 08:46

The 'NET: Unknown error 1' error arises when server tries to process a command that is not supported by protocol (Oracle server doesn't "understand" the accepted packages). Here are the possible reasons of the problem:
1) wrong command or invalid data type;
2) usage of the same connection object in several threads simultaneously (please create a separate connection object per thread).

Please try the latest 5.70.146 version of dotConnect for Oracle. Does the problem persist in this case as well? If yes, please:
1) send us a small test project with the DDL/DML script to reproduce the issue in our environment;
2) specify your current version of dotConnect for Oracle (x.xx.xx) and Oracle Server (xx.x.x.x);
3) tell us the mode you are using our proivder in - Direct or OCI. If OCI, tell us the version of your Oracle Client.

gchen50
Posts: 3
Joined: Fri 09 Jul 2010 20:34

Network error::A connection attempt failed because the conne

Post by gchen50 » Mon 12 Jul 2010 16:18

I am testing the OracleCommand.cancel() in direct mode.

The lengthy query is handled by BackgroundWorker

The version I used is 5.35.79.0
Oracle server is 10.2.0.4.0 - 64bit Production

Using the same query, sometime, the OracleCommand.cancel() works, some times, I got this error message.

In previous version of direct mode, OracleCommand.cancel() did not work at all.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Tue 13 Jul 2010 12:19

We are investigating the problem. We have sent you details by e-mail.

gchen50
Posts: 3
Joined: Fri 09 Jul 2010 20:34

Post by gchen50 » Wed 14 Jul 2010 17:22

I did update the newest version.

Beside the same error, some times, the user request cancellation exception was not throw, so the BackgroundWorker will not get notified, and is alway busy.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 15 Jul 2010 09:15

Could you please modify our sample we have sent you in the 21622 ticket or sent your own code with corresponding DDL/DML so that we can reproduce the "NET: Unknown error 1" and "Network error::A connection attempt failed because the conne..." errors in our environment? We are investigating the problem.

gchen50
Posts: 3
Joined: Fri 09 Jul 2010 20:34

Post by gchen50 » Thu 15 Jul 2010 20:48

I did not receive the sample in the 21622 ticket. Can you send to me again?
Thanks.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 16 Jul 2010 08:00

I have just re-sent my last letter to you again. A test code is placed to the body of letter. If you didn't receive it, please give me (alexsh at devart*com) another e-mail address.

[email protected]
Posts: 1
Joined: Fri 17 Jul 2009 01:20
Location: USA

NET: Unknown error 1

Post by [email protected] » Thu 07 Oct 2010 21:54

What happened with this issue. I am getting the exact same error stack. I am using direct connect and canceling a query.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 08 Oct 2010 12:45

We have made two fixes concerning the OracleCommand.Cancel() issue. The first fix is included to the 5.70.170 build (you can try it now), the second fix will be available in the next build. We are planning to make the new build next week. I will post here when it is available.

slaxman
Posts: 51
Joined: Wed 16 Sep 2009 20:09
Location: United States

is this the 2nd fix you are refering to?

Post by slaxman » Tue 12 Oct 2010 21:14

Shalex wrote:We have made two fixes concerning the OracleCommand.Cancel() issue. The first fix is included to the 5.70.170 build (you can try it now), the second fix will be available in the next build. We are planning to make the new build next week. I will post here when it is available.
I am still getting the exception in 5.70.170. Is the 2nd fix going to address this?
---

Code: Select all

EXCEPTION (Devart.Data.Oracle.OracleException): Network error:: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
Stack Trace:   at Devart.Data.Oracle.br.a(Byte[] A_0, Int32 A_1, Int32 A_2)
   at Devart.Data.Oracle.br.a(Byte& A_0)
   at xc.l.b(Byte[] A_0, Int32 A_1, Int32 A_2)
   at xc.l.b()
   at Devart.Data.Oracle.d.c()
   at Devart.Data.Oracle.q.a(Int32 A_0, a3 A_1)
   at Devart.Data.Oracle.OracleCommand.InternalExecute(CommandBehavior behavior, IDisposable disposable, Int32 startRecord, Int32 maxRecords, Boolean nonQuery)
   at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
   at Devart.Data.Oracle.OracleCommand.ExecuteNonQuery()
   at Devart.Data.Oracle.OracleTransaction..ctor(OracleConnection A_0, IsolationLevel A_1)
   at Devart.Data.Oracle.OracleConnection.BeginTransaction(IsolationLevel il)
   at Devart.Data.Oracle.OracleConnection.BeginDbTransaction(IsolationLevel isolationLevel)
   at System.Data.EntityClient.EntityConnection.BeginDbTransaction(IsolationLevel isolationLevel)

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 13 Oct 2010 09:00

1. Slaxman, is this problem specific for Direct Mode only, isn't it?
2. Please send us a small test project with the DDL/DML script to reproduce the issue in our environment. We will reproduce and fix it or confirm that it is already fixed. Or wait the new build that should be available this week (with the second fix).

slaxman
Posts: 51
Joined: Wed 16 Sep 2009 20:09
Location: United States

Post by slaxman » Wed 13 Oct 2010 18:37

to answer your qns.
1. YES
2. will wait because it's only copule of days. I don't mind using your beta version to test this. That may be faster than setting up a sample project

thanks for the quick response.

-slaxman

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 14 Oct 2010 15:11

New build of dotConnect for Oracle 5.70.180 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=19236 .

Please notify us if the OracleCommand.Cancel() issue is solved in this build.

slaxman
Posts: 51
Joined: Wed 16 Sep 2009 20:09
Location: United States

looks better

Post by slaxman » Thu 14 Oct 2010 18:12

in my brief testing with v5.70.180.0, the prev. error I posted does not seem to happen but I got the follwing exception in EF save one time.

----

Code: Select all

||844|2010/10/14 10:48:02.093|1548|PoolThread:10|||   INNER EXCEPTION (Devart.Data.Oracle.OracleException): Network error: 200
Stack Trace:   at Devart.Data.Oracle.DirectUtils.a(Int32 A_0)
   at Devart.Data.Oracle.z.b(Boolean A_0)
   at Devart.Data.Oracle.OracleInternalConnection.Rollback()
   at Devart.Data.Oracle.OracleTransaction.a()
   at Devart.Data.Oracle.OracleTransaction.Dispose(Boolean disposing)
   at System.Data.EntityClient.EntityTransaction.Dispose(Boolean disposing)
   at System.Data.Objects.ObjectContext.SaveChanges(Boolean acceptChangesDuringSave)

Post Reply