Could Not Load Oracle Client Check Path/Registry

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
ever;last88az
Posts: 4
Joined: Mon 24 Aug 2015 21:51

Could Not Load Oracle Client Check Path/Registry

Post by ever;last88az » Mon 28 Sep 2015 17:07

Please provide explicit, step by step instructions on how to provide the correct path settings and registry settings. Have searched extensively throughout your documentation and found no such instructions.

It is a poor user experience to pay for software and have to check/update settings that could easily be programmed by the developers of this product.

These two lines are the first items in my path
C:\app\<user>\product\11.2.0\client_2;C:\app\<user>\product\11.2.0\client_2\bin;

I have switched these around and restarted with no luck (oci.dll in in /client_2 not in /client_2/bin).


Path related
tns_admin: path to tns admin\
ORACLE_HOME: C:\app\<user>\product\11.2.0\client_2

1. Provide all needed Registry settings
2. Provide all necessary PATH settings.

dot connect version: 8.2 Pro
client folder: C:\app\295501\product\11.2.0\client_2
client folder(64?): C:\Oracle\product\11.2.0\client_1

[HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraClient11g_home2]
"ORACLE_HOME"="..\product\\11.2.0\\client_2"
"ORACLE_HOME_NAME"="OraClient11g_home2"
"ORACLE_GROUP_NAME"="Oracle - OraClient11g_home2"
"OLEDB"="..\11.2.0\\client_2\\oledb\\mesg"
"tns_admin"="...\11.2.0\\client_2\\Network\\Admin"


{"The underlying provider failed on Open."}
{"Can not load Oracle client. Check your PATH environment variable and registry settings."}



Stack Trace:
at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)
at System.Data.EntityClient.EntityConnection.Open()
at System.Data.Objects.ObjectContext.EnsureConnection()
at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
at System.Data.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__3[TResult](IEnumerable`1 sequence)
at System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
at System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[S](Expression expression)
at System.Data.Entity.Internal.Linq.DbQueryProvider.Execute[TResult](Expression expression)
at System.Linq.Queryable.Count[TSource](IQueryable`1 source)


inner stack trace:

at Devart.Data.Oracle.az..ctor(Boolean A_0, Boolean A_1, OracleHome A_2)
at Devart.Data.Oracle.az.a(Boolean A_0, Boolean A_1, OracleHome A_2, Boolean A_3, Boolean A_4)
at Devart.Data.Oracle.OracleInternalConnection..ctor(b8 connectionOptions, OracleInternalConnection proxyConnection)
at Devart.Data.Oracle.am.a(p A_0, Object A_1, DbConnectionBase A_2)
at Devart.Common.DbConnectionFactory.a(DbConnectionPool A_0, p A_1, DbConnectionBase A_2)
at Devart.Common.DbConnectionPoolGroup.a(DbConnectionPool A_0, DbConnectionBase A_1)
at Devart.Common.DbConnectionPool.a(DbConnectionBase A_0)
at Devart.Common.DbConnectionPool.GetObject(DbConnectionBase owningConnection)
at Devart.Common.DbConnectionFactory.b(DbConnectionBase A_0)
at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
at Devart.Common.DbConnectionBase.Open()
at Devart.Data.Oracle.OracleConnection.Open()
at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: Could Not Load Oracle Client Check Path/Registry

Post by Pinturiccio » Tue 29 Sep 2015 09:05

When you install Oracle Client on a computer, all the necessary records are added both to the registry and to environment variables automatically. If you perform some changes to your Oracle Client, take the oci.dll library out of the BIN folder or change the corresponding registry or environment variable values, we cannot guarantee that our provider will work with such Oracle Client.
ever;last88az wrote:{"The underlying provider failed on Open."}
{"Can not load Oracle client. Check your PATH environment variable and registry settings."}
There are several possible reasons for this error:
1. Information in the registry or environment variables differs from the default one, or the Client itself was modified, as described above.

2. Make sure that the bitness (x86 or x64) of your application and the bitness of your Oracle Client are the same.
If your application is x86, Oracle Client must also be x86. The information about 32bit Oracle Clients can be found in the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE
If your application is executed as an x64 application, Oracle Client also must be x64. The information about 64bit Oracle Clients can be found in the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE

You also can use the following code in your application in order to find Oracle homes that are available for the application of the current bitness:

Code: Select all

foreach (OracleHome home in OracleConnection.Homes) {
        Console.WriteLine("Name={0} ClientVersion={1} Path={2}", home.Name, home.ClientVersion, home.Path);
      }
3. Even when the information in the registry/environment variables is correct and the application tries using the correct Oracle Client, this error may occur when the application is started on behalf of a user with insufficient privileges to access the registry. In this case you need to run your application as Administrator.

ever;last88az
Posts: 4
Joined: Mon 24 Aug 2015 21:51

Can not obtain Oracle client information from registry

Post by ever;last88az » Tue 29 Sep 2015 17:48

I have completely uninstalled your software as well as removed/reinstalled the Oracle client 11.2.0.

I now receive the error:

{"Can not obtain Oracle client information from registry. Make sure that Oracle Client Software is installed, or use Direct mode of connecting to server."}

Where does it mention in the install instructions this client requires a 32-bit driver for Oracle? So what is in fact really required in two separate client drivers. One 64 and one 32.

Oracle information is present in the registry and the user account has administration privilege level. Only after realizing the code is accessing the 32 version of Oracle in the registry and not finding it, did I realize it required that driver.

DevArt has a long way to go in providing reliable products that have enough documentation. Not to mention meaningful error messages. The last things somoeone trying to develop something needs are these kinds of issues. I will definitely recommend moving away and staying away from your products.

These kind of simple configuration issues are unacceptable DevArt.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: Could Not Load Oracle Client Check Path/Registry

Post by Pinturiccio » Wed 30 Sep 2015 12:12

Thank you for your feedback.
ever;last88az wrote:Where does it mention in the install instructions this client requires a 32-bit driver for Oracle? So what is in fact really required in two separate client drivers. One 64 and one 32.
We will add the necessary information to our documentation.
ever;last88az wrote:Only after realizing the code is accessing the 32 version of Oracle in the registry and not finding it, did I realize it required that driver.
We have provided this information in our previous answer:
Pinturiccio wrote:2. Make sure that the bitness (x86 or x64) of your application and the bitness of your Oracle Client are the same.
If your application is x86, Oracle Client must also be x86. The information about 32bit Oracle Clients can be found in the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE
If your application is executed as an x64 application, Oracle Client also must be x64. The information about 64bit Oracle Clients can be found in the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE

Post Reply