Reputation: 33471
I am setting up an Oracle connection for NHibernate for the first time. I have copied the Oracle.DataAccess.dll file into my bin folder. No matter what I try, I keep getting the same error:
Could not load type >NHibernate.Driver.OracleDataClientDriver. Possible cause: no assembly name specified.
I am using the following configuration:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory name="DefaultSessionFactory">
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="dialect">NHibernate.Dialect.Oracle9Dialect</property>
<property name="connection.driver_class">>NHibernate.Driver.OracleDataClientDriver</property>
<property name="connection.connection_string">Data Source=DB;User ID=USERPassword=****;</property>
<property name="show_sql">true</property>
<mapping assembly="NHibernateExample.DataAccess"/>
</session-factory>
</hibernate-configuration>
I have previously only set up NHibernate for SQL Server. Am I missing anything here?
Upvotes: 2
Views: 20717
Reputation: 5554
Once I had a similar problem, and I fixed it by adding hibernate
to the property names, in your case:
<property name="hibernate.connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="hibernate.dialect">NHibernate.Dialect.Oracle9Dialect</property>
<property name="hibernate.connection.driver_class">NHibernate.Driver.OracleDataClientDriver</property>
<property name="hibernate.connection.connection_string">Data Source=DB;User ID=USERPassword=****;</property>
Hope it helps
Upvotes: 0
Reputation: 1756
Did you copy and paste the code? because there's an extra > in there, in the connection.driver_class line
Upvotes: 10