Cannot load Oracle client. Check your PATH environment variable and registry settings.

Cannot load Oracle client. Check your PATH environment variable and registry settings.

Postby DotConnectUser » Tue 11 Apr 2017 07:23

Request Category: Technical
Product: dotConnect for Oracle
Product Version: 8.5.497.0
OS Version: Windows 10
Platform: x64

Details:

Hello,
We have a .net application which used dotConnect to connect to Oracle.
Everything was working fine on windows 7 with Oracle client 11.2.0.1 (full client install).
Now when I'm launching the application on my new development PC running windows 10 with Oracle instant client 12.1.0.2 (32 bits only) I have the following error message:
Cannot load Oracle client. Check your PATH environment variable and registry settings.

After some research, I suspect that some registry key are not found.
This is further confirmed by the message receveied when using Dot Connect for Oracle DEMO:
Cannot obtain Oracle client information from registry...

My application is running in 32bits mode and as only 32 bits version of Oracle client is installed, I don't have keys HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
however, I do have keys in HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ORACLE.

Could you please help me with this issue?

Best regards,
Raphaël
DotConnectUser
 
Posts: 4
Joined: Tue 11 Apr 2017 07:20

Re: Cannot load Oracle client. Check your PATH environment variable and registry settings.

Postby Pinturiccio » Tue 11 Apr 2017 12:09

Please refer to the following link for more information about how to configure Oracle Instant Client http://blog.devart.com/how-to-configure-oracle-instant-client.html. Please also try running Visual Studio as administrator.
Pinturiccio
Devart Team
 
Posts: 2046
Joined: Wed 02 Nov 2011 09:44

Re: Cannot load Oracle client. Check your PATH environment variable and registry settings.

Postby DotConnectUser » Wed 12 Apr 2017 07:58

Thank you for your reply.

Unfortunately I was unable to solve the issue by following the configuration instruction: I still have the same error message.

Is there a way to have a more precise message pinpointing precisely with environment variable or which registry key is missing?
It would allow me to solve this problem much more quickly.
DotConnectUser
 
Posts: 4
Joined: Tue 11 Apr 2017 07:20

Re: Cannot load Oracle client. Check your PATH environment variable and registry settings.

Postby Pinturiccio » Thu 13 Apr 2017 14:44

We have performed the steps described in our blog and successfully connected to Oracle via Oracle Instant Client and dotConnect for Oracle 8.5.497.0 on Windows 10 x64.

Please provide the following information:
1. The folder where the Oracle Instant Client x86 is installed;
2. The value of your Path variable;
3. Contents of the inst_ora.reg file you have created;
4. The value of the "Platform target" parameter in your Visual Studio project.
Pinturiccio
Devart Team
 
Posts: 2046
Joined: Wed 02 Nov 2011 09:44

Re: Cannot load Oracle client. Check your PATH environment variable and registry settings.

Postby DotConnectUser » Thu 13 Apr 2017 14:54

Thank you for you reply.
We just found the cause of the issue: we use a com component which require oci.dll to be in the application directory and this oci.dll was outdated.

I think the error message is very misleading and it made us search in the wrong direction (I suspect there is a generic catch which throw this message whatever the reason for connection failure).
Could you maybe improve it to include the unaltered exception message?

Best regards.
DotConnectUser
 
Posts: 4
Joined: Tue 11 Apr 2017 07:20

Re: Cannot load Oracle client. Check your PATH environment variable and registry settings.

Postby Pinturiccio » Fri 14 Apr 2017 14:17

We think that the error message reflected the true reason of the error. Probably you have configured Instant Client incorrectly, or Visual Studio runs on behalf of a user with limited privileges and cannot access the registry.

When you place Instant Client, including oci.dll, to the same folder with your application, dotConnect for Oracle finds this Instant Client. Thus you solved the issue that the application cannot find Instant Client by placing oci.dll to the folder of your application.
Pinturiccio
Devart Team
 
Posts: 2046
Joined: Wed 02 Nov 2011 09:44

Re: Cannot load Oracle client. Check your PATH environment variable and registry settings.

Postby DotConnectUser » Mon 24 Apr 2017 07:20

Hello,

There was a misunderstanding: we solved the problem by removing the oci.dll present in the folder of our application.
Also Visual Studio was not involved because we were launching the application directly with its exe file.

In any case, even if the message is correct it should be more precise by indicating clearly which registry key or env variable is missing...

Best regards.
DotConnectUser
 
Posts: 4
Joined: Tue 11 Apr 2017 07:20

Re: Cannot load Oracle client. Check your PATH environment variable and registry settings.

Postby Pinturiccio » Thu 27 Apr 2017 13:24

Such error occurs when Oracle Client cannot be found. We don’t know why it cannot be found (via the registry or the PATH environment variable). That’s why the error text is like this.
Pinturiccio
Devart Team
 
Posts: 2046
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect for Oracle