-->
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: NHibernate.InstantiationException
PostPosted: Wed Jun 29, 2005 5:26 pm 
I am working on an ASP.net application. Everything is working fine on my development machine. However, when I move the site from the development machine to a testing machine I get the following exception:

[InstantiationException: Object class Management.Utilities.Importer must declare a default (no-arg) constructorNHibernate.InstantiationException]
NHibernate.Util.ReflectHelper.GetDefaultConstructor(Type type) +141
NHibernate.Persister.AbstractEntityPersister..ctor(PersistentClass model, ISessionFactoryImplementor factory) +655
NHibernate.Persister.EntityPersister..ctor(PersistentClass model, ISessionFactoryImplementor factory) +252
NHibernate.Persister.PersisterFactory.Create(PersistentClass model, ISessionFactoryImplementor factory) +59
NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, IDictionary properties, IInterceptor interceptor, Settings settings) +820
NHibernate.Cfg.Configuration.BuildSessionFactory() +93
DataManager.NHibernateTransactionManager..cctor()


I'm using NHibernate version 0.6 and am getting this exception whenever I first try loading a first page which would create the SessionFactory. I have double and triple checked that there is a no-arg public constructor on this class and there is (although that wouldn't explain it working on my local machine if there weren't).

Is there any special configuration that I may be missing in IIS (6.0 on Windows Server 2003)?

The exception occurs after the following code:
_configuration = new NHibernate.Cfg.Configuration();
_configuration.AddAssembly("MyAssemblyName");
_factory = _configuration.BuildSessionFactory();


Top
  
 
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.