March 26, 2010

Upgrading to NHibernate 2.1 for new Validators!

Filed under: Development — Tags: — Darrin Maidlow @ 5:04 pm

I wanted to implemented the new which meant upgrading to NH 2.1.   Found a great post documenting the new “breaking change” between 2.0 and 2.1 pertaining to the new proxy factory functionality in NH.  “The ProxyFactoryFactory was not configured.” jumped up and bit me in the ass.  

NH used to assume Castle – but now it needs to be configured.  In addition to the Castly proxy, there is a new LinFu proxy available too.   , Davy Brion has it all for you here =). 

I opted to go with the Castly Dynamic Proxy – I’m not in a position to do any performance tests between– Castle has been around a long time and has a pretty big user base.  Good on this subject.  However, LinFu would have won if I was basing my choice on name alone…

After a bit of fiddling, I’m back up and running with NH 2.1 and shiny new validation attributes.   

mmmm validation…

March 5, 2010

Oracle.DataAccess version numbers in a .NET config file

Filed under: Oracle — Darrin Maidlow @ 1:37 pm

For my future reference!

RADE and FullCircle and builds usually have the ODP.NET version in the web.confg set by the installer, but development builds usually come from my machine and are configured for use with the Oracle 11 ODP.NET.   If this is set incorrectly, you will get an error that looks a little something like this:

The IDbCommand and IDbConnection implementation in the assembly Oracle.DataAccess could not be found. Ensure that the assembly Oracle.DataAccess is located in the application directory or in the Global Assembly Cache. If the assembly is in the GAC, use <qualifyAssembly/> element in the application configuration file to specify the full name of the assembly.

To use an different version of the Oracle client, the web.config must be edited and the QualifyAssembly section must have its version property set appropriately.  This will also apply for an app.config too.

   1: <runtime>
   2:     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
   3:         <qualifyAssembly partialName="Oracle.DataAccess" fullName="Oracle.DataAccess, Version=, Culture=neutral, PublicKeyToken=89b483f429c47342"/>
   4:     </assemblyBinding>
   5: </runtime>

Possible values for this are:

  • 11g: Version=
  • 10g R2: Version=
  • 10g: Version=

Set your config appropriately and you’re good to go.

Powered by WordPress

Switch to our mobile site