创建上下文“spring.root”时出错:无法加载类型

发布于 2024-11-05 05:11:12 字数 8732 浏览 6 评论 0原文

下面详细说明错误,如果有人可以帮助我,我将不胜感激。

Error creating context 'spring.root': Could not load type 'SpringNet.NHibernate.Fluent.Persistencia.Implementacoes.GenericDAO' from assembly 'SpringNet.NHibernate.Fluent.Persistencia, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.



Server Error in '/' Application.
--------------------------------------------------------------------------------

Could not load type 'SpringNet.NHibernate.Fluent.Persistencia.Implementacoes.GenericDAO' from assembly 'SpringNet.NHibernate.Fluent.Persistencia, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.TypeLoadException: Could not load type 'SpringNet.NHibernate.Fluent.Persistencia.Implementacoes.GenericDAO' from assembly 'SpringNet.NHibernate.Fluent.Persistencia, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 


[TypeLoadException: Could not load type 'SpringNet.NHibernate.Fluent.Persistencia.Implementacoes.GenericDAO' from assembly 'SpringNet.NHibernate.Fluent.Persistencia, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.]
   System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type) +0
   System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) +67
   Spring.Core.TypeResolution.TypeResolver.LoadTypeDirectlyFromAssembly(TypeAssemblyHolder typeInfo) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Core\TypeResolution\TypeResolver.cs:123
   Spring.Core.TypeResolution.TypeResolver.Resolve(String typeName) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Core\TypeResolution\TypeResolver.cs:75
   Spring.Core.TypeResolution.GenericTypeResolver.Resolve(String typeName) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Core\TypeResolution\GenericTypeResolver.cs:97
   Spring.Core.TypeResolution.CachedTypeResolver.Resolve(String typeName) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Core\TypeResolution\CachedTypeResolver.cs:107
   Spring.Core.TypeResolution.TypeResolutionUtils.ResolveType(String typeName) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Core\TypeResolution\TypeResolutionUtils.cs:106
   Spring.Objects.Factory.Support.AbstractObjectDefinition.ResolveObjectType() in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Objects\Factory\Support\AbstractObjectDefinition.cs:640
   Spring.Objects.Factory.Support.AbstractObjectFactory.ResolveObjectType(RootObjectDefinition rod, String objectName) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Objects\Factory\Support\AbstractObjectFactory.cs:1096

[CannotLoadObjectTypeException: Cannot resolve type [SpringNet.NHibernate.Fluent.Persistencia.Implementacoes.GenericDAO, SpringNet.NHibernate.Fluent.Persistencia] for object with name 'GenericDAO' defined in config [C:\Users\eggtech024\documents\visual studio 2010\Projects\SpringNet.NHibernate.Fluent\SpringNet.NHibernate.Fluent.Web\web.config#spring/objects] line 1]
   Spring.Objects.Factory.Support.AbstractObjectFactory.ResolveObjectType(RootObjectDefinition rod, String objectName) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Objects\Factory\Support\AbstractObjectFactory.cs:1100
   Spring.Objects.Factory.Support.DefaultListableObjectFactory.PreInstantiateSingletons() in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Objects\Factory\Support\DefaultListableObjectFactory.cs:472
   Spring.Context.Support.AbstractApplicationContext.Refresh() in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Context\Support\AbstractApplicationContext.cs:1017
   Spring.Context.Support.WebApplicationContext..ctor(WebApplicationContextArgs args) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Web\Context\Support\WebApplicationContext.cs:125
   Spring.Context.Support.WebApplicationContext..ctor(String name, Boolean caseSensitive, String[] configurationLocations) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Web\Context\Support\WebApplicationContext.cs:82
   _dynamic_Spring.Context.Support.WebApplicationContext..ctor(Object[] ) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Web\Caching\AspNetCache.cs:126
   Spring.Reflection.Dynamic.SafeConstructor.Invoke(Object[] arguments) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Reflection\Dynamic\DynamicConstructor.cs:116
   Spring.Context.Support.RootContextInstantiator.InvokeContextConstructor(ConstructorInfo ctor) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Context\Support\ContextHandler.cs:563
   Spring.Context.Support.ContextInstantiator.InstantiateContext() in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Context\Support\ContextHandler.cs:508
   Spring.Context.Support.ContextHandler.InstantiateContext(IApplicationContext parentContext, Object configContext, String contextName, Type contextType, Boolean caseSensitive, String[] resources) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Context\Support\ContextHandler.cs:351
   Spring.Context.Support.WebContextHandler.InstantiateContext(IApplicationContext parent, Object configContext, String contextName, Type contextType, Boolean caseSensitive, String[] resources) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Web\Context\Support\WebContextHandler.cs:129
   Spring.Context.Support.ContextHandler.Create(Object parent, Object configContext, XmlNode section) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Context\Support\ContextHandler.cs:289

[ConfigurationErrorsException: Error creating context 'spring.root': Could not load type 'SpringNet.NHibernate.Fluent.Persistencia.Implementacoes.GenericDAO' from assembly 'SpringNet.NHibernate.Fluent.Persistencia, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.]
   System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult) +199
   System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject) +1153
   System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) +1468
   System.Configuration.BaseConfigurationRecord.GetSection(String configKey) +41
   System.Web.HttpContext.GetSection(String sectionName) +52
   System.Web.Configuration.HttpConfigurationSystem.GetSection(String sectionName) +57
   System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey) +6
   System.Configuration.ConfigurationManager.GetSection(String sectionName) +78
   Spring.Util.ConfigurationUtils.GetSection(String sectionName) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Util\ConfigurationUtils.cs:71
   Spring.Context.Support.WebApplicationContext.GetContextInternal(String virtualPath) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Web\Context\Support\WebApplicationContext.cs:335
   Spring.Context.Support.WebApplicationContext.GetRootContext() in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Web\Context\Support\WebApplicationContext.cs:223
   Spring.Context.Support.WebSupportModule.Init(HttpApplication app) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Web\Context\Support\WebSupportModule.cs:175
   System.Web.HttpApplication.InitModulesCommon() +80
   System.Web.HttpApplication.InitModules() +43
   System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +828
   System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +304
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +327

Below details of the error, if someone can help me I am grateful.

Error creating context 'spring.root': Could not load type 'SpringNet.NHibernate.Fluent.Persistencia.Implementacoes.GenericDAO' from assembly 'SpringNet.NHibernate.Fluent.Persistencia, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.



Server Error in '/' Application.
--------------------------------------------------------------------------------

Could not load type 'SpringNet.NHibernate.Fluent.Persistencia.Implementacoes.GenericDAO' from assembly 'SpringNet.NHibernate.Fluent.Persistencia, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.TypeLoadException: Could not load type 'SpringNet.NHibernate.Fluent.Persistencia.Implementacoes.GenericDAO' from assembly 'SpringNet.NHibernate.Fluent.Persistencia, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 


[TypeLoadException: Could not load type 'SpringNet.NHibernate.Fluent.Persistencia.Implementacoes.GenericDAO' from assembly 'SpringNet.NHibernate.Fluent.Persistencia, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.]
   System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type) +0
   System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) +67
   Spring.Core.TypeResolution.TypeResolver.LoadTypeDirectlyFromAssembly(TypeAssemblyHolder typeInfo) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Core\TypeResolution\TypeResolver.cs:123
   Spring.Core.TypeResolution.TypeResolver.Resolve(String typeName) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Core\TypeResolution\TypeResolver.cs:75
   Spring.Core.TypeResolution.GenericTypeResolver.Resolve(String typeName) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Core\TypeResolution\GenericTypeResolver.cs:97
   Spring.Core.TypeResolution.CachedTypeResolver.Resolve(String typeName) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Core\TypeResolution\CachedTypeResolver.cs:107
   Spring.Core.TypeResolution.TypeResolutionUtils.ResolveType(String typeName) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Core\TypeResolution\TypeResolutionUtils.cs:106
   Spring.Objects.Factory.Support.AbstractObjectDefinition.ResolveObjectType() in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Objects\Factory\Support\AbstractObjectDefinition.cs:640
   Spring.Objects.Factory.Support.AbstractObjectFactory.ResolveObjectType(RootObjectDefinition rod, String objectName) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Objects\Factory\Support\AbstractObjectFactory.cs:1096

[CannotLoadObjectTypeException: Cannot resolve type [SpringNet.NHibernate.Fluent.Persistencia.Implementacoes.GenericDAO, SpringNet.NHibernate.Fluent.Persistencia] for object with name 'GenericDAO' defined in config [C:\Users\eggtech024\documents\visual studio 2010\Projects\SpringNet.NHibernate.Fluent\SpringNet.NHibernate.Fluent.Web\web.config#spring/objects] line 1]
   Spring.Objects.Factory.Support.AbstractObjectFactory.ResolveObjectType(RootObjectDefinition rod, String objectName) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Objects\Factory\Support\AbstractObjectFactory.cs:1100
   Spring.Objects.Factory.Support.DefaultListableObjectFactory.PreInstantiateSingletons() in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Objects\Factory\Support\DefaultListableObjectFactory.cs:472
   Spring.Context.Support.AbstractApplicationContext.Refresh() in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Context\Support\AbstractApplicationContext.cs:1017
   Spring.Context.Support.WebApplicationContext..ctor(WebApplicationContextArgs args) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Web\Context\Support\WebApplicationContext.cs:125
   Spring.Context.Support.WebApplicationContext..ctor(String name, Boolean caseSensitive, String[] configurationLocations) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Web\Context\Support\WebApplicationContext.cs:82
   _dynamic_Spring.Context.Support.WebApplicationContext..ctor(Object[] ) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Web\Caching\AspNetCache.cs:126
   Spring.Reflection.Dynamic.SafeConstructor.Invoke(Object[] arguments) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Reflection\Dynamic\DynamicConstructor.cs:116
   Spring.Context.Support.RootContextInstantiator.InvokeContextConstructor(ConstructorInfo ctor) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Context\Support\ContextHandler.cs:563
   Spring.Context.Support.ContextInstantiator.InstantiateContext() in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Context\Support\ContextHandler.cs:508
   Spring.Context.Support.ContextHandler.InstantiateContext(IApplicationContext parentContext, Object configContext, String contextName, Type contextType, Boolean caseSensitive, String[] resources) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Context\Support\ContextHandler.cs:351
   Spring.Context.Support.WebContextHandler.InstantiateContext(IApplicationContext parent, Object configContext, String contextName, Type contextType, Boolean caseSensitive, String[] resources) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Web\Context\Support\WebContextHandler.cs:129
   Spring.Context.Support.ContextHandler.Create(Object parent, Object configContext, XmlNode section) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Context\Support\ContextHandler.cs:289

[ConfigurationErrorsException: Error creating context 'spring.root': Could not load type 'SpringNet.NHibernate.Fluent.Persistencia.Implementacoes.GenericDAO' from assembly 'SpringNet.NHibernate.Fluent.Persistencia, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.]
   System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult) +199
   System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject) +1153
   System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) +1468
   System.Configuration.BaseConfigurationRecord.GetSection(String configKey) +41
   System.Web.HttpContext.GetSection(String sectionName) +52
   System.Web.Configuration.HttpConfigurationSystem.GetSection(String sectionName) +57
   System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey) +6
   System.Configuration.ConfigurationManager.GetSection(String sectionName) +78
   Spring.Util.ConfigurationUtils.GetSection(String sectionName) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Core\Util\ConfigurationUtils.cs:71
   Spring.Context.Support.WebApplicationContext.GetContextInternal(String virtualPath) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Web\Context\Support\WebApplicationContext.cs:335
   Spring.Context.Support.WebApplicationContext.GetRootContext() in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Web\Context\Support\WebApplicationContext.cs:223
   Spring.Context.Support.WebSupportModule.Init(HttpApplication app) in c:\_svn\spring-net\tags\spring-net-1.3.1\src\Spring\Spring.Web\Context\Support\WebSupportModule.cs:175
   System.Web.HttpApplication.InitModulesCommon() +80
   System.Web.HttpApplication.InitModules() +43
   System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +828
   System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +304
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +327

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

俏︾媚 2024-11-12 05:11:12

是名为 SpringNet.NHibernate.Fluent.Persistencia 的程序集中的 SpringNet.NHibernate.Fluent.Persistencia.Implementacoes.GenericDAO 类型吗?通常程序集名称类似于 SpringNet,您可以从项目属性中检查该名称

is the type SpringNet.NHibernate.Fluent.Persistencia.Implementacoes.GenericDAO in an assembly named SpringNet.NHibernate.Fluent.Persistencia ? usually the assembly name is something like SpringNet and you can check that from the project properties

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文