EF Core 2.2.0, Oracle Error end-of-file on communication channel

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
enrico.rinaldini
Posts: 4
Joined: Fri 11 Jan 2019 10:22

EF Core 2.2.0, Oracle Error end-of-file on communication channel

Post by enrico.rinaldini » Fri 11 Jan 2019 10:37

Hello,

I'm using the last version of the Devart.Data.Oracle.EFCore 9.6.675.

I'm having an error when trying to use FirstOrDefault() function, code below:

Code: Select all

Devart.Data.Oracle.OracleException: ORA-03113: end-of-file on communication channel
I think the problem is the way the FirstOrDefault is translated in query for the Oracle Database.
This issue is present Connecting to a 10.2.0.5.0 version and not in a 12.2 version.

Going back to EF Core v2.1.4 works for now.

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

Re: EF Core 2.2.0, Oracle Error end-of-file on communication channel

Post by Shalex » Mon 14 Jan 2019 14:35

We cannot reproduce the issue in our environment.

The error you are getting is not related to ORM itself. So, you should be able to reproduce it with a plain ADO.NET connection:

Code: Select all

    var conn = new Devart.Data.Oracle.OracleConnection();
    conn.ConnectionString = @"direct=false;server=orcl1020;uid=scott;pwd=tiger;license key=...";
    //conn.ConnectionString = @"direct=true;server=dboracle;service name=orcl1020;uid=scott;pwd=tiger;license key=...";
    conn.Open();
1. Are you getting this error in both OCI and Direct modes?
2. Try connecting to your Oracle Server 10.2.0.5.0 with a different tool (e.g.: Oracle SQL Developer). Does the issue persist in this case?

enrico.rinaldini
Posts: 4
Joined: Fri 11 Jan 2019 10:22

Re: EF Core 2.2.0, Oracle Error end-of-file on communication channel

Post by enrico.rinaldini » Wed 16 Jan 2019 10:01

Thanks for the Reply,
I tried to connect to the database with OCI insted of Direct Mode as suggested, same problem.

Devart.Data.Oracle.OracleException: 'ORA-03113: end-of-file on communication channel.

FirstOrDefault() is translated with this query, referring at the connection:

Code: Select all

SELECT u.USERID,
       u.FIRSTNAME,
       u.LASTNAME,
       u.LOCKED,
       u.LOGOFFTIME,
       u.USERNAME,
  FROM USERS u
 WHERE (ROWNUM) <= 1
Using this query on TOAD, Oracle SQL Developer and also On Visual Studio Query Window give me the same error as I mentioned before.

On Oracle 12 database the query is translated like this:

Code: Select all

SELECT u.USERID,
       u.FIRSTNAME,
       u.LASTNAME,
       u.LOCKED,
       u.LOGOFFTIME,
       u.USERNAME,
  FROM USERS u
FETCH FIRST 1 ROWS ONLY
Works with no problems.

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

Re: EF Core 2.2.0, Oracle Error end-of-file on communication channel

Post by Shalex » Wed 16 Jan 2019 16:37

enrico.rinaldini wrote: Wed 16 Jan 2019 10:01Devart.Data.Oracle.OracleException: 'ORA-03113: end-of-file on communication channel.

FirstOrDefault() is translated with this query, referring at the connection:

Code: Select all

SELECT u.USERID,
       u.FIRSTNAME,
       u.LASTNAME,
       u.LOCKED,
       u.LOGOFFTIME,
       u.USERNAME,
  FROM USERS u
 WHERE (ROWNUM) <= 1
Using this query on TOAD, Oracle SQL Developer and also On Visual Studio Query Window give me the same error as I mentioned before.
The generated query is correct. We think that the problem is caused by your Oracle Server 10.2. Things to try:

a) can you open a simple ADO.NET connection to your Oracle Server 10.2?

Code: Select all

  var conn = new Devart.Data.Oracle.OracleConnection();
  conn.ConnectionString = @"direct=true;server=dboracle;service name=orcl1020;uid=scott;pwd=tiger;license key=...";
  //conn.ConnectionString = @"direct=false;server=orcl1020;uid=scott;pwd=tiger;license key=...";
  conn.Open();
b) modify the query that fails to find out the exact change in it which leads to the error. For example, start with SELECT "t".ID_CAUSE FROM TB_CAUSE "t". Does it work?

c) refer to general forums about this error like https://stackoverflow.com/questions/536 ... -oracle-11

enrico.rinaldini
Posts: 4
Joined: Fri 11 Jan 2019 10:22

Re: EF Core 2.2.0, Oracle Error end-of-file on communication channel

Post by enrico.rinaldini » Thu 17 Jan 2019 07:36

Hi Shalex,

I think I found the problem:

Code: Select all

SELECT "t".ID_CAUSE, "t".CAUSE_LEVEL, "t".LANGUAGE, "t".DESCRIPTION, "t".MACHINE_CODE 
FROM TB_CAUSE "t" 
WHERE (ROWNUM) <=1;
give the error ORA-03113: end-of-file on communication channel.

If I use the same query without parentesis on ROWNUM, like this:

Code: Select all

SELECT "t".ID_CAUSE, "t".CAUSE_LEVEL, "t".LANGUAGE, "t".DESCRIPTION, "t".MACHINE_CODE 
FROM TB_CAUSE "t" 
WHERE ROWNUM <=1;
the query works correctly.

Responding to your question:
a) Yes opening a simple ADO.NET connection is working.
b) Changing the query is working with no problem.

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

Re: EF Core 2.2.0, Oracle Error end-of-file on communication channel

Post by Shalex » Thu 17 Jan 2019 14:48

Looks like the bug in Oracle Server 10.2.0.5.0.

As a workaround, we will change the SQL generation (ROWNUM) -> ROWNUM and notify you about this.

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

Re: EF Core 2.2.0, Oracle Error end-of-file on communication channel

Post by Shalex » Fri 18 Jan 2019 12:06

The bug with using .FirstOrDefault() against Oracle Server 10.2 is fixed. We will notify you when the new public build of dotConnect for Oracle is available for download.

enrico.rinaldini
Posts: 4
Joined: Fri 11 Jan 2019 10:22

Re: EF Core 2.2.0, Oracle Error end-of-file on communication channel

Post by enrico.rinaldini » Mon 21 Jan 2019 11:11

Thanks.

Best Regards

michael1988
Posts: 5
Joined: Tue 05 Feb 2019 08:29

Re: EF Core 2.2.0, Oracle Error end-of-file on communication channel

Post by michael1988 » Tue 05 Feb 2019 08:48

We have the same problem. Do you already know when a fixed version is available via nuget?

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

Re: EF Core 2.2.0, Oracle Error end-of-file on communication channel

Post by Shalex » Tue 05 Feb 2019 19:17

The internal build with the fix is available at https://www.devart.com/pub/nuget_oracle_9_6_682.zip.

michael1988
Posts: 5
Joined: Tue 05 Feb 2019 08:29

Re: EF Core 2.2.0, Oracle Error end-of-file on communication channel

Post by michael1988 » Wed 06 Feb 2019 09:23

When it is available via nuget?

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

Re: EF Core 2.2.0, Oracle Error end-of-file on communication channel

Post by Shalex » Wed 06 Feb 2019 14:43

We are planning to release a new public version and upload it to NuGet next week.

michael1988
Posts: 5
Joined: Tue 05 Feb 2019 08:29

Re: EF Core 2.2.0, Oracle Error end-of-file on communication channel

Post by michael1988 » Thu 07 Feb 2019 07:44

Thanks for the information. That would be great. :)

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

Re: EF Core 2.2.0, Oracle Error end-of-file on communication channel

Post by Shalex » Mon 18 Feb 2019 13:07

The bug with using .FirstOrDefault() against Oracle Server 10.2 is fixed: viewtopic.php?f=1&t=38378.

KerenLindsay
Posts: 1
Joined: Fri 29 Mar 2019 10:34

Re: EF Core 2.2.0, Oracle Error end-of-file on communication channel

Post by KerenLindsay » Wed 03 Apr 2019 09:29

We at present have a comparable inconvenience. Do you certainly know when an unfaltering variety is available through nuget ?
steroids for sale
rad140 review
over the counter phentermine
Last edited by KerenLindsay on Tue 15 Mar 2022 07:25, edited 1 time in total.

Post Reply