Page 1 of 2

Can not load Oracle client. Check your PATH environment vari

Posted: Thu 19 Mar 2009 22:12
by developmentalmadness
I am getting the error below when I try and run a web project which is using Entity Framework. I don't get the error when I run visual studio as local administrator. I thought this was because I was running as a low-priviliged account but I tried adding myself to the local administrators group and that doesn't work either. I tried reinstalling both devart dotconnect and the oracle 10g client (version 10.2) with my account as an administrator and it still doesn't work.

Here's my PATH environment variable:

C:\oracle\product\10.2.0\client\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\TortoiseSVN\bin


Here's the error I'm getting:

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

Stack trace:
[InvalidOperationException: Can not load Oracle client. Check your PATH environment variable and registry settings.]
Devart.Data.Oracle.aj..ctor(Boolean A_0, Boolean A_1, OracleHome A_2) +1176
Devart.Data.Oracle.aj.a(Boolean A_0, Boolean A_1, OracleHome A_2) +377
Devart.Data.Oracle.OracleInternalConnection..ctor(y connectionOptions, OracleInternalConnection proxyConnection) +382
Devart.Data.Oracle.bw.a(i A_0, Object A_1, DbConnectionBase A_2) +116
Devart.Common.DbConnectionFactory.a(DbConnectionPool A_0, i A_1) +43
Devart.Common.DbConnectionPoolGroup.c(DbConnectionPool A_0) +18
Devart.Common.DbConnectionPool.a() +44
Devart.Common.DbConnectionPool.GetObject() +367
Devart.Common.DbConnectionFactory.a(DbConnectionBase A_0) +77
Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection) +144
Devart.Common.DbConnectionBase.Open() +30
Devart.Data.Oracle.OracleConnection.Open() +267
System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +47

Posted: Fri 20 Mar 2009 11:19
by Shalex
Make sure your current user has permissions now to access the Path variables and registry. Maybe this user is not allowed to load some *.dll. Try to localize the problem.

Posted: Fri 20 Mar 2009 12:46
by developmentalmadness
I added my account to the local administrators group and it still gives me the error. Why would the "administrator" account work, but not a member of the "administrators" group?

Posted: Fri 20 Mar 2009 17:32
by Shalex
Maybe administrator has some advanced priviledges in addition to those that are provided to the "administrators" group members. We recommend you to find out what exactly your current user is missing. Create a test project and execute

Code: Select all

string path = Environment.GetEnvironmentVariable("PATH");
to find out if your user is allowed to access the PATH variable, and

Code: Select all

RegistryKey keys = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\ORACLE");
to check if your user can access to registry.

Same problem with VISTA

Posted: Tue 31 Mar 2009 00:32
by degas
I have the same problem with windows vista. I tried your code and i can see the user but not the registry key.
Any Ideas? I have tried for the past 3 days with no luck.[/quote]

Posted: Tue 31 Mar 2009 10:28
by Shalex
This question corresponds to your machine settings. Try opening Registry Editor (execute "regedit" from the command line) and setting the required permissions to the necessary braches of your registry (right click on the branch --> Permissions).

I finally got it

Posted: Thu 09 Apr 2009 21:41
by developmentalmadness
Here's what I had to do:

1) Install Vista version of the oracle client: http://www.oracle.com/technology/softwa ... vista.html
2) Make sure my ORACLE_HOME environment variable was not the "name" of my oracle home, but the full path to my oracle home directory. (I ran into this when I was looking at HKLM\Software\Oracle\KEY_{your oracle home name} . There was an ORACLE_HOME registry key with a path instead of the "name" of the oracle home. I tried copying this into my ORACLE_HOME environment variable and this worked.
3) Also, I ran the "Admin" installation option when installing the oracle client instead of just the "instant client" installation. I don't know if that makes a difference or not - it's working now and I"m not gonna touch it.

Posted: Fri 15 May 2009 07:14
by tokh
I get the same error also.
I installed dotconnect for oracle and it worked fine. But now, after a reboot of my machine, the error occures.
I tried the hints of this thread, without succes.

Any ideas?

i hope this helps?

Posted: Fri 15 May 2009 13:28
by degas
I have the same problem and got resolved by installing the Oracle Client version for windows VISTA x64.

this is the name of the file you should find:
10203_vista_w2k8_x86_production_db.zip

Good luck

Posted: Mon 18 May 2009 10:25
by tokh
Sure that I need the _db.zip, not 10203_vista_w2k8_x86_production_client.zip?

you aere rigth

Posted: Tue 19 May 2009 13:16
by degas
Yes of course but not the instant client. I hope this helps. I had the same problem with a HP DV1270 with Vista x64 installed.

[/u]

Posted: Tue 16 Mar 2010 23:16
by danielliu8
Hi,

I had same problem on my windows 2008 server(64bit), Oracle 10g and Devart, tried all the above ways, still not working.

Anyone could help?

thanks

daniel

Posted: Wed 17 Mar 2010 11:31
by StanislavK
I've answered you in other topic:
http://www.devart.com/forums/viewtopic.php?t=17363

Posted: Thu 26 Aug 2010 09:39
by Niels Wijnja
Had this same problem (well, not while developing but while running an application as a standard user).
Turns out.. simply putting the contents of the ORACLE_HOME registry value in an environment variable called ORACLE_HOME (almost obvious ;)) did the trick.
Very weird as the standard user does have access to the full oracle registry key under HKLM, seems like a nice bug to me.

edit: wow, 1 reboot later it stopped working.. great.

Posted: Thu 26 Aug 2010 10:55
by Shalex
1. Please specify the exact error message.
2. Does your normal user have access to the PATH variable and to the registry?