Hi,
I am trying to setup NHibernate with Oracle and am getting a "Could not create driver from System.Data.OracleClient" error when I try to "BuildSessionFactory()".
I am using:
1. C# on Visual Studio 2003
2. .NET 1.1
3. Oracle 9.2
4. using System.Data.OracleClient
The configuration looks like this:
----------------------------------------------------------------------------
Code:
<nhibernate>
<add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />
<add key="hibernate.dialect" value="NHibernate.Dialect.Oracle9Dialect" />
<add key="hibernate.connection.driver_class" value="System.Data.OracleClient" />
<add key="hibernate.connection.connection_string" value="user id=username;pwd=password;data source=DEV10" />
<add key="hibernate.show_sql" value="true" />
</nhibernate>
------------------------------------------------------------------------------
And I am trying to create the Session like this:
------------------------------------------------------------------------------
Code:
vendorDataConfig = new Configuration().AddAssembly(System.Reflection.Assembly.GetCallingAssembly());
ISessionFactory factory = null;
factory = vendorDataConfig.BuildSessionFactory();
session = factory.OpenSession();
-------------------------------------------------------------------------------
Stacktrace:
-------------------------------------------------------------------------------
Code:
ERROR LoadVendorDataApp.Data.VendorDataDAO - at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary settings)
at NHibernate.Connection.ConnectionProvider.Configure(IDictionary settings)
at NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider(IDictionary settings)
at NHibernate.Cfg.SettingsFactory.BuildSettings(IDictionary properties)
at NHibernate.Cfg.Configuration.BuildSettings()
at NHibernate.Cfg.Configuration.BuildSessionFactory()
at LoadVendorDataApp.Data.VendorDataDAO..ctor() in c:\my projects\...
---------------------------------------------------------------------------------
Has anyone encountered this problem before?
Any help would be much appreciated.
Thanks,
-MR.