llblgen 5.3.1 with Oracle ODP.Net

Posts   
 
    
fokshall
User
Posts: 4
Joined: 14-Nov-2017
# Posted on: 05-Mar-2018 21:16:56   

I have been using llblgen 3 for years now and we just recently got new workstations WIN10 and are upgrading to llblgen Pro5 and having some issues. I added

<add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />

to machine.config files in C:\Windows\Microsoft.NET\Framework\v2.0.50727 C:\Windows\Microsoft.NET\Framework\v4.0.30319

and also to LLBLGenPro_x86.exe.config and still get the error below. Please let me know if I'm missing something else. Below are the steps I take to get error.

I created a project and selected LLBLGen Pro Runtime Framework as the target I right clicked on the Relational Model Data and selected "Add Relational Data Model from a Database" Selected Oracle Driver (ODP.Net) and get the error below.

Unable to find the requested .Net Framework Data Provider. It may not be installed.

Stack Trace

LLBLGen Pro version 5.3. Build 5.3.1 -----[Core exception]-------------------- at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) at SD.LLBLGen.Pro.DBDriverCore.DBDriverBase.GetDbProviderFactory() at SD.LLBLGen.Pro.DBDriverCore.ConnectionDataBase.get_FactoryName() at SD.LLBLGen.Pro.Gui.Controls.WizardPages.MetaDataRetrievalWizard_Step_ConnectionData.<LoadDriverAndConnectionControl>b__16_1() at SD.LLBLGen.Pro.Gui.Classes.ApplicationIdleDispatcher.PerformWork() at SD.LLBLGen.Pro.Gui.Classes.ApplicationIdleDispatcherSingleton.Application_Idle(Object sender, EventArgs e) at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.RunDialog(Form form) at System.Windows.Forms.Form.ShowDialog(IWin32Window owner) at DevExpress.XtraEditors.XtraForm.ShowDialog(IWin32Window owner) at SD.LLBLGen.Pro.Gui.Classes.GuiController.PerformAddMetaDataFromDatabaseAction() at SD.LLBLGen.Pro.Gui.Controls.CatalogExplorer.<>c.<BuildActionPerBarItemCache>b__90_0() at SD.LLBLGen.Pro.Gui.Controls.CatalogExplorer._mainBarManager_ItemClick(Object sender, ItemClickEventArgs e) at DevExpress.XtraBars.BarManager.RaiseItemClick(ItemClickEventArgs e) at DevExpress.XtraBars.BarItem.OnClick(BarItemLink link) at DevExpress.XtraBars.BarButtonItem.OnClick(BarItemLink link) at DevExpress.XtraBars.BarItemLink.OnLinkClick() at DevExpress.XtraBars.BarButtonItemLink.OnLinkClick() at DevExpress.XtraBars.BarItemLink.OnLinkAction(BarLinkAction action, Object actionArgs) at DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(BarLinkAction action, Object actionArgs) at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.ClickLink(BarItemLink link) at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link) at DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseUp(MouseEventArgs e) at DevExpress.XtraBars.Controls.CustomPopupBarControl.OnMouseUp(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at DevExpress.XtraBars.Controls.CustomControl.WndProc(Message& msg) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 05-Mar-2018 22:01:29   

Are you using the "LLBLGenPro_x86.exe" or the "LLBLGenPro.exe", right?

fokshall
User
Posts: 4
Joined: 14-Nov-2017
# Posted on: 05-Mar-2018 23:41:17   

Yes, I'm using LLBLGenPro_x86.exe

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 06-Mar-2018 08:05:00   

This is an obvious question, but as you didn't mention it...: ¿Did you already install ODP.NET on that machine?

David Elizondo | LLBLGen Support Team
fokshall
User
Posts: 4
Joined: 14-Nov-2017
# Posted on: 06-Mar-2018 17:38:12   

Yes, sorry for not mentioning it, I have been able to run VS2017 projects previously created that are using the same version of ODP.Net and connect to the database and retrieve data.

Attachments
Filename File size Added on Approval
ODP.Net.PNG 15,938 06-Mar-2018 17:39.21 Approved
Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 06-Mar-2018 18:40:10   

The screenshot might not prove anything. Could you please try re-installing the ODP.NET on your machine?

fokshall
User
Posts: 4
Joined: 14-Nov-2017
# Posted on: 07-Mar-2018 00:56:21   

We reinstalled ODP.Net on my machine. We downloaded the exe version from http://download.oracle.com/otn/other/ole-oo4o/ODTforVS2017_122010.exe and then we tried XCOPY the 32-bit ODAC Runtime and we still keep getting the same error, anything else you can think of that you want us to try?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 07-Mar-2018 10:29:20   

Why are you using 32bit if I may ask? I do recall ODPNET is only 64 bit nowadays. Using 64bit should work out of the box as the ODPNET installer adds itself to the 64bit machine.config file and also adds the managed provider, which is preferable over the big ODPNET cli version (which wraps the java CLI)

Frans Bouma | Lead developer LLBLGen Pro
ej
User
Posts: 15
Joined: 07-Mar-2018
# Posted on: 07-Mar-2018 20:22:55   

Hi,

I work with fokshall and we've figured it out.

The C:\oracle\product\12.2.0\client_1\odp.net\bin\4\Oracle.DataAccess.dll was not in the GAC under _C:\Windows\Microsoft.NET\assembly\GAC_32\Oracle.DataAccess _ We've performed the following in order:

  • Open “Developer Command Prompt for VS 2017” in administrator mode (search for the app in the “Search Windows” taskbar)
  • Change Directory to C:\oracle\product\12.2.0\client_1\odp.net\bin\4
  • Type the text gacutil –i Oracle.DataAccess.dll then press EnterThe path _C:\Windows\Microsoft.NET\assembly\GAC_32\Oracle.DataAccess_ now exists.

Also, we had to modify C:\Program Files (x86)\Solutions Design\LLBLGen Pro v5.3\LLBLGenPro_x86.exe.config by adding the entry Oracle.DataAccess.Client (and remove this same entry from the machine.config):

<system.data>
        <DbProviderFactories>
            <!-- The definitions below are examples. It's likely you have to adjust the version numbers to the version the dll you're using. -->
            <!-- Firebird. Uncomment the following line if you're using a Firebird Sql client version 2.x. If you're using v3.x or higher and have run the installer, leave this line commented out, otherwise uncomment the line below and place the Firebird client DLL in the installation folder of the designer.-->
            <!--<add name="Firebird Client Data Provider" invariant="FirebirdSql.Data.FirebirdClient" description=".Net Framework Data Provider for Firebird" type="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient, Version=2.7.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c"/>-->
            <!-- PostgreSql -->
            <!--<add name="PostgreSql Client Data Provider" invariant="Npgsql" description=".Net Framework Data Provider for PostgreSql" type="Npgsql.NpgsqlFactory, Npgsql, Version=3.0.2.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/>-->
            <add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
        </DbProviderFactories>
    </system.data>

I'm just curious, can we use LLBLGen 5.3 Designer by placing the Oracle.DataAccess.dll in a directory somewhere in C:\Program Files (x86)\Solutions Design\LLBLGen Pro v5.3 (similar to how .net apps have the "bin" directory where DLLs in this directory do not have to be in the GAC) or does the Oracle.DataAccess.dll require a GAC registration in order to use LLBLGen 5.3 Designer?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 08-Mar-2018 11:14:53   

ej wrote:

Hi,

I work with fokshall and we've figured it out.

The C:\oracle\product\12.2.0\client_1\odp.net\bin\4\Oracle.DataAccess.dll was not in the GAC under _C:\Windows\Microsoft.NET\assembly\GAC_32\Oracle.DataAccess _ We've performed the following in order:

  • Open “Developer Command Prompt for VS 2017” in administrator mode (search for the app in the “Search Windows” taskbar)
  • Change Directory to C:\oracle\product\12.2.0\client_1\odp.net\bin\4
  • Type the text gacutil –i Oracle.DataAccess.dll then press EnterThe path _C:\Windows\Microsoft.NET\assembly\GAC_32\Oracle.DataAccess_ now exists.

If it's not in the GAC then a registration in machine.config indeed won't work in general. But still curious why you're using 32bit, you should use 64bit and also preferably the managed provider which comes with 12.2 ODAC. 32bit is discontinued by Oracle.

Also, we had to modify C:\Program Files (x86)\Solutions Design\LLBLGen Pro v5.3\LLBLGenPro_x86.exe.config by adding the entry Oracle.DataAccess.Client (and remove this same entry from the machine.config):

<system.data>
        <DbProviderFactories>
            <!-- The definitions below are examples. It's likely you have to adjust the version numbers to the version the dll you're using. -->
            <!-- Firebird. Uncomment the following line if you're using a Firebird Sql client version 2.x. If you're using v3.x or higher and have run the installer, leave this line commented out, otherwise uncomment the line below and place the Firebird client DLL in the installation folder of the designer.-->
            <!--<add name="Firebird Client Data Provider" invariant="FirebirdSql.Data.FirebirdClient" description=".Net Framework Data Provider for Firebird" type="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient, Version=2.7.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c"/>-->
            <!-- PostgreSql -->
            <!--<add name="PostgreSql Client Data Provider" invariant="Npgsql" description=".Net Framework Data Provider for PostgreSql" type="Npgsql.NpgsqlFactory, Npgsql, Version=3.0.2.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/>-->
            <add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
        </DbProviderFactories>
    </system.data>

Only if you don't add a line to machine.config.

I'm just curious, can we use LLBLGen 5.3 Designer by placing the Oracle.DataAccess.dll in a directory somewhere in C:\Program Files (x86)\Solutions Design\LLBLGen Pro v5.3 (similar to how .net apps have the "bin" directory where DLLs in this directory do not have to be in the GAC) or does the Oracle.DataAccess.dll require a GAC registration in order to use LLBLGen 5.3 Designer?

That's not going to work as that dll is just a wrapper around the Oracle CLI, so it might load it but I wouldn't be surprised if the dll wants to load dlls / other data which is expects close by (e.g. same folder) but now can't load things.

So to recap, you really shouldn't do this, please use 64bit and the managed provider, just install the 64 bit ODAC components and ignore 32bit. It's not worth the trouble.

Frans Bouma | Lead developer LLBLGen Pro