首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >创建上下文‘spring.root’时出错:无法加载类型

创建上下文‘spring.root’时出错:无法加载类型
EN

Stack Overflow用户
提问于 2011-05-06 21:37:02
回答 1查看 4.6K关注 0票数 2

以下是错误的详细信息,如果有人能帮助我,我将不胜感激。

代码语言:javascript
运行
复制
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
EN

回答 1

Stack Overflow用户

发布于 2011-05-07 04:37:11

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

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5912239

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档