I have some web application that using Fluent NHibernate as the ORM and ORACLE 11g as the database.
Below is my Configuration Builder look a like
return Fluently.Configure()
.Database(OracleDataClientConfiguration.Oracle10
.ConnectionString(c => c.FromConnectionStringWithKey("ora"))
.AdoNetBatchSize(100)
.Driver<NHibernate.Driver.OracleClientDriver>()
)
.Mappings(mappings => mappings.FluentMappings.AddFromAssemblyOf<UserMapping>())
//.ExposeConfiguration(ReCreateSchema)
.BuildConfiguration();
And below is my Connection String
<connectionStrings>
<add name="ora" connectionString="Server=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host)(PORT=1521))(CONNECT_DATA=(SERVER = DEDICATED)(SERVICE_NAME=serviceName)));User Id=uidxx;Password=pwdxx;" />
</connectionStrings>
From the configuration, the next step is build the session factory
ISessionFactory sesionFactory = config.BuildSessionFactory();
Whenever I run the application, it will throw an error with code
ORA-06413: Connection not Open
Is there any configuration that I miss? I'm also try to research for the solution but found nothing. And also I try to replace the configuration with OracleClientConfiguration.Oracle10 but I got the same result.
Thanks!