“/”应用程序中的服务器错误。
Could not load type from string value 'DirectCenter.DAL.UserDao, DirectCenter.DAL'.
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.TypeLoadException: Could not load type from string value 'DirectCenter.DAL.UserDao, DirectCenter.DAL'.源错误:
执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。
堆栈跟踪:
[TypeLoadException: Could not load type from string value 'DirectCenter.DAL.UserDao, DirectCenter.DAL'.]
Spring.Core.TypeResolution.TypeResolver.Resolve(String typeName) +224
Spring.Core.TypeResolution.GenericTypeResolver.Resolve(String typeName) +309
Spring.Core.TypeResolution.CachedTypeResolver.Resolve(String typeName) +229
Spring.Core.TypeResolution.TypeResolutionUtils.ResolveType(String typeName) +41
Spring.Objects.Factory.Support.AbstractObjectDefinition.ResolveObjectType() +35
Spring.Objects.Factory.Support.AbstractObjectFactory.ResolveObjectType(RootObjectDefinition rod, String objectName) +71
[CannotLoadObjectTypeException: Cannot resolve type [DirectCenter.DAL.UserDao, DirectCenter.DAL] for object with name 'UserDao' defined in assembly [DirectCenter.App, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null], resource [DirectCenter.App.Dao.xml]]
Spring.Objects.Factory.Support.AbstractObjectFactory.ResolveObjectType(RootObjectDefinition rod, String objectName) +137
Spring.Objects.Factory.Support.DefaultListableObjectFactory.PreInstantiateSingletons() +267
Spring.Context.Support.AbstractApplicationContext.Refresh() +512
Spring.Context.Support.WebApplicationContext..ctor(String name, Boolean caseSensitive, IApplicationContext parentContext, String[] configurationLocations) +66
Spring.Context.Support.WebApplicationContext..ctor(String name, Boolean caseSensitive, String[] configurationLocations) +17
[TargetInvocationException: 调用的目标发生了异常。]
System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType) +0
System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType) +15
System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +249
Spring.Util.ObjectUtils.InstantiateType(ConstructorInfo constructor, Object[] arguments) +229
[FatalReflectionException: Cannot instantiate Type [Spring.Context.Support.WebApplicationContext] using ctor [Void .ctor(System.String, Boolean, System.String[])] : '调用的目标发生了异常。']
Spring.Util.ObjectUtils.InstantiateType(ConstructorInfo constructor, Object[] arguments) +378
Spring.Context.Support.RootContextInstantiator.InvokeContextConstructor(ConstructorInfo ctor) +108
Spring.Context.Support.ContextInstantiator.InstantiateContext() +34
Spring.Context.Support.ContextHandler.InstantiateContext(IApplicationContext parentContext, Object configContext, String contextName, Type contextType, Boolean caseSensitive, String[] resources) +106
Spring.Context.Support.WebContextHandler.InstantiateContext(IApplicationContext parent, Object configContext, String contextName, Type contextType, Boolean caseSensitive, String[] resources) +268
Spring.Context.Support.ContextHandler.Create(Object parent, Object configContext, XmlNode section) +265
[ConfigurationErrorsException: Error creating context 'spring.root': Could not load type from string value 'DirectCenter.DAL.UserDao, DirectCenter.DAL'.]
System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult) +202
System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject) +1061
System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) +1431
System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission) +56
System.Configuration.BaseConfigurationRecord.GetSection(String configKey) +8
System.Web.HttpContext.GetSection(String sectionName) +47
System.Web.Configuration.HttpConfigurationSystem.GetSection(String sectionName) +39
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) +50
Spring.Context.Support.WebApplicationContext.GetContextInternal(String virtualPath) +829
Spring.Context.Support.WebApplicationContext.GetRootContext() +84
Spring.Context.Support.WebSupportModule.Init(HttpApplication app) +372
System.Web.HttpApplication.InitModulesCommon() +65
System.Web.HttpApplication.InitModules() +43
System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +729
System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +298
System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +289
版本信息: Microsoft .NET Framework 版本:2.0.50727.4971; ASP.NET 版本:2.0.50727.4971
因为这个刚接触,具体不知道该怎么说。这个问题是我在用HibernateTemplate注入到数据访问类中的时候出错
- 2 回答
- 0 关注
- 612 浏览
添加回答
举报
0/150
提交
取消