Can not load Oracle client. Check your PATH environment vari

Can not load Oracle client. Check your PATH environment vari

Postby developmentalmadness » Thu 19 Mar 2009 22:12

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
developmentalmadness
 
Posts: 4
Joined: Thu 19 Mar 2009 22:10

Postby Shalex » Fri 20 Mar 2009 11:19

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.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

Postby developmentalmadness » Fri 20 Mar 2009 12:46

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?
developmentalmadness
 
Posts: 4
Joined: Thu 19 Mar 2009 22:10

Postby Shalex » Fri 20 Mar 2009 17:32

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.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

Same problem with VISTA

Postby degas » Tue 31 Mar 2009 00:32

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]
degas
 
Posts: 77
Joined: Mon 16 Feb 2009 18:36
Location: Argentina

Postby Shalex » Tue 31 Mar 2009 10:28

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).
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

I finally got it

Postby developmentalmadness » Thu 09 Apr 2009 21:41

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.
developmentalmadness
 
Posts: 4
Joined: Thu 19 Mar 2009 22:10

Postby tokh » Fri 15 May 2009 07:14

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?
tokh
 
Posts: 4
Joined: Fri 08 May 2009 08:59

i hope this helps?

Postby degas » Fri 15 May 2009 13:28

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
degas
 
Posts: 77
Joined: Mon 16 Feb 2009 18:36
Location: Argentina

Postby tokh » Mon 18 May 2009 10:25

Sure that I need the _db.zip, not 10203_vista_w2k8_x86_production_client.zip?
tokh
 
Posts: 4
Joined: Fri 08 May 2009 08:59

you aere rigth

Postby degas » Tue 19 May 2009 13:16

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]
degas
 
Posts: 77
Joined: Mon 16 Feb 2009 18:36
Location: Argentina

Postby danielliu8 » Tue 16 Mar 2010 23:16

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
danielliu8
 
Posts: 33
Joined: Wed 17 Jun 2009 22:59
Location: ca

Postby StanislavK » Wed 17 Mar 2010 11:31

I've answered you in other topic:
http://www.devart.com/forums/viewtopic.php?t=17363
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby Niels Wijnja » Thu 26 Aug 2010 09:39

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.
Niels Wijnja
 
Posts: 4
Joined: Wed 25 Aug 2010 10:45
Location: Zoetermeer, The Netherlands

Postby Shalex » Thu 26 Aug 2010 10:55

1. Please specify the exact error message.
2. Does your normal user have access to the PATH variable and to the registry?
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

Next

Return to dotConnect for Oracle