EXCEPTION (System.Data.ProviderIncompatibleException) with EF5

EXCEPTION (System.Data.ProviderIncompatibleException) with EF5

Postby TheBeat » Thu 25 Jul 2013 16:41

After migrating to EF5, some users are facing the following error when accessing to any DBContext of our solution:

Code: Select all
System.Data.ProviderIncompatibleException: System.Data.ProviderIncompatibleException: The provider did not return a ProviderManifest instance. ---> System.TypeInitializationException: The type initializer for 'Devart.Data.Oracle.Entity.Configuration.OracleEntityProviderConfig' threw an exception. ---> System.ArgumentException: Token 0x02000001 resolves to the special module type representing this module.Parameter name: metadataToken.


Surprisingly, I am not facing this problems so the edmx files are the same, the dotConnect installed is the same (dcoracle77226pro.exe) and the configuration files/connection strings are the same.

Our customers upgrade dotConnect from previous versions facing sometimes this error:

http://forums.devart.com/viewtopic.php?f=1&t=21060

We solved deleting manually some empty dirs from GAC_MSIL as recommended.

Before arriving to that conclusion, I delete all Devart references, including Devart policies. That last step was not done with these troubled users relying on the Installer.

Have you ever faced this error before with an upgrade EF4-->EF5; FW4-->FW4.5? (I've found something in the forum with older versions)

I've read the documentation of the new release (http://forums.devart.com/viewtopic.php?f=1&t=27556&p=93420&hilit=Token#p93420) Is this description somehow related?...
Code: Select all
Entity Framework support
The config.Workarounds.UseInvariantProviderManifestToken configuration option (default value is False) is added to provide the possibility of returning the invariant string literal as the provider manifest token

Tomorrow I'll try deleting potentially harming old version Devart policies but any suggestion or best practice is welcome.
TheBeat
 
Posts: 7
Joined: Fri 29 Jun 2012 13:44

Re: EXCEPTION (System.Data.ProviderIncompatibleException) with EF5

Postby Shalex » Tue 30 Jul 2013 09:54

TheBeat wrote:I am not facing this problems so the edmx files are the same, the dotConnect installed is the same (dcoracle77226pro.exe) and the configuration files/connection strings are the same.

1. The target .NET Framework of both (working and failing) applications is 4.5, isn't it?
2. Make sure (via Visual Studio's Debug > Windows > Modules) that the same versions of Devart.* assemblies and EntityFramework.dll are loaded in the process of the application in both cases.
3. Does the problem persist with the latest (7.8.287) build of dotConnect for Oracle?
4. If possible, localize the issue and send us a small test project to reproduce the issue in our environments.
Shalex
Devart Team
 
Posts: 7660
Joined: Thu 14 Aug 2008 12:44

Re: EXCEPTION (System.Data.ProviderIncompatibleException) with EF5

Postby TheBeat » Tue 30 Jul 2013 11:30

Thank you Shalex for your answer,

1.- Yes, Framework 4.5.
2.- Same version.
3.- We tried with versions 7.7.226 and 7.7.276. Visual Studio 2012 Update 2.
4.- Trying to localice the issue.

I also have another different thing in my machine, I installed ODAC in my machine but the guys that are facing problems did not.

do you know if this could be a factor?
TheBeat
 
Posts: 7
Joined: Fri 29 Jun 2012 13:44

Re: EXCEPTION (System.Data.ProviderIncompatibleException) with EF5

Postby TheBeat » Tue 30 Jul 2013 12:31

Just in case anyone else have the same issue:

It seems to be a Telerik JustMock issue, disabling the profiler it works:

http://www.telerik.com/community/forums/justmock/general-discussions/after-installing-justmock-i-get-token-0x02000001-metadatatoken.aspx
TheBeat
 
Posts: 7
Joined: Fri 29 Jun 2012 13:44


Return to dotConnect for Oracle