This may be much too vague, but…

 

NHibernate version 1.2.1.4000.  I’m trying to load an entity using GetById.
CastleProxyFactory.GetProxy is crashing, no exception.  Specifically, in
this method:

 

            public INHibernateProxy GetProxy(object id, ISessionImplementor
session)

            {

                  try

                  {

                        CastleLazyInitializer initializer = new
CastleLazyInitializer(_persistentClass, id,

 
_getIdentifierMethod, _setIdentifierMethod, session);

 

                        object generatedProxy = null;

 

                        if (IsClassProxy)

                        {

                              generatedProxy =
_proxyGenerator.CreateClassProxy(_persistentClass, _interfaces, initializer,
false);

                        }

                        else

                        {

                              generatedProxy =
_proxyGenerator.CreateProxy(_interfaces, initializer, new object());

                        }

 

                        initializer._constructed = true;

                        return (INHibernateProxy) generatedProxy;

                  }

                  catch (Exception e)

                  {

                        log.Error("Creating a proxy instance failed", e);

                        throw new HibernateException("Creating a proxy
instance failed", e);

                  }

            }

 

CreateClassProxy appears to be executed and generatedProxy gets assigned
fine.  But when initializer._constructed gets assigned to true, the process
crashes.  If the origin of the call is from a web page, it just dies; if I’m
running a test in the NUnit runner: “NUnit has encountered a problem and
needs to close”; if I trace through the code in VS: “An existing connection
was forcibly closed by the remote host”.

 

Can anyone point me in the right direction, or suggest avenues to
investigate?

 

Thanks.

Remi.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to nhusers@googlegroups.com
To unsubscribe from this group, send email to 
nhusers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to