NHibernate的?访问我的发布版本时出错

时间:2013-06-12 13:30:22

标签: visual-studio-2010 nhibernate build

我在一个不属于我的网站上完成了(?)开发。
它使用了我不熟悉的NHibernate。

我的开发似乎在调试模式下工作正常,但是当我发布我的发布版本时,我得到的错误似乎与NHibernate有关。 我虽然可能是因为我把一些hbm.xml文件作为嵌入式资源放入,但似乎没问题。

我已经开始使用它了。

这是错误:

[NullReferenceException: Object reference not set to an instance of an object.]
   Common.Logging.Factory.AbstractCachingLoggerFactoryAdapter.GetLogger(Type type) +8
   Common.Logging.LogManager.GetCurrentClassLogger() +95
   () +17
   NHibernate.Bytecode.Lightweight.ReflectionOptimizer.CreateInstance() +17
   NHibernate.Tuple.PocoInstantiator.GetInstance() +39
   NHibernate.Tuple.PocoInstantiator.Instantiate() +57
   NHibernate.Tuple.PocoInstantiator.Instantiate(Object id) +57
   NHibernate.Tuple.Entity.AbstractEntityTuplizer.Instantiate(Object id) +29
   NHibernate.Persister.Entity.AbstractEntityPersister.Instantiate(Object id, EntityMode entityMode) +44
   NHibernate.Impl.SessionImpl.Instantiate(IEntityPersister persister, Object id) +323
   NHibernate.Impl.SessionImpl.Instantiate(String clazz, Object id) +292
   NHibernate.Loader.Loader.InstanceNotYetLoaded(IDataReader dr, Int32 i, ILoadable persister, EntityKey key, LockMode lockMode, String rowIdAlias, EntityKey optionalObjectKey, Object optionalObject, IList hydratedObjects, ISessionImplementor session) +85
   NHibernate.Loader.Loader.GetRow(IDataReader rs, ILoadable[] persisters, EntityKey[] keys, Object optionalObject, EntityKey optionalObjectKey, LockMode[] lockModes, IList hydratedObjects, ISessionImplementor session) +296
   NHibernate.Loader.Loader.GetRowFromResultSet(IDataReader resultSet, ISessionImplementor session, QueryParameters queryParameters, LockMode[] lockModeArray, EntityKey optionalObjectKey, IList hydratedObjects, EntityKey[] keys, Boolean returnProxies) +150
   NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +668
   NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +126
   NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) +136

[GenericADOException: could not execute query
[ select activityca0_.ID_ACTIVITY_CATEGORY as ID1_221_, activityca0_.AVAILABLE_ON_DAYOFF as AVAILABLE2_221_, activityca0_.IS_WORK as IS3_221_, activityca0_.IS_VACATION as IS4_221_, activityca0_.OBLIGATION as OBLIGATION221_, activityca0_.EXTRA_WORK as EXTRA6_221_, activityca0_.RANK as RANK221_, activityca0_.READ_ONLY as READ8_221_, activityca0_.INCLUDE_DETAILS_IN_PAYROLL as INCLUDE9_221_, activityca0_.FEES_SPECIAL_AMOUNT as FEES10_221_, activityca0_.PAYROLL_CODE as PAYROLL11_221_, activityca0_.PAYROLL_INDEX as PAYROLL12_221_, activityca0_.CODE as CODE221_, activityca0_.DATE_DELETED as DATE14_221_ from ACTIVITY_CATEGORY activityca0_ ]
[SQL: select activityca0_.ID_ACTIVITY_CATEGORY as ID1_221_, activityca0_.AVAILABLE_ON_DAYOFF as AVAILABLE2_221_, activityca0_.IS_WORK as IS3_221_, activityca0_.IS_VACATION as IS4_221_, activityca0_.OBLIGATION as OBLIGATION221_, activityca0_.EXTRA_WORK as EXTRA6_221_, activityca0_.RANK as RANK221_, activityca0_.READ_ONLY as READ8_221_, activityca0_.INCLUDE_DETAILS_IN_PAYROLL as INCLUDE9_221_, activityca0_.FEES_SPECIAL_AMOUNT as FEES10_221_, activityca0_.PAYROLL_CODE as PAYROLL11_221_, activityca0_.PAYROLL_INDEX as PAYROLL12_221_, activityca0_.CODE as CODE221_, activityca0_.DATE_DELETED as DATE14_221_ from ACTIVITY_CATEGORY activityca0_]]
   NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) +224
   NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters) +18
   NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet`1 querySpaces, IType[] resultTypes) +79
   NHibernate.Hql.Ast.ANTLR.Loader.QueryLoader.List(ISessionImplementor session, QueryParameters queryParameters) +51
   NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.List(ISessionImplementor session, QueryParameters queryParameters) +231
   NHibernate.Engine.Query.HQLQueryPlan.PerformList(QueryParameters queryParameters, ISessionImplementor session, IList results) +385
   NHibernate.Impl.SessionImpl.List(String query, QueryParameters queryParameters, IList results) +369
   NHibernate.Impl.SessionImpl.List(String query, QueryParameters parameters) +306
   NHibernate.Impl.QueryImpl.List() +117
   Adneom.Common.Persistence.Impl.SimpleHibernateEntityManagerImpl..ctor(Configuration conf) in C:\Clients\Adneom\Dev\Adneom.Common\src\Persistence\Impl\SimpleHibernateEntityManagerImpl.cs:51
   Adneom.Common.Persistence.Impl.SimpleHibernateEntityManagerImpl..ctor(String assemblyName, IDictionary`2 settings) in C:\Clients\Adneom\Dev\Adneom.Common\src\Persistence\Impl\SimpleHibernateEntityManagerImpl.cs:29
   _dynamic_Adneom.Common.Persistence.Impl.SimpleHibernateEntityManagerImpl..ctor(Object[] ) +83
   Spring.Reflection.Dynamic.SafeConstructor.Invoke(Object[] arguments) in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Reflection\Dynamic\DynamicConstructor.cs:116
   Spring.Util.ObjectUtils.InstantiateType(ConstructorInfo constructor, Object[] arguments) in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Util\ObjectUtils.cs:252

[FatalReflectionException: Cannot instantiate Type [Adneom.Common.Persistence.Impl.SimpleHibernateEntityManagerImpl] using ctor [Void .ctor(System.String, System.Collections.Generic.IDictionary`2[System.String,System.String])] : 'could not execute query
[ select activityca0_.ID_ACTIVITY_CATEGORY as ID1_221_, activityca0_.AVAILABLE_ON_DAYOFF as AVAILABLE2_221_, activityca0_.IS_WORK as IS3_221_, activityca0_.IS_VACATION as IS4_221_, activityca0_.OBLIGATION as OBLIGATION221_, activityca0_.EXTRA_WORK as EXTRA6_221_, activityca0_.RANK as RANK221_, activityca0_.READ_ONLY as READ8_221_, activityca0_.INCLUDE_DETAILS_IN_PAYROLL as INCLUDE9_221_, activityca0_.FEES_SPECIAL_AMOUNT as FEES10_221_, activityca0_.PAYROLL_CODE as PAYROLL11_221_, activityca0_.PAYROLL_INDEX as PAYROLL12_221_, activityca0_.CODE as CODE221_, activityca0_.DATE_DELETED as DATE14_221_ from ACTIVITY_CATEGORY activityca0_ ]
[SQL: select activityca0_.ID_ACTIVITY_CATEGORY as ID1_221_, activityca0_.AVAILABLE_ON_DAYOFF as AVAILABLE2_221_, activityca0_.IS_WORK as IS3_221_, activityca0_.IS_VACATION as IS4_221_, activityca0_.OBLIGATION as OBLIGATION221_, activityca0_.EXTRA_WORK as EXTRA6_221_, activityca0_.RANK as RANK221_, activityca0_.READ_ONLY as READ8_221_, activityca0_.INCLUDE_DETAILS_IN_PAYROLL as INCLUDE9_221_, activityca0_.FEES_SPECIAL_AMOUNT as FEES10_221_, activityca0_.PAYROLL_CODE as PAYROLL11_221_, activityca0_.PAYROLL_INDEX as PAYROLL12_221_, activityca0_.CODE as CODE221_, activityca0_.DATE_DELETED as DATE14_221_ from ACTIVITY_CATEGORY activityca0_]']
   Spring.Util.ObjectUtils.InstantiateType(ConstructorInfo constructor, Object[] arguments) in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Util\ObjectUtils.cs:257
   Spring.Objects.Factory.Support.SimpleInstantiationStrategy.Instantiate(RootObjectDefinition definition, String name, IObjectFactory factory, ConstructorInfo constructor, Object[] arguments) in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Objects\Factory\Support\SimpleInstantiationStrategy.cs:157
   Spring.Objects.Factory.Support.ConstructorResolver.AutowireConstructor(String objectName, RootObjectDefinition rod, ConstructorInfo[] chosenCtors, Object[] explicitArgs) in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Objects\Factory\Support\ConstructorResolver.cs:98
   Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.AutowireConstructor(String name, RootObjectDefinition definition, ConstructorInfo[] ctors, Object[] explicitArgs) in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Objects\Factory\Support\AbstractAutowireCapableObjectFactory.cs:1133
   Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.CreateObjectInstance(String objectName, RootObjectDefinition objectDefinition, Object[] arguments) in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Objects\Factory\Suppor

0 个答案:

没有答案