These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Configuring NHIbernate for System.Data.OracleClient
PostPosted: Thu Jun 12, 2008 1:23 pm 
Newbie

Joined: Thu Jun 12, 2008 1:02 pm
Posts: 1
NHibernate 1.2

Hi All,

Can anybody please help me in, How to configure my web.config if I want to connect to Oracle 9i database using System.Data.OracleClient using NHibernate 1.2?

Following is the web.config I have set right now

<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<!-- Oracle 9i and 10g use the same dialect -->
<property name="dialect">NHibernate.Dialect.Oracle9Dialect</property>
<!-- use the client from Oracle (ODP.NET) NHibernate.Driver.OracleDataClientDriver as opposed to NHibernate.Driver.OracleClientDriver -->
<property name="connection.driver_class">NHibernate.Driver.DriverConnectionProvider</property>
<property name="connection.connection_string">Data source=10.21.2.60;User Id=MIS_OWNER;Password=MIS_OWNER;</property>
<property name="connection.isolation">ReadCommitted</property>
<property name="query.substitutions">True=1;False=0</property>
<property name="show_sql">true</property>
<mapping assembly="BLib"/>
</session-factory>
</hibernate-configuration>


<configuration>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<qualifyAssembly partialName="System.Data.OracleClient" fullName="System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblyBinding>
</runtime>
</configuration>

The above configuration give me the error, "Could not load type NHibernate.Driver.DriverConnectionProvider. Possible cause: no assembly name specified" on following line.

ISessionFactory sessionFactory = new Configuration().Configure().BuildSessionFactory();


On one of the forum I have found that "<property name="connection.driver_class">NHibernate.Driver.DriverConnectionProvider</property>" needs to be set for connecting to oracle from System.Data.OracleClient, but it doesn;t works and gives the above error.

Please help me.

Thanks a lot.
Vaibhav Shah


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.