This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I get the following error: {"Could not load file or assembly 'Oracle.DataAccess, Version=10.2.0.100, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.":"Oracle.DataAccess, Version=10.2.0.100, Culture=neutral, PublicKeyToken=89b483f429c47342"} I have a reference to the Oracle.DataAccess assembly in my project. I have the following configurationof the LightSpeedContext object: private Repository(){ _context = new LightSpeedContext<TrepAppUnitOfWork>{ ConnectionString = "Data Source=MyOracleDB;User ID=*******;Password=******;Persist Security Info=True;",Logger = new ConsoleLogger(),DataProvider = DataProvider.Oracle9Odp,PluralizeTableNames = false}; } What am I doing wrong? Thanks in advance for your response.
--Dennis Moon
|
|
|
There are a couple of things I can think of that might be going on here: 1. Some sort of versioning issue -- e.g. .NET is looking specifically for v10.2.0.100 and finding only some other version. However I just tested using LightSpeed with Oracle.DataAccess v2.111.6.20 and it works fine so I doubt it is that. 2. Missing, or failing to find, a dependency. Check that the Oracle client is installed, the Oracle client bin directory is on the path and the application has permissions to the necessary Oracle client directories. (In a previous life we always had problems using Oracle in web applications because ASP.NET did not have read access to the Oracle client directories.) filemon or the Fusion log viewer may help to diagnose this case. |
|
|
ivan, Thanks for the response. I do have the Oracle 10g v10.2.0.100 client installed. It works just fine for every other .NET application I have developer on my workstation. The Oracle client bin directory is on the Environment path: My user account has full permissions to the Oracle client bin directory. I am testing LightSpeed with a windows console application. I am referencing the Oracle.DataAccess assembly located in: I tried adding that to the environment path, as well. The Oracle.DataAccess assmbly is installed in the Global Assembly Cache. I have tried referencing it both there and directly. Nothing seems to work to resolve the error I receive when I attempt to use the Oracle9Odp provider. I am very impressed with the ease of development using LightSpeed. However, my company requires the use of the Oracle.DataAccess provider. If I cannot make this work, I cannot recommend they consider buying this software. I could use some more ideas to try to fix this problem. Thanks in advance for your response.
--Dennis Moon
|
|
|
Hello Dennis, Sorry for the delay in replying. We realise that ODP support is a must-have for you and we're sorry you're running into this problem. Unfortunately we're a little bit puzzled because LightSpeed isn't doing anything differently from other programs so we're not sure why LightSpeed is failing when your other programs are okay. Would it be possible for you to turn on assembly binding logging and have a look at the Fusion logs? To do this run fuslogvw
from a SDK or Visual Studio command prompt and choose Settings > Log
all binds to disk. Then run your project (getting the exception) and
refresh the log. Hopefully somewhere in there you will see an entry
for Oracle.DataAccess. Select this and choose View Log -- hopefully
this will provide some idea of where the program is looking for
Oracle.DataAccess and why it is failing to find it. Is there any InnerException in the file load exception? Any other exception properties that are other than their default values? Is it a FileNotFoundException? If so, what is the value of the FusionLog property? Could you try referencing the Oracle.DataAccess DLL at the LightSpeed installation location (C:\Program Files\Mindscape\LightSpeed 2.1\Providers\Oracle9 ODP) rather than at the Oracle client location? Are there any binding redirects set up for the Oracle.DataAccess DLL? I have also attached a test project which I have been using to try to reproduce your problem. Would it be possible for you to run this on your machine and see if you get anything different? You will of course need to change the connection string; the DLL references are at the install location so you should not need to change those. The create script for the Comments table is:CREATE TABLE Comments Thanks for your patience and for helping us to track this down. |
|
|
Hi Ivan, I tried the tests as you requested using you test application. Please see the logs in the attached LightSpeedOracleTests.zip file. It contains two zip files. The log files in LightSpeedOracleTest_OracleDataAccess_2.102.2.20_oracle_client_dir.zip contains the logs recorded when I reference the .NET 2.0 version of the Oracle.DataAccess.dll in the Oracle client install directory: C:\oracle\product\10.2.0\client_1\ODP.NET\bin\2.x The log files in LightSpeedOracleTest_OracleDataAccess_10.2.0.100_Oracle9_Odp_dir.zip contains the logs recorded when I reference the Oracle.DataAccess.dll in the C:\Program Files\Mindscape\LightSpeed 2.1\Providers\Oracle9 ODP directory. I hope this information helps you diagnos this issue. I look forward to your response, --Dennis |
|
|
Ivan, I had missed your comment: "Are there any binding redirects set up for the Oracle.DataAccess DLL?" I added the following to an App.config file for the test application: <? xml version="1.0" encoding="utf-8" ?><configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <probing privatePath=".\dotnetbin;.\dotnetlib"/> <dependentAssembly> <assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89b483f429c47342" culture="neutral"/> <bindingRedirect oldVersion="10.2.0.100" newVersion="2.102.2.20" /> </dependentAssembly> </assemblyBinding> </runtime> </configuration> This fixed my problem. I am now able to use the Oracle9Odp provider option. I suggest you add this to your read me notes for new users. Thanks for your help. --Dennis
|
|
|
Dennis, that is great information and we really appreciate your patience in resolving this and in sharing the resolution. We will definitely add this to the documentation. Thanks! |
|
|
Hi,
We have the similar problem like, some of the .NET components are build using Oracle.DataAccess 9.2.0.700. But in the development machine we have vista and Oracle 10g client with Oracle.DataAccess 1.102.3.0.
When I compile the calling application. we are getting the following error:
Assembly 'Test.DataAccess, Version=5.0.2.187, Culture=neutral, PublicKeyToken=null' uses 'Oracle.DataAccess, Version=9.2.0.700, Culture=neutral, PublicKeyToken=89b483f429c47342' which has a higher version than referenced assembly 'Oracle.DataAccess, Version=2.102.2.20, Culture=neutral, PublicKeyToken=89b483f429c47342'.
I have tried with the above in the with config file. But still getting the same error.
Also some of our production servers we have the 10g client. So the components build in 9i is not working there. we are compiling with 10g for the deployment. Still we have some of the production servers are with 9i.
Please let me know if any one faced the same problem.
|
|
|
At runtime, you should be able to handle this with binding redirects as Dennis describes. You might need to use different redirects on the different production boxes (according to which version of Oracle.DataAccess is installed), though it would probably also be good to explore whether you can bring all the production boxes to a consistent client version as this will reduce maintenance costs and reduce the likelihood of deployment errors. Not sure about the compiler message. Is this an error or a warning? If it is a warning you may just need to exclude it. |
|
|
Thankyou so much. It helped me to resolve my issue. |
|
|
Thankyou so much. It helped me to resolve my issue. |
|