NHibernate 2.1 and Oracle 10g client

86 views
Skip to first unread message

JohnRudolfLewis

unread,
Jul 30, 2009, 10:36:18 PM7/30/09
to nhusers
I am having trouble getting NHibernate 2.1 to work with Oracle Client
10g.

I am getting Unable to cast object of type
'Oracle.DataAccess.Client.OracleConnection' to type
'System.Data.Common.DbConnection'.

See http://stackoverflow.com/questions/1210037/error-with-nhibernate-2-1-and-oracle-10g-client
for full details.

Have you seen this before? I'm not having too much luck googling
relavent information.

It seems that the source of the problem is that
Oracle.DataAccess.Client.OracleConnection does not inherit
System.Data.Common.DbConnection, its base type is
System.ComponentModel.Component. It does implement IDbConnection. I
looked into refactoring away from DbConnection to IDbConnection, but
NH depends on some methods in DbConnection that IDbConnection does not
provide.

Oracle 11g client fixes the problem, but I am having to fight my
admins to get it instaled. I was hoping there might be some other fix.

Fabio Maulo

unread,
Jul 31, 2009, 6:08:21 AM7/31/09
to nhu...@googlegroups.com
The DbConnection is needed for schema. Try to disable all schema interactions.



--
Fabio Maulo
Reply all
Reply to author
Forward
0 new messages