The type initializer for 'Devart.Data.Oracle.Entity.w' threw an exception.

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
MichaelJLee
Posts: 3
Joined: Thu 13 Apr 2017 16:31

The type initializer for 'Devart.Data.Oracle.Entity.w' threw an exception.

Post by MichaelJLee » Thu 13 Apr 2017 16:41

I'm receiving this error:

The type initializer for 'Devart.Data.Oracle.Entity.w' threw an exception.

Any help in resolving this error would be much appreciated.

We have many environments (dev,qa,stage,prod). Trying to duplicate our prod environment into a qa environment and having a heck of a time getting it up and running.

Devart.Data (5.0.357.0)
Devart.Data.Oracle (6.60.258.0)
Devart.Data.Oracle.Entity (6.60.258.0)

Cannot upgrade to the latest dll's because PROD is up and running and we have to duplicate PROD.

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

Re: The type initializer for 'Devart.Data.Oracle.Entity.w' threw an exception.

Post by Shalex » Fri 14 Apr 2017 13:13

Please give us the following information:

1) the full stack trace of the error with all inner exceptions

2) are you working with EF1 or EF4?

3) describe your PROD environment:
a) .NET Framework version installed ( https://msdn.microsoft.com/en-us/librar ... .110).aspx )
b) version and capacity (x86 or x64) of your Windows
c) platform target (x86/x64/any cpu) and target framework of your project

4) describe your QA environment:
a) .NET Framework version installed ( https://msdn.microsoft.com/en-us/librar ... .110).aspx )
b) version and capacity (x86 or x64) of your Windows
c) platform target (x86/x64/any cpu) and target framework of your project

5) localize the issue and send us a small test project with the corresponding DDL/DML script for reproducing

MichaelJLee
Posts: 3
Joined: Thu 13 Apr 2017 16:31

Re: The type initializer for 'Devart.Data.Oracle.Entity.w' threw an exception.

Post by MichaelJLee » Fri 14 Apr 2017 19:15

Here is the answers to your questions:

1) the full stack trace of the error with all inner exceptions

Message: An error occurred while preparing the command definition. See the inner exception for details.
StackTrace: at System.Data.EntityClient.EntityCommandDefinition..ctor(DbProviderFactory storeProviderFactory, DbCommandTree commandTree)
at System.Data.EntityClient.EntityProviderServices.CreateCommandDefinition(DbProviderFactory storeProviderFactory, DbCommandTree commandTree)
at System.Data.EntityClient.EntityProviderServices.CreateDbCommandDefinition(DbProviderManifest providerManifest, DbCommandTree commandTree)
at System.Data.Common.DbProviderServices.CreateCommandDefinition(DbCommandTree commandTree)
at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Prepare(ObjectContext context, DbQueryCommandTree tree, Type elementType, MergeOption mergeOption, Span span, ReadOnlyCollection`1 compiledQueryParameters, AliasGenerator aliasGenerator)
at System.Data.Objects.ELinq.ELinqQueryState.GetExecutionPlan(Nullable`1 forMergeOption)
at System.Data.Objects.ObjectQuery.ToTraceString()
at DaVita.Falcon.WindowsServices.VaultSync.VaultSyncService.GetVaultData()
InnerExceptionMessage: The type initializer for 'Devart.Data.Oracle.Entity.w' threw an exception.
StackTrace: at Devart.Data.Oracle.Entity.ad.b()
at Devart.Common.Entity.cm..ctor(eo A_0)
at Devart.Data.Oracle.Entity.a4.a(r A_0, DbCommandBase A_1)
at Devart.Common.Entity.dq.c()
at Devart.Data.Oracle.Entity.OracleEntityProviderServices.a(a5 A_0, DbCommandTree A_1)
at Devart.Data.Oracle.Entity.OracleEntityProviderServices.CreateDbCommandDefinition(DbProviderManifest baseProviderManifest, DbCommandTree commandTree)
at System.Data.Common.DbProviderServices.CreateCommandDefinition(DbCommandTree commandTree)
at System.Data.EntityClient.EntityCommandDefinition..ctor(DbProviderFactory storeProviderFactory, DbCommandTree commandTree)

Message: An error occurred while updating the entries. See the inner exception for details.
StackTrace: at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)
at System.Data.EntityClient.EntityAdapter.Update(IEntityStateManager entityCache)
at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options)
at DaVita.Falcon.VaultSync.Common.Helper.LogErrorsToDB(Exception ex, Boolean bSendEmail, Boolean bIsError, FACILITY_INFO facility)
InnerExceptionMessage: An error occurred while preparing the command definition. See the inner exception for details.
StackTrace: at System.Data.Mapping.Update.Internal.UpdateTranslator.CreateCommand(DbModificationCommandTree commandTree)
at System.Data.Mapping.Update.Internal.DynamicUpdateCommand.CreateCommand(UpdateTranslator translator, Dictionary`2 identifierValues)
at System.Data.Mapping.Update.Internal.DynamicUpdateCommand.Execute(UpdateTranslator translator, EntityConnection connection, Dictionary`2 identifierValues, List`1 generatedValues)
at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)

2) are you working with EF1 or EF4?

I believe we are working with EF4 based on the version of .NET

3) describe your PROD environment:
a) .NET Framework version installed ( https://msdn.microsoft.com/en-us/librar ... .110).aspx )

4.5.2

b) version and capacity (x86 or x64) of your Windows

Windows Server 2008 R2 Standard x64

c) platform target (x86/x64/any cpu) and target framework of your project

x86

4) describe your QA environment:
a) .NET Framework version installed ( https://msdn.microsoft.com/en-us/librar ... .110).aspx )

4.5.1

b) version and capacity (x86 or x64) of your Windows

Windows Server 2008 R2 Standard x64

c) platform target (x86/x64/any cpu) and target framework of your project

x86

5) localize the issue and send us a small test project with the corresponding DDL/DML script for reproducing

For security reasons I cannot send the source code ... However, I have written several poc apps on my development machine and have been unable to reproduce this error. This specific error is unique to our QA server.

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

Re: The type initializer for 'Devart.Data.Oracle.Entity.w' threw an exception.

Post by Shalex » Mon 17 Apr 2017 14:17

MichaelJLee wrote:InnerExceptionMessage: The type initializer for 'Devart.Data.Oracle.Entity.w' threw an exception.
1. Is there a text of the exception itself (and its type)?
MichaelJLee wrote:2) are you working with EF1 or EF4?

I believe we are working with EF4 based on the version of .NET
2.1. Please set a break point in your code in the PROD environment, run it in the debug mode, navigate to Debug > Windows > Modules and specify full paths of ALL loaded Devart.Data.dll, Devart.Data.Oracle.dll, Devart.Data.Oracle.Entity.dll.

2.2. Please set a break point in your code in the QA environment, run it in the debug mode, navigate to Debug > Windows > Modules and specify full paths of ALL loaded Devart.Data.dll, Devart.Data.Oracle.dll, Devart.Data.Oracle.Entity.dll.

3. c) specify target framework of your project in the PROD environment

4. c) specify target framework of your project in the QA environment

MichaelJLee
Posts: 3
Joined: Thu 13 Apr 2017 16:31

Re: The type initializer for 'Devart.Data.Oracle.Entity.w' threw an exception.

Post by MichaelJLee » Tue 25 Apr 2017 20:33

Shalex

Thank you very much for your guidance and support.

Using the debug output from PROD and QA we were able to find the mismatched dll's.

Once we loaded the same version of the DLL's, everything worked correctly.

Thanks again.

Post Reply