Could not load file or assembly Devart.Data.Oracle,

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for universal data access
Post Reply
simondan@data-systems.at
Posts: 3
Joined: Wed 03 Feb 2010 13:57

Could not load file or assembly Devart.Data.Oracle,

Post by simondan@data-systems.at » Fri 05 Feb 2010 11:49

It becomes an error when executing my application it in user's personal computer.

2010-02-05 12:26:49,822 [1] ERROR DataSystems.KabelWws.Statistik - Daten konnten nicht gelesen werden.
System.IO.FileNotFoundException: Could not load file or assembly 'Devart.Data.Oracle, Version=5.35.79.0, Culture=neutral, PublicKeyToken=09af7300eec23701' or one of its dependencies. Das System kann die angegebene Datei nicht finden.
File name: 'Devart.Data.Oracle, Version=5.35.79.0, Culture=neutral, PublicKeyToken=09af7300eec23701'
at Devart.Data.Universal.OraDirectProvider.GetProviderFactoryCore()
at Devart.Data.Universal.UniProviderBase.a()
at Devart.Data.Universal.UniProviderBase.CreateConnectionStringBuilderCore()
at Devart.Data.Universal.UniProviderBase.Devart.Data.Universal.IUniProvider.GetConnectionStringPropertyDescriptors(String& refreshKeyword, Object refreshKeywordValue)
at Devart.Data.Universal.UniConnectionStringBuilder.c()
at Devart.Data.Universal.UniConnectionStringBuilder.b()
at Devart.Data.Universal.UniConnectionStringBuilder.c(String A_0)
at Devart.Data.Universal.UniConnectionStringBuilder.b(String A_0)
at Devart.Data.Universal.UniConnectionStringBuilder.set_Item(String keyword, Object value)
at System.Data.Common.DbConnectionStringBuilder.set_ConnectionString(String value)
at Devart.Data.Universal.UniConnectionStringBuilder.set_ConnectionString(String value)
at Devart.Data.Universal.UniConnectionStringBuilder..ctor(String connectionString)
at f3.a(String A_0, ae0 A_1)
at Devart.Common.DbConnectionFactory.a(String A_0, ae0& A_1)
at Devart.Common.DbConnectionBase.set_ConnectionString(String value)
at Devart.Data.Universal.UniConnection.set_ConnectionString(String value)
at Devart.Data.Universal.UniConnection..ctor(String connectionString)
at DataSystems.KabelWws.Statistik.FormKundeArtikel.RefreshData() in C:\VisualStudioProjects\2008\DataSystems.KabelWws\DataSystems.KabelWws.Statistik\Forms\FormKundeArtikel.cs:line 592

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

I have installed the following assemblies to the GAC:
Devart.Data, Devart.Data.Design, Devart.Data.Universal, Devart.Data.Universal.Firebird, Devart.Data.Universal.MySql, Devart.Data.Universal.Oracle, Devart.Data.Universal.PostgreSql,
Devart.Data.Universal.SQLite, Devart.Data.Universal.Web

and Microsoft.Net Framework 2.0 Service Pack 2, Microsoft.Net Framework 3.0 Service Pack 2,
Microsoft.Net Framework 3.1 Service Pack 1.

What am I doing wrong?

Shalex
Site Admin
Posts: 8241
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 08 Feb 2010 12:26

1. Please specify the exact version (x.xx.xx) and edition of your dotConnect Universal. You can find it in the Tools | Universal | About menu of Visual Studio.

2. If your edition is Professional, please check the size of deployed Devart.Data.Universal.Oracle.dll - it should be about 1 Mb.
There is the reference to Devart.Data.Oracle.dll in the Devart.Data.Universal.Oracle.dll assembly with the size 200 kb, because Devart.Data.Universal.Oracle.dll (200 kb) should be used with Devart.Data.Oracle.dll from the separate dotConnect for Oracle installation. Both versions of Devart.Data.Universal.Oracle.dll are in the folder of dotConnect Universal Professional installation.

3. Tell us if your project has an explicit reference to Devart.Data.Oracle.dll.

simondan@data-systems.at
Posts: 3
Joined: Wed 03 Feb 2010 13:57

Post by simondan@data-systems.at » Mon 08 Feb 2010 12:41

1. I use dotConnect Universal Professional Edition 3.0.5.0
2. Distibuted Devart.Data.Universal.Oracle.dll size is 168 KB
3. I have not an explicit reference to Devart.Data.Oracle.dll.

Shalex
Site Admin
Posts: 8241
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 08 Feb 2010 13:37

Please replace \Program Files\Devart\dotConnect\Universal\Providers\External\Devart.Data.Universal.Oracle.dll (168 KB) with \Program Files\Devart\dotConnect\Universal\Providers\Devart.Data.Universal.Oracle.dll (about 1 MB) in your deployment environment and notify us about the results.

simondan@data-systems.at
Posts: 3
Joined: Wed 03 Feb 2010 13:57

Post by simondan@data-systems.at » Mon 08 Feb 2010 15:27

Now it worked, thank you

jpdomenge
Posts: 12
Joined: Fri 12 Mar 2010 08:17

Post by jpdomenge » Tue 16 Mar 2010 16:37

Hi,

I've got the same issue.

On my development PC where I have installed the package devart dotConnect Universal, I can build and execute my program that uses UniDirect.

I uploaded my sources to our SVN servers. My colleague checkout the SVN.She doesn't have the Devart package installed in her PC. She can compile but when she debug the aaplication the same error as SimonDan appears.

To be able to compile with my colleague computer, we have set referencies to assembly file (that come from the checkout) and not to the GAC beacause UniDirect is not installed on the computer.

So what is the correct way to use referencies in our solution without installing the DevArt package on the client computer ?


I use DotConnect Universal 3.10.9.0 beta trial version

I try both without referencies to Devart.Data.Oracle.dll and with a reference to Devart\dotConnect\Universal\Providers\Devart.Data.Oracle.dll

Regards.

Shalex
Site Admin
Posts: 8241
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 17 Mar 2010 14:47

1. An application that uses direct references to the Devart assemblies should be compiled at the machine where dotConnect Universal is installed to embed into your application correct license information.

2. If you are getting the error which SimonDan mentioned in his first post, please make sure that \Program Files\Devart\dotConnect\Universal\Providers\Devart.Data.Universal.Oracle.dll is loaded to the process of your application (check its size).

3. If the above information doesn't help, please post here the exact error message and your call stack.

frannizzo
Posts: 3
Joined: Mon 20 Aug 2012 18:16

Re: Could not load file or assembly Devart.Data.Oracle,

Post by frannizzo » Wed 22 Aug 2012 15:46

I have a similar issues...

Could not load file or assembly 'Devart.Data.Oracle, Version=6.80.350.0, Culture=neutral, PublicKeyToken=09af7300eec23701' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Devart.Data.Oracle, Version=6.80.350.0, Culture=neutral, PublicKeyToken=09af7300eec23701' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Devart.Data.Oracle, Version=6.80.350.0, Culture=neutral, PublicKeyToken=09af7300eec23701' could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



Stack Trace:


[FileLoadException: Could not load file or assembly 'Devart.Data.Oracle, Version=6.80.350.0, Culture=neutral, PublicKeyToken=09af7300eec23701' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +0
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +64
System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +58
System.Type.GetType(String typeName) +50
System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow) +114
System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) +114
Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSyntheticConfigSettings.GetDefaultMapping(String dbProviderName) in e:\Builds\EntLib\Latest\Source\Blocks\Data\Src\Data\Configuration\DatabaseSyntheticConfigSettings.cs:256
Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSyntheticConfigSettings.GetProviderMapping(String dbProviderName, DatabaseSettings databaseSettings) in e:\Builds\EntLib\Latest\Source\Blocks\Data\Src\Data\Configuration\DatabaseSyntheticConfigSettings.cs:243
Microsoft.Practices.EnterpriseLibrary.Data.Configuration.<get_Databases>d__0.MoveNext() in e:\Builds\EntLib\Latest\Source\Blocks\Data\Src\Data\Configuration\DatabaseSyntheticConfigSettings.cs:94
System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +7669796
System.Linq.Enumerable.ToList(IEnumerable`1 source) +61
Microsoft.Practices.EnterpriseLibrary.Data.Configuration.<DoGetRegistrations>d__10.MoveNext() in e:\Builds\EntLib\Latest\Source\Blocks\Data\Src\Data\Configuration\DatabaseSyntheticConfigSettings.cs:0
System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +96
System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +7669796
System.Linq.Enumerable.ToList(IEnumerable`1 source) +61
Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSyntheticConfigSettings.GetRegistrations(IConfigurationSource configurationSource) in e:\Builds\EntLib\Latest\Source\Blocks\Data\Src\Data\Configuration\DatabaseSyntheticConfigSettings.cs:307
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.TypeLoadingLocator.<GetRegistrations>b__0(ITypeRegistrationsProvider p, IConfigurationSource cs) in e:\Builds\EntLib\Latest\Source\Blocks\Common\Src\Configuration\ContainerModel\TypeLoadingLocator.cs:67
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.TypeLoadingLocator.GetRegistrationsInternal(IConfigurationSource configurationSource, Func`3 registrationAccessor) in e:\Builds\EntLib\Latest\Source\Blocks\Common\Src\Configuration\ContainerModel\TypeLoadingLocator.cs:90
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.TypeLoadingLocator.GetRegistrations(IConfigurationSource configurationSource) in e:\Builds\EntLib\Latest\Source\Blocks\Common\Src\Configuration\ContainerModel\TypeLoadingLocator.cs:67
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.CompositeTypeRegistrationsProviderLocator.<GetRegistrations>b__0(ITypeRegistrationsProvider l, IConfigurationSource cs) in e:\Builds\EntLib\Latest\Source\Blocks\Common\Src\Configuration\ContainerModel\TypeRegistrationsProvider.cs:128
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.<>c__DisplayClass5.<GetRegistrationsInternal>b__4(ITypeRegistrationsProvider l) in e:\Builds\EntLib\Latest\Source\Blocks\Common\Src\Configuration\ContainerModel\TypeRegistrationsProvider.cs:147
System.Linq.<SelectManyIterator>d__14`2.MoveNext() +205
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.Unity.UnityContainerConfigurator.RegisterAllCore(IConfigurationSource configurationSource, ITypeRegistrationsProvider rootProvider) in e:\Builds\EntLib\Latest\Source\Blocks\Common\Src\Configuration\ContainerModel\Unity\UnityContainerConfigurator.cs:61
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.ChangeTrackingContainerConfigurator.RegisterAll(IConfigurationSource configurationSource, ITypeRegistrationsProvider rootProvider) in e:\Builds\EntLib\Latest\Source\Blocks\Common\Src\Configuration\ContainerModel\ChangeTrackingContainerConfigurator.cs:66
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.EnterpriseLibraryContainer.ConfigureContainer(ITypeRegistrationsProvider locator, IContainerConfigurator configurator, IConfigurationSource configSource) in e:\Builds\EntLib\Latest\Source\Blocks\Common\Src\Configuration\EnterpriseLibraryContainer.cs:83
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.EnterpriseLibraryContainer.ConfigureContainer(IContainerConfigurator configurator, IConfigurationSource configSource) in e:\Builds\EntLib\Latest\Source\Blocks\Common\Src\Configuration\EnterpriseLibraryContainer.cs:62
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.EnterpriseLibraryContainer.CreateDefaultContainer(IConfigurationSource configurationSource) in e:\Builds\EntLib\Latest\Source\Blocks\Common\Src\Configuration\EnterpriseLibraryContainer.cs:122
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.EnterpriseLibraryContainer.SetCurrentContainerIfNotSet() in e:\Builds\EntLib\Latest\Source\Blocks\Common\Src\Configuration\EnterpriseLibraryContainer.cs:93
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.EnterpriseLibraryContainer.get_Current() in e:\Builds\EntLib\Latest\Source\Blocks\Common\Src\Configuration\EnterpriseLibraryContainer.cs:36
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicy.GetExceptionPolicy(Exception exception, String policyName) in e:\Builds\EntLib\Latest\Source\Blocks\ExceptionHandling\Src\ExceptionHandling\ExceptionPolicy.cs:120

[ExceptionHandlingException: Could not load file or assembly 'Devart.Data.Oracle, Version=6.80.350.0, Culture=neutral, PublicKeyToken=09af7300eec23701' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicy.GetExceptionPolicy(Exception exception, String policyName) in e:\Builds\EntLib\Latest\Source\Blocks\ExceptionHandling\Src\ExceptionHandling\ExceptionPolicy.cs:144
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicy.HandleException(Exception exceptionToHandle, String policyName) in e:\Builds\EntLib\Latest\Source\Blocks\ExceptionHandling\Src\ExceptionHandling\ExceptionPolicy.cs:55
FirstEnergy.Compliance.RAAD.WebUI.Global_asax.Session_Start(Object sender, EventArgs e) in C:\Users\44781\Documents\Visual Studio 2008\Projects\RAAD\Source\RAAD\RAAD UI\Global.asax.vb:28
System.Web.SessionState.SessionStateModule.RaiseOnStart(EventArgs e) +8796164
System.Web.SessionState.SessionStateModule.CompleteAcquireState() +237
System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +504
System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +66
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

Pinturiccio
Devart Team
Posts: 2192
Joined: Wed 02 Nov 2011 09:44

Re: Could not load file or assembly Devart.Data.Oracle,

Post by Pinturiccio » Mon 27 Aug 2012 11:19

If I'm not mistaken, you are using a ASP.NET Web Site. When you add references to your project from the folder of your website, if the same assemblies are present in the GAC, then the reference refers the assembly from the GAC. You can see it for yourself if you open the Property Pages of your project. This is a ASP.NET Web Site operation peculiarity.

Thus, when you deploy your website, it looks for the specified assemblies in the GAC and can't find them. This issue can be solved by placing the required assemblies into the Bin folder of your website.

frannizzo
Posts: 3
Joined: Mon 20 Aug 2012 18:16

Re: Could not load file or assembly Devart.Data.Oracle,

Post by frannizzo » Mon 27 Aug 2012 15:01

Thank you. It turns out that in my web.config file, I had an older version referenced. I've upgraded to a newer version (Version=6.80.350.0), but I'm still having issues with this new version. I've also have a console application that is throwing this error ever since I've upgraded to the new version.

ORA-12704: character set mismatch.

I'm able to reproduce this error locally. This is happening on a linq query that includes many objects. I determine the object that this error was occurring on but this wasn't an issue before. Any ideas?

Shalex
Site Admin
Posts: 8241
Joined: Thu 14 Aug 2008 12:44

Re: Could not load file or assembly Devart.Data.Oracle,

Post by Shalex » Fri 31 Aug 2012 16:30

frannizzo wrote:ORA-12704: character set mismatch.
This is happening on a linq query that includes many objects.
Are you using Entity Framework or LinqConnect?
If it is Entity Framework, please try the following code before the first usage of the context (setting will be active during all life of the application):

Code: Select all

        var config = Devart.Data.Oracle.Entity.Configuration.OracleEntityProviderConfig.Instance;
        config.CodeFirstOptions.UseNonUnicodeStrings = true;
If this doesn't help, send us a small test project with the corresponding DDL/DML script to reproduce the issue in our environment.

Post Reply