-->
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.  [ 2 posts ] 
Author Message
 Post subject: NHibernate.Bytecode.UnableToLoadProxyFactoryFactoryException
PostPosted: Fri Jul 29, 2011 6:27 am 
Newbie

Joined: Fri Jul 29, 2011 6:25 am
Posts: 1
Hi All,

I am facing this problem. I am new to the Hibernate.

{NHibernate.Bytecode.UnableToLoadProxyFactoryFactoryException: Unable to load type 'NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle' during configuration of proxy factory class

Thanks & Regards
Sreeraghu


Top
 Profile  
 
 Post subject: Re: NHibernate.Bytecode.UnableToLoadProxyFactoryFactoryException
PostPosted: Tue Aug 02, 2011 6:21 pm 
Newbie

Joined: Tue Aug 02, 2011 3:34 pm
Posts: 2
I had a similar problem. I found out that the "NHibernate.ByteCode.Castle.dll" was not being copied to the Bin directory of the application, even when it's set to do so in Visual Studio.
I don't have the original link, but apparently it is a bug in visual studio.

What I ended up doing was to force it by having a static function a class as follows
Code:
internal class NHibernateRefenceBug
  {
    internal static void Fix()
    {
      Castle.DynamicProxy.DefaultProxyBuilder fix1 = new Castle.DynamicProxy.DefaultProxyBuilder();
      NHibernate.ByteCode.Castle.ProxyFactoryFactory fix2 = new NHibernate.ByteCode.Castle.ProxyFactoryFactory();
    }
  }

and calling that function before doign anything related to NH Repository( i.e. before creating a singleton repository object ).

Hope this helps.


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

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.