version 6.50 returns generic errors when pooling used

version 6.50 returns generic errors when pooling used

Postby Apparel21 » Thu 03 Nov 2011 04:13

We have upgraded from version 6.10.141.0 to version 6.50.237.0.
Certain types of connection errors now give a generic Connection pool timeout error, instead of the real connection problem.

If an invalid username or password is provided, we expect Devart.Data.Oracle.Exception "ORA-01017: invalid username/password; logon denied" to be the exception.

Instead we get a System.InvalidOperationException
{"Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached."}

Note- the correct error is thrown is pooling is not used, but we have always used pooling and this used to work.

Can anyone suggest a solution for this?
Thanks for any answers!


example:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Devart.Data.Oracle;

namespace ConsoleApplication1
{
///
/// This class provides the internal error codes for known connection failures.
///

public class OracleErrors
{
///
/// The Database name could not be found in the TNS Names file.
///

public const int CouldNotResolveIdentifier = 12154;

///
/// The username and or password was invalid. Login was denied.
///

public const int InvalidUserNamePassword = 1017;

///
/// The value found in the SID fragment of the TNS Names entry could not be found.
///

public const int UnknownSID = 12505;

///
/// The value found in the Host fragment of the TNS Names entry could not be found.
///

public const int UnknownHost = 12545;

///
/// No listener could be found on the specified port.
///

public const int NoListenerFound = 12541;

///
/// Connection failed.
///

public const int TnsInvalidArguments = 12532;

///
/// Connection failed.
///

public const int TnsPermissionDenied = 12546;
}

class Program
{
static void Main(string[] args)
{
OracleConnection Connection = new OracleConnection("User ID=name;Password=pwd;Data Source=DATABASE");

OracleDependency.Enabled = false;
try
{
Connection.Open();
}
catch (Exception e)
{
string ConnectionFailureReason = e.Message;
if (e is OracleException)
{
OracleException ex = (e as OracleException);
switch (ex.Code)
{
case OracleErrors.CouldNotResolveIdentifier:
ConnectionFailureReason = "Could Not Resolve Identifier";
break;
case OracleErrors.UnknownSID:
ConnectionFailureReason = "UnknownSID";
break;
case OracleErrors.UnknownHost:
ConnectionFailureReason = "UnknownHost";
break;
case OracleErrors.NoListenerFound:
ConnectionFailureReason = "NoListenerFound";
break;
case OracleErrors.TnsInvalidArguments:
ConnectionFailureReason = "TnsInvalidArguments";
break;
case OracleErrors.TnsPermissionDenied:
ConnectionFailureReason = "TnsPermissionDenied";
break;
case OracleErrors.InvalidUserNamePassword:
ConnectionFailureReason = "InvalidUserNamePassword";
break;
}
}

throw new Exception(ConnectionFailureReason);
}
}
}
}
Apparel21
 
Posts: 15
Joined: Mon 01 Sep 2008 01:55

Postby Shalex » Thu 03 Nov 2011 16:15

The bug with returning invalid connections to pool is fixed. We will post here when the corresponding build of dotConnect for Oracle is available for download.
Shalex
Devart Team
 
Posts: 7460
Joined: Thu 14 Aug 2008 12:44

Postby vmakkenz » Wed 09 Nov 2011 10:28

Hi, I think I'm running into the same problem is the new build available?

After upgrading I get Timeout expired while nothing changed.
Removing Home= from connection strings seems te help
vmakkenz
 
Posts: 18
Joined: Tue 26 Aug 2008 13:30

Postby mcounsell » Fri 11 Nov 2011 10:47

I see this same issue. Sometimes it can lead to Unhandled exceptions, sometimes it leads to an exception when I call IDbConnection.Open(). Eitherway it is a complete showstopper. Can I download the prev/old version?? The library is kind of useless if one cannot even open connects to Oracle!
mcounsell
 
Posts: 1
Joined: Fri 11 Nov 2011 10:36

Postby Shalex » Fri 11 Nov 2011 16:47

New build of dotConnect for Oracle 6.50.244 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=22547 .

This build includes the fix for the bug with returning invalid connections to pool.
Shalex
Devart Team
 
Posts: 7460
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle