ORMGeneralOperationException generated when initializing the DbProviderFactory

Posts   
 
    
Posts: 77
Joined: 05-May-2005
# Posted on: 19-Mar-2021 23:22:44   

Everything was working fine when I was working with a 64bit app on a 64bit machine; I've been developing this app for over a year. As of yesterday, I was forced to produce a 32bit app because I must integrate a legacy DLL for which there is no 64bit version. And that is where the horror started. Here's what I have going on at the test machine:

  1. OS is Windows Server 2016
  2. Application built as x86
  3. ORMSupportClasses and DQE.OracleODPNet built with the app which picks them up from the LLBLGen 5.5.4 install directory
  4. Database is Oracle 12c
  5. Client is Oracle 12c 32bit
  6. I can connect to the database just fine from the server using SQL Developer that was installed with the client.

Here is the stack trace that I found in the event viewer: Application: ConfigurationManager.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: SD.LLBLGen.Pro.ORMSupportClasses.ORMGeneralOperationException at SD.LLBLGen.Pro.ORMSupportClasses.DbProviderFactoryInfo.get_FactoryToUse() at SD.LLBLGen.Pro.ORMSupportClasses.DbProviderFactoryInfo.InitializeSpecificDbTypeCache() at SD.LLBLGen.Pro.DQE.Oracle.OracleSpecificCreator.SetDbProviderFactoryParameterData(System.Collections.Generic.List1<SD.LLBLGen.Pro.ORMSupportClasses.ValuePair2<System.String,System.String>>, System.String) at SD.LLBLGen.Pro.DQE.Oracle.DynamicQueryEngine..cctor()

Exception Info: System.TypeInitializationException at SD.LLBLGen.Pro.DQE.Oracle.DynamicQueryEngine..ctor() at base_namespace.LLBLGen.Oracle.DataAccessAdapter.get_QueryEngine() at base_namespace.LLBLGen.Oracle.DataAccessAdapter.GetConnectionString(base_namespace.Common.DataTypes.SystemConfiguration) at base_namespace.LLBLGen.Oracle.DbAdapter..ctor() at base_namespace.LLBLGen.Oracle.DbAdapter.GetLocalAdapter(base_namespace.LLBLGen.Oracle.DbAdapter ByRef) at base_namespace.Business.DataTypes.BusinessDataBucket.LogError(System.Exception, System.Object, base_namespace.LLBLGen.Oracle.DbAdapter, System.Reflection.Assembly, Int32, System.String) at base_namespace.Business.DataTypes.BusinessDataBucket.CurrentDomainUnhandledException(System.Object, System.UnhandledExceptionEventArgs)

Any help would be greatly appreciated.

Posts: 77
Joined: 05-May-2005
# Posted on: 19-Mar-2021 23:55:30   

Continued researching and have this application working using ODP.net managed client.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 20-Mar-2021 09:33:29   

.NET has two machine.config files, one for 64bit and one for 32bit. It might very well be the oracle installer installed the 64bit version and not the 32bit version. Also, for quite some time the oracle installer doesn't install the factory anymore during the installation process, not sure if the installer you used does that, but in any case, here are the steps to do so: https://www.llblgen.com/Documentation/5.8/Designer/Databases/oracleodpnet.htm#registering-odp.net-in-the-gac-and-machine.config

The 32bit machine config file is at C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config and the 64bit one is at: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config

Frans Bouma | Lead developer LLBLGen Pro