Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi Prism/Database/DBX ASP.NET Provider    [ Add a report in this area ]  
Report #:  93872   Status: Open
Borland.Data.EClassRegistryError on IIS7.5(64bit)
Project:  Embarcadero Prism Build #:  IBXE 10.0.2.474
Version:    14.1 Submitted By:   Marian Munteanu
Report Type:  Suggestion / Enhancement Request Date Reported:  5/13/2011 9:57:43 AM
Severity:    Serious / Highly visible problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All versions Internal Tracking #:   283354
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
Microsoft Server 2008 R2 SP1 64
IIS 7.5 framework 4.0
Interbase XE 64 and/or 32 (both version tested)
ADO.NET 2.0
Delphi Prism XE
------------------------------
Any app/website that use ADO.NET 2.0 drivers and run under App Pool 32-bit enabled, trigger error 503 and stop app pool, even compiled with AnyCPU.

Any app/website that use ADO.NET 2.0 drivers and run under App Pool Enable 32-bit=False
trigger this error :
Borland.Data.EClassRegistryError: Borland.Data.TDBXDynalinkDriverLoader class cannot be found in Borland.Data.DbxInterBaseDriver, Version=15.0.0.0, Culture=neutral, PublicKeyToken=91d62ebb5b0d1b1b



Steps to Reproduce:
Open Delphi Prism XE ... New /Website ... choose ASP.NET website.
In Default.aspx design page add on to content an GridView and populate him with an SQLConnection InterBase database(DbxInterBaseDriver) Select/Procedure of your choice.
Run this website from the IIS 64 bits version (not from the ASP.NET Development Server ... this is for debugging purposes)
Workarounds
Added by Sysop
<<<<<<<<<<
1. turn on 'Enable 32-Bit Applications' for a application pool selected for a web site on IIS7.5(64bit).
2. copy 'dbxint.dll' and 'dbxadapter.dll' to SysWOW64 folder
3. restart web site

Note:
dbExpress Data Provider for .NET contains 32bit unmanaged DLLs, because dbExpress is based on Delphi for Win32 platform.
>>>>>>>>>>
Attachment
test1001.zip
Comments

Tomohiro Takahashi at 5/14/2011 7:25:48 AM -
Could you provide more detailed [Steps] and attach sample project to reproduce your issue?

Marian Munteanu at 5/18/2011 12:13:17 PM -
Server Error in '/webtique' Application.
--------------------------------------------------------------------------------

Borland.Data.TDBXDynalinkDriverLoader class cannot be found in Borland.Data.DbxInterBaseDriver, Version=15.0.0.0, Culture=neutral, PublicKeyToken=91d62ebb5b0d1b1b
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Borland.Data.EClassRegistryError: Borland.Data.TDBXDynalinkDriverLoader class cannot be found in Borland.Data.DbxInterBaseDriver, Version=15.0.0.0, Culture=neutral, PublicKeyToken=91d62ebb5b0d1b1b

Source Error:


Line 73:      connectionString:= ConfigurationManager.ConnectionStrings['webtique'].ConnectionString;
Line 74:      dataProviderName:=ConfigurationManager.ConnectionStrings['webtique'].ProviderName;
Line 75:     factory:= DbProviderFactories.GetFactory(dataProviderName);    
Line 76:     conn:= factory.CreateConnection();    
Line 77:   //conn:= new TAdoDbxInterBaseConnection(); //recomandare ado driver


Source File: D:\Webtique\App_Code\GenericDataAccess.pas    Line: 75

Stack Trace:


[EClassRegistryError: Borland.Data.TDBXDynalinkDriverLoader class cannot be found in Borland.Data.DbxInterBaseDriver, Version=15.0.0.0, Culture=neutral, PublicKeyToken=91d62ebb5b0d1b1b]
   Borland.Data.TClassRegistry.RegisterRegistryClass(String ClassName, @MetaTClassRegistryObject RegistryClass) +624

[TypeInitializationException: The type initializer for 'Borland.Data.Units.DBXDynalink' threw an exception.]
   System.Runtime.CompilerServices.RuntimeHelpers._RunClassConstructor(RuntimeType type) +0
   System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type) +19
   Borland.Data.Units.DbxInterbase..cctor() +64

[TypeInitializationException: The type initializer for 'Borland.Data.Units.DbxInterbase' threw an exception.]
   System.Runtime.CompilerServices.RuntimeHelpers._RunClassConstructor(RuntimeType type) +0
   System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type) +19
   Borland.Data.Units.AdoDbxInterBaseClientProvider..cctor() +104

[TypeInitializationException: The type initializer for 'Borland.Data.Units.AdoDbxInterBaseClientProvider' threw an exception.]
   System.Runtime.CompilerServices.RuntimeHelpers._RunClassConstructor(RuntimeType type) +0
   System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type) +19
   Borland.Data.TAdoDbxInterBaseProviderFactory..cctor() +26

[TypeInitializationException: The type initializer for 'Borland.Data.TAdoDbxInterBaseProviderFactory' threw an exception.]

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeFieldHandle.GetValue(RtFieldInfo field, Object instance, RuntimeType fieldType, RuntimeType declaringType, Boolean& domainInitialized) +0
   System.Reflection.RtFieldInfo.InternalGetValue(Object obj, Boolean doVisibilityCheck, Boolean doCheckConsistency) +294
   System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow) +315
   System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) +134
   GenericDataAccess.CreateCommand() in D:\Webtique\App_Code\GenericDataAccess.pas:75
   UserControlsAccess.GetMarcaFurList() in D:\Webtique\App_Code\UserControlsAccess.pas:98
   MarcaFurList.Page_Load(Object sender, EventArgs e) in D:\Webtique\MarcaFurList.ascx.pas:34
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.UI.Control.LoadRecursive() +116
   System.Web.UI.Control.LoadRecursive() +206
   System.Web.UI.Control.LoadRecursive() +206
   System.Web.UI.Control.LoadRecursive() +206
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2750




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

Marian Munteanu at 5/18/2011 10:39:51 PM -
You will receive same exception on all app/website created with Delphi Prism using InterBase connections and used in IIS 7.5 on x64 environment.

Tomohiro Takahashi at 5/19/2011 3:49:49 AM -
ok, could you please attach sample project(ASP.NET project?) to verify your issue, including 'machine.config'?

And, does your issue occur on standalone WinForms client application, too?

Marian Munteanu at 5/19/2011 12:59:19 PM -
If you teach me how to attach here I'll do'it.
In the mean time can you tell me what is the true semnification of that exception ?

Tomohiro Takahashi at 5/19/2011 6:09:37 PM -
Please use Windows Native QC client to attach a .zip file.
The standalone client is available at this URL.
http://qc.codegear.com/qualitycentral.zip

Marian Munteanu at 5/21/2011 10:57:14 PM -
Done

Marian Munteanu at 5/19/2011 12:54:51 PM -
I do not tested standalone winforms ... because I'm not interested in this field.

Open Delphi Prism XE ... New /Website ... choose ASP.NET website.
In Default.aspx design page add on to content an GridView and populate him with an SQLConnection InterBase database(DbxInterBaseDriver) Select/Procedure of your choice.
Run this website from the IIS 64 bits version (not from the ASP.NET Development Server ... this is for debugging purposes)

The machine config for framework 4.0 32 bit is the same in Framework64 4.0 and has the specific Interbase driver providers factory declared.

Tomohiro Takahashi at 5/19/2011 9:01:24 PM -
> I do not tested standalone winforms ... because I'm not interested in this field.
If possible, please check whether standalone client application can connect to InterBase via ADO.NET.

Marian Munteanu at 5/21/2011 10:08:57 PM -

Delphi Prism/New WinForms app/
in the Main added GridView connected as you can see

method MainForm.MainForm_Load(sender: System.Object; e: System.EventArgs);
begin
  
// TODO: This line of code loads data into the '_magnum_dammt_com_gds_db75_c__Ugestnir_data_ugestnir_ibDataSet.CLIENTI' table. You can move, or remove it, as needed.
self.CLIENTITableAdapter.Fill(self._magnum_dammt_com_gds_db75_c__Ugestnir_data_ugestnir_ibDataSet.CLIENTI);
end;

raize this :
Unable to load dbxint.dll (ErrorCode 193).  It may be missing from the system path.

I was not digging to solve this ... I don't know what is the system path ... windows/system32 ?

Marian Munteanu at 5/21/2011 11:01:13 PM -
I'll comeback with employee.gdb test ... later and attached

Marian Munteanu at 5/18/2011 10:47:53 PM -
Server Error in '/web1' Application.
--------------------------------------------------------------------------------

Borland.Data.TDBXDynalinkDriverLoader class cannot be found in Borland.Data.DbxInterBaseDriver, Version=15.0.0.0, Culture=neutral, PublicKeyToken=91d62ebb5b0d1b1b
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Borland.Data.EClassRegistryError: Borland.Data.TDBXDynalinkDriverLoader class cannot be found in Borland.Data.DbxInterBaseDriver, Version=15.0.0.0, Culture=neutral, PublicKeyToken=91d62ebb5b0d1b1b

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:


[EClassRegistryError: Borland.Data.TDBXDynalinkDriverLoader class cannot be found in Borland.Data.DbxInterBaseDriver, Version=15.0.0.0, Culture=neutral, PublicKeyToken=91d62ebb5b0d1b1b]
   Borland.Data.TClassRegistry.RegisterRegistryClass(String ClassName, @MetaTClassRegistryObject RegistryClass) +624

[TypeInitializationException: The type initializer for 'Borland.Data.Units.DBXDynalink' threw an exception.]
   System.Runtime.CompilerServices.RuntimeHelpers._RunClassConstructor(RuntimeType type) +0
   System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type) +19
   Borland.Data.Units.DbxInterbase..cctor() +64

[TypeInitializationException: The type initializer for 'Borland.Data.Units.DbxInterbase' threw an exception.]
   System.Runtime.CompilerServices.RuntimeHelpers._RunClassConstructor(RuntimeType type) +0
   System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type) +19
   Borland.Data.Units.AdoDbxInterBaseClientProvider..cctor() +104

[TypeInitializationException: The type initializer for 'Borland.Data.Units.AdoDbxInterBaseClientProvider' threw an exception.]
   System.Runtime.CompilerServices.RuntimeHelpers._RunClassConstructor(RuntimeType type) +0
   System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type) +19
   Borland.Data.TAdoDbxInterBaseProviderFactory..cctor() +26

[TypeInitializationException: The type initializer for 'Borland.Data.TAdoDbxInterBaseProviderFactory' threw an exception.]

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeFieldHandle.GetValue(RtFieldInfo field, Object instance, RuntimeType fieldType, RuntimeType declaringType, Boolean& domainInitialized) +0
   System.Reflection.RtFieldInfo.InternalGetValue(Object obj, Boolean doVisibilityCheck, Boolean doCheckConsistency) +294
   System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow) +315
   System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) +134
   System.Web.UI.WebControls.SqlDataSource.GetDbProviderFactorySecure() +48
   System.Web.UI.WebControls.SqlDataSource.CreateConnection(String connectionString) +14
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +208
   System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) +562
   System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +176
   System.Web.UI.WebControls.BaseDataList.EnsureDataBound() +90
   System.Web.UI.Control.EnsureChildControls() +182
   System.Web.UI.Control.PreRenderRecursiveInternal() +73
   System.Web.UI.Control.PreRenderRecursiveInternal() +256
   System.Web.UI.Control.PreRenderRecursiveInternal() +256
   System.Web.UI.Control.PreRenderRecursiveInternal() +256
   System.Web.UI.Control.PreRenderRecursiveInternal() +256
   System.Web.UI.Control.PreRenderRecursiveInternal() +256
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3888




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

Tomohiro Takahashi at 5/19/2011 9:15:41 PM -
First of all, can you access InterBase server via "Server Explorer" of Visual Studio 2010?

> Microsoft Server 2008 R2 SP1 64
Does your issue occur on only 64bit OS? How about 32bit OSs?

Marian Munteanu at 5/23/2011 8:43:33 AM -
This is my bad english fault.

MY ISSUES OCCUR ONLY IN 64 BIT OS, AND ONLY WHEN I TRY TO USE DBXINTERBASEDRIVER TO CONNECT DATABASE IN ASP.NET WEBSITE.
Interbase server is perfect in x86 OS or x64 OS, perfectly connect a Interbase 32 client with a Interbase 64 server and viceversa.

THE ISSUE is ADO.NET Interbase provider for .Net framework

Tomohiro Takahashi at 5/24/2011 5:30:10 AM -
I confirmed this issue.
So, as a workaround, please try this configuration.
1. turn on 'Enable 32-Bit Applications' for a application pool you select for a web site on IIS7.5(64bit).
2. copy 'dbxint.dll' and 'dbxadapter.dll' to SysWOW64 folder
3. restart web site

Note:
dbExpress Data Provider for .NET contains 32bit unmanaged DLLs, because dbExpress is based on Delphi for Win32 platform.

Marian Munteanu at 9/21/2011 10:55:16 PM -
Ok !
After long long time ... we have a 64 RAD ... can we hope in a ADO.NET 64 bits driver for interbase ?

Marian Munteanu at 5/25/2011 2:26:58 AM -
Thank you for your confirmation ... you are the first one.

I do all your recommandations for long time ago ... but it not solve the problem for me.
If I have a confirmation that the workaround solve the issue for you I'll check for some mistakes from my part.

1. If I make the Enable 32-bit Application=True ... and I start browsing the website ... I receive the 503 error  Unavailable service ... and the app pool is stoped.
Can you give more details abot app pool setting (Integrated or Clasic ... etc ...) ?

2. The .dll's is there (in wow64) since the first install.

Tomohiro Takahashi at 5/25/2011 6:06:01 PM -
> Can you give more details abot app pool setting (Integrated or Clasic ... etc ...) ?
I used 'ASP.NET v4.0 Integrated' for application pool.
And, please make sure 'gds32.dll' is installed in SysWOW64 folder.

Marian Munteanu at 7/2/2011 3:36:29 AM -
After weeks of waisted time and hundreads of tries ... I give up.
This Interbase driver can't be used with ASP.NET 64 bits environment and can't be replaced with nithing.
And because all my last 10 years database work is made with Interbase ... I must return to 32 bits environment and use all my expensive machines to run 32 bit OS. Money thrown on hardware and software ... for nothing but frustrations
SHAME ON YOU embarcadero ... for your priorities planification.

Tomohiro Takahashi at 7/3/2011 6:22:25 PM -
Marian-san
Have you already contacted technical support service?
http://support.embarcadero.com/

and, do you use Delphi Prism XE Update 1 ?
http://edn.embarcadero.com/en/article/41345

Server Response from: ETNACODE01