首页 新闻 赞助 找找看

用户代码未处理 System.Configuration.ConfigurationErrorsException

0
悬赏园豆:50 [待解决问题]

用户代码未处理 System.Configuration.ConfigurationErrorsException
  Message=Error creating context 'spring.root': 值“-1”对 PositiveInteger 不是太大就是太小。

Source=System.Configuration
  BareMessage=Error creating context 'spring.root': 值“-1”对 PositiveInteger 不是太大就是太小。
  Line=0
  StackTrace:
       在 System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)
       在 System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
       在 System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
       在 System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
       在 System.Web.HttpContext.GetSection(String sectionName)
       在 System.Web.Configuration.HttpConfigurationSystem.GetSection(String sectionName)
       在 System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey)
       在 System.Configuration.ConfigurationManager.GetSection(String sectionName)
       在 Spring.Util.ConfigurationUtils.GetSection(String sectionName)
       在 Spring.Context.Support.ContextRegistry.InitializeContextIfNeeded()
       在 Spring.Context.Support.ContextRegistry.GetContext()
       在 _Default.Page_Load(Object sender, EventArgs e) 位置 d:\ProRecord_D01_2012\ProRecord_D01\D01.Web\Default.aspx.cs:行号 17
       在 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
       在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
       在 System.Web.UI.Control.OnLoad(EventArgs e)
       在 System.Web.UI.Control.LoadRecursive()
       在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  InnerException: Spring.Objects.Factory.ObjectCreationException
       Message=Error creating object with name 'NHibernateSessionFactory' defined in 'assembly [D01.DAO, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null], resource [D01.DAO.Config.DaoBase.xml] line 14' : Initialization of object failed : D01.Domain.HBMXML.t_sd01_TenderUp.hbm.xml(8,61): XML validation error: “length”特性无效 - 根据数据类型“http://www.w3.org/2001/XMLSchema:positiveInteger”,值“-1”无效 - 值“-1”对 PositiveInteger 不是太大就是太小。
       Source=Spring.Core
       ObjectName=NHibernateSessionFactory
       ResourceDescription=assembly [D01.DAO, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null], resource [D01.DAO.Config.DaoBase.xml] line 14
       StackTrace:
            在 Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.InstantiateObject(String name, RootObjectDefinition definition, Object[] arguments, Boolean allowEagerCaching, Boolean suppressConfigure)
            在 Spring.Objects.Factory.Support.AbstractObjectFactory.CreateAndCacheSingletonInstance(String objectName, RootObjectDefinition objectDefinition, Object[] arguments)
            在 Spring.Objects.Factory.Support.AbstractObjectFactory.GetObjectInternal(String name, Type requiredType, Object[] arguments, Boolean suppressConfigure)
            在 Spring.Objects.Factory.Support.AbstractObjectFactory.GetObject(String name)
            在 Spring.Objects.Factory.Support.DefaultListableObjectFactory.PreInstantiateSingletons()
            在 Spring.Context.Support.AbstractApplicationContext.Refresh()
            在 Spring.Context.Support.XmlApplicationContext..ctor(XmlApplicationContextArgs args)
            在 Spring.Context.Support.XmlApplicationContext..ctor(String name, Boolean caseSensitive, String[] configurationLocations)
            在 _dynamic_Spring.Context.Support.XmlApplicationContext..ctor(Object[] )
            在 Spring.Reflection.Dynamic.SafeConstructor.Invoke(Object[] arguments)
            在 Spring.Context.Support.ContextHandler.RootContextInstantiator.InvokeContextConstructor(ConstructorInfo ctor)
            在 Spring.Context.Support.ContextHandler.ContextInstantiator.InstantiateContext()
            在 Spring.Context.Support.ContextHandler.InstantiateContext(IApplicationContext parentContext, Object configContext, String contextName, Type contextType, Boolean caseSensitive, String[] resources)
            在 Spring.Context.Support.ContextHandler.Create(Object parent, Object configContext, XmlNode section)
       InnerException: NHibernate.MappingException
            Message=D01.Domain.HBMXML.t_sd01_TenderUp.hbm.xml(8,61): XML validation error: “length”特性无效 - 根据数据类型“http://www.w3.org/2001/XMLSchema:positiveInteger”,值“-1”无效 - 值“-1”对 PositiveInteger 不是太大就是太小。
            Source=NHibernate
            StackTrace:
                 在 NHibernate.Cfg.Configuration.LogAndThrow(Exception exception)
                 在 NHibernate.Cfg.Configuration.ValidationHandler(Object o, ValidationEventArgs args)
                 在 System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(XmlSchemaValidationException e, XmlSeverityType severity)
                 在 System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(String code, String[] args, Exception innerException)
                 在 System.Xml.Schema.XmlSchemaValidator.CheckAttributeValue(Object value, SchemaAttDef attdef)
                 在 System.Xml.Schema.XmlSchemaValidator.ValidateAttribute(String lName, String ns, XmlValueGetter attributeValueGetter, String attributeStringValue, XmlSchemaInfo schemaInfo)
                 在 System.Xml.Schema.XmlSchemaValidator.ValidateAttribute(String localName, String namespaceUri, XmlValueGetter attributeValue, XmlSchemaInfo schemaInfo)
                 在 System.Xml.XsdValidatingReader.ValidateAttributes()
                 在 System.Xml.XsdValidatingReader.ProcessElementEvent()
                 在 System.Xml.XsdValidatingReader.ProcessReaderEvent()
                 在 System.Xml.XsdValidatingReader.Read()
                 在 System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
                 在 System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
                 在 System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
                 在 System.Xml.XmlDocument.Load(XmlReader reader)
                 在 NHibernate.Cfg.Configuration.LoadMappingDocument(XmlReader hbmReader, String name)
                 在 NHibernate.Cfg.Configuration.AddXmlReader(XmlReader hbmReader, String name)
                 在 NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream, String name)
                 在 NHibernate.Cfg.Configuration.AddResource(String path, Assembly assembly)
                 在 NHibernate.Cfg.Configuration.AddAssembly(Assembly assembly)
                 在 NHibernate.Cfg.Configuration.AddAssembly(String assemblyName)
                 在 Spring.Data.NHibernate.LocalSessionFactoryObject.AfterPropertiesSet()
                 在 Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.InvokeInitMethods(Object target, String name, IConfigurableObjectDefinition definition)
                 在 Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.ConfigureObject(String name, RootObjectDefinition definition, IObjectWrapper wrapper)
                 在 Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.InstantiateObject(String name, RootObjectDefinition definition, Object[] arguments, Boolean allowEagerCaching, Boolean suppressConfigure)
            InnerException: System.Xml.Schema.XmlSchemaValidationException
                 Message=“length”特性无效 - 根据数据类型“http://www.w3.org/2001/XMLSchema:positiveInteger”,值“-1”无效 - 值“-1”对 PositiveInteger 不是太大就是太小。
                 LineNumber=8
                 LinePosition=61
                 SourceUri=""
                 InnerException: System.OverflowException
                      Message=值“-1”对 PositiveInteger 不是太大就是太小。
                      InnerException:

 

 

 

我是spring.net+NHibernate的结构报这个错是什么意思?如何解决?

清风续的主页 清风续 | 初学一级 | 园豆:152
提问于:2013-01-05 11:58
< >
分享
所有回答(1)
0

PositiveInteger 应该是最小是1 吧

chenping2008 | 园豆:9836 (大侠五级) | 2013-01-05 13:16

PositiveInteger 这个不是变量。

支持(0) 反对(0) 清风续 | 园豆:152 (初学一级) | 2013-01-05 13:24

@清风续: 从这个单词的字面量上理解应该是正数

支持(0) 反对(0) chenping2008 | 园豆:9836 (大侠五级) | 2013-01-05 13:34

@chenping2008: 你说这个错是怎么回事呢?是没有搜索到xml文件?

支持(0) 反对(0) 清风续 | 园豆:152 (初学一级) | 2013-01-05 13:45
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册