Oracle XE and LLBLGen Pro 3.1

Posts   
 
    
kcd
User
Posts: 5
Joined: 23-Feb-2011
# Posted on: 23-Feb-2011 10:54:00   

I've been using LLBLGen 2.0 with Oracle XE and .NET framework 2.0 for several years and I am considering upgrading to version 3.1. Downloaded and installed trial of version 3.1 but I haven't been able to get it working with Oracle XE (ODP.NET selected, returns "Unable to find the requested .Net Framework Data Provider. It may not be installed."). I've added following lines to LLBLGenPro.exe.config:

<runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89B483F429C47342"/> <bindingRedirect oldVersion="10.1.0.000-10.2.0.100" newVersion="10.2.0.100"/> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89B483F429C47342"/> <bindingRedirect oldVersion="2.102.2.20" newVersion="10.2.0.100"/> </dependentAssembly> </assemblyBinding> </runtime>

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

Also tried to get it working by editing machine.config, also to no avail.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 23-Feb-2011 14:18:44   
kcd
User
Posts: 5
Joined: 23-Feb-2011
# Posted on: 08-Mar-2011 17:32:51   

Thank you for the link. Unfortunately I am bound to the ODP.NET driver that is shipped with Oracle 10g XE - ODP.NET version 10.2.0.100. However, based on the advice from the other thread, I have updated LLBLGenPro.exe.config bindingRedirect directive to "2.102.2.20-2.122.2.20"

<dependentAssembly> <assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89B483F429C47342" /> <bindingRedirect oldVersion="10.1.0.000-10.2.0.100" newVersion="10.2.0.100" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89B483F429C47342" /> <bindingRedirect oldVersion="2.102.2.20-2.122.2.20" newVersion="10.2.0.100" /></dependentAssembly>

It still does not work. Any hope that some other bindingRedirect would work or version 10.2.0.100 of ODP.NET driver is just obsolete?

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 08-Mar-2011 22:17:16   

When you say "it does not work", what is the exact issue you are getting, and when ?

Matt

kcd
User
Posts: 5
Joined: 23-Feb-2011
# Posted on: 09-Mar-2011 10:00:59   

Sorry for not suppling enough information about the error.

At "Relational Model Data Retrieval Wizard" ODP.NET was selected as "Database driver". Connection parameters were entered, "Test connection" button clicked and thereafter following error message has been displayed:

Exception message:

Exception type: ConfigurationErrorsException Failed to find or load the registered .Net Framework Data Provider.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 09-Mar-2011 10:28:50   

Are you running a 64-bit Windows?

kcd
User
Posts: 5
Joined: 23-Feb-2011
# Posted on: 09-Mar-2011 10:30:40   

No, 32-bit Windows 7, .NET Framework 2.0.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 10-Mar-2011 05:24:40   

Could you please double check that you have the ODP.Net installed in the GAC, and double check the installed build version. Also please show us the version you had registered in the machine.config.

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39908
Joined: 17-Aug-2003
# Posted on: 10-Mar-2011 10:49:20   

v3 uses DbProviderFactory, so it will ask .NET for the ado.net provider factory for a given ado.net provider, and this means machine.config of .NET has to have a definition of it. For ODP.NET, it will ask for the invariant name: Oracle.DataAccess.Client

If you don't have that name in machine.config, you have to add the definition manually, e.g. in the llblgenpro.exe.config file and also your application's .config file. See the llblgenpro.exe.config file for an example of it, as it contains 2 definitions of what you have to add already, namely one for firebird and one for mysql.

Sorry for this problem, ODP.NET should install this for you.

Frans Bouma | Lead developer LLBLGen Pro
kcd
User
Posts: 5
Joined: 23-Feb-2011
# Posted on: 10-Mar-2011 11:35:04   

Thank you for the explanation. Machine.config does not contain appropriate DbProviderFactory, Oracle XE does not insert it into Machine.config. Hence I have edited LLBLGenPro.exe.config, here are some "interesting" parts of it:

<runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <!-- separate assembly paths. These are hints to help fusion when it gets confused. --> <probing privatePath="SqlServerUDTAssemblies;Drivers\Oracle; Drivers\SqlServer;Drivers\Firebird;Drivers\OracleODPNET;Drivers\Access;Drivers\DB2; Drivers\OracleMSOracle;Drivers\SybaseAse;Drivers\SybaseAsa; Drivers\MySql;Drivers\PostgreSql;TaskPerformers;ReferencedAssemblies; Plugins;TypeConverters" />

 <dependentAssembly>
  <assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89B483F429C47342" />
  <bindingRedirect oldVersion="10.1.0.000-10.2.0.100" newVersion="10.2.0.100" />
</dependentAssembly>
<dependentAssembly>
  <assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89B483F429C47342" />
  <bindingRedirect oldVersion="2.102.2.20-2.112.6.20" newVersion="10.2.0.100" />
</dependentAssembly>

</assemblyBinding> </runtime>

<system.data> <DbProviderFactories> <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=10.2.0.100, Culture=neutral, PublicKeyToken=89b483f429c47342" /> <!-- Firebird --> <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.1.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=2.0.4.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" /> </DbProviderFactories> </system.data>

GAC contains entry:

Assembly name = Oracle.DataAccess Version = 10.2.0.100 Public key token = 89b483f429c47342

It still returns the same message:

Exception message:

Exception type: ConfigurationErrorsException Failed to find or load the registered .Net Framework Data Provider.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 10-Mar-2011 12:16:37   

Could you please re-install ODP.NET?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39908
Joined: 17-Aug-2003
# Posted on: 13-Mar-2011 14:40:33   

The version 'Version=10.2.0.100' you specified isn't correct. Please right-click the oracle.dataaccess.dll in windows explorer and select 'properties', then go to 'version' tab. This will likely show you something like 2.11.0.x

Sorry for this problem, Oracle's ODP.NET client should install this properly.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39908
Joined: 17-Aug-2003
# Posted on: 18-Mar-2011 09:41:56   

Please see: http://forums.oracle.com/forums/thread.jspa?threadID=2190828

The .net 4 ODP.NET which is installed with the installer is 32bit, if you need the 64bit version, you need to download a different bundle. See the thread above.

Frans Bouma | Lead developer LLBLGen Pro