Search found 4 matches

by CadeThacker
Mon 18 Apr 2011 16:04
Forum: dotConnect for Oracle
Topic: Can not find Oracle home / Points of Confusion
Replies: 10
Views: 11542

I just wanted to post back that we did finally solve this issue, but it was definitely trial and error.

Back on April 5, I tried to solve this and ran into errors. I put this to the side for a couple of days. Then I came back and worked through this very meticulously. I created a tiny console app and compiled three ways:x86, x64, and AnyCPU. I moved all three from my x86 laptop to my x64 server. The AnyCPU and x64 worked correctly against the Oracle Client (OCI). The x86 failed with the "Can not find Oracle home". Results as expected.

OK, cool. Success.

Then I created a new empty MVC3 app, and added one controller with one action. I then copy and pasted the code from the console app (listed in my posting above on April 5) into my action on the controller.

I also compiled this app 3 ways: x86, x64, and AnyCPU. I then deployed all three to the server under different urls. As with the console app, the x64 and AnyCPU worked and the x86 failed with the same error.

The only thing that was weird was I was getting some odd errors, so I had to run IISRESET on the server, but that cleared everything up.

So AnyCPU did end up working correctly. A good "Clean Solution" is always a good thing. When I tried the console app back on April 5, I was in a hurry, so no telling if I just copied the wrong exe over.

Thanks for all your help and patience.

--cade
by CadeThacker
Wed 06 Apr 2011 18:50
Forum: dotConnect for Oracle
Topic: Can not find Oracle home / Points of Confusion
Replies: 10
Views: 11542

Per the x64 Capacity here is what I verified

1) The OS is Windows 2008 R2 (64-bit)

2) The oracle client is x64

3) The code was compiled in Visual Studio 2010 with "Any CPU" selected in the project.

Per http://msdn.microsoft.com/en-us/library/zekwfyz4.aspx

Executables compiled with the /platform:anycpu will execute on the 64 bit CLR.

----

For the moment, we have changed the connection string to Direct=true, so we are moving forward, but still really need to get this working.

What next?
by CadeThacker
Tue 05 Apr 2011 21:56
Forum: dotConnect for Oracle
Topic: Can not find Oracle home / Points of Confusion
Replies: 10
Views: 11542

AndreyR,
Thanks for the reply. See below

1) Per your suggestion, I created a console app as follows:

Code: Select all

static void Main(string[] args)
{
  try
  {
     var model = new Entities();
     var things = from m in model.THING
                    select m;

      Console.WriteLine(string.Format("Found {0} things.", things.Count()));

  }
  catch (Exception ex)
  {
      Console.WriteLine(ex.ToString());
  }
}
2) I added a reference to the Devart.Data.Oracle.Entity.dll and set it as copy local = true.

3) I wanted to rule out everything else before we continue to dig, so the DBA completely removed the Oracle Client and reinstalled it x64 (which matches the Windows 2008 R2 x64)

4) The PATH variable does contain the path to the client directory.

When I execute the console app it shows the following:

Code: Select all

C:\Users\myaccount>DevArtTestConsole.exe System.Data.EntityException: The underlying provider failed on Open. ---> System.InvalidOperationException: Can not find Oracle home.
   at Devart.Data.Oracle.OracleInternalConnection..ctor(ae connectionOptions, OracleInternalConnection proxyConnection)
   at Devart.Data.Oracle.cq.a(i A_0, Object A_1, DbConnectionBase A_2)
   at Devart.Common.DbConnectionFactory.a(DbConnectionPool A_0, i A_1, DbConnect
[snip]
For reference sake here is my app.config

Code: Select all



  
    
  


  
    
    
  


Any other suggestions? If I change out the connect string to Direct=true, then it works as expected. So definitely something to do with working with the local Oracle client.
by CadeThacker
Tue 05 Apr 2011 00:25
Forum: dotConnect for Oracle
Topic: Can not find Oracle home / Points of Confusion
Replies: 10
Views: 11542

Can not find Oracle home / Points of Confusion

Hello Devart folks,
I'm stuck and really need some help. If these questions sound basic to you all please be gentle, because as somebody brand new to the entire stack (MVC3 .NET 4.0, EF4, Oracle 10.2, Devart, IIS7) this seems very tricky.

The problem. When I execute my application I get the following:

System.Data.EntityException: The underlying provider failed on Open. ---> System.InvalidOperationException: Can not find Oracle home.

So, here are the steps I took to investigate. Feel free to give me a Harder, Better, Faster, Stronger(tm) way to work this:

To help narrow down the variables, I created a test MVC app that did nothing but query the Oracle database via EF on my laptop and report the number of rows back. Worked great there.

I'm now trying to deploy this test app to the development server. [edit: the development server and my laptop both connect to the same Oracle database, fyi]

So here are the steps I took on the server (Windows 2008). Just to be clear, the DBA has already gone home, so this may be an Oracle issue, but that being said, I still have tons of questions about DevArt, and hopefully you all can tell me if any of the steps below are not required or give me clarification.

1) I did a "minimal" install of Devart installer (dcoracle610pro.exe) which seemed to put Devart.Data and Devart.Data.Oracle into GAC.

2) I found my inventory.xml file in Oracle and located the following line HOME NAME="OraClient10g_home1" The client is 10.2.0

3) I then updated the web.config entity framework connection string so it said Home=OraClient10g_home1;

4) For good measure, though not sure it is needed, I created a system wide environment variable called ORACLE_HOME with the full path to the client install.

5) I then went to
http://www.devart.com/dotconnect/oracle ... yment.html
and followed the instructions to update my web.config on the server changing the version to 6.10.126.0

6) I'm confused about deploying the EF & Linq DLL being separate. Why doesn't the Minimal install take care of that? If I look under References in my Visual Studio project, I do not have *any* references to DevArt DLLs, but it works great. Should I add those in there and mark them as CopyLocal = True?

7) And this just made no sense to me at all:
http://www.devart.com/dotconnect/oracle ... ml#general
Maybe this is because of point #6 above, but if I'm deploying MVC and installing DevArt Minimal on the server, do I need to follow any of these steps? The Wizard said: License is not needed. The library does not have reference to Devart.Data.Oracle.

I'm sorry if these seems like a ton of stuff, but I figured if I was confused, then somebody else was probably confused too, and maybe this will help somebody else.