views:

177

answers:

1

Hi Friends,

I got following error whenever anything in project is going to be updated. I am unable to understand what this error message trying to tell. can any body help me in to this.

Server Error in '/' Application. Unexpected end of file has occurred. The following elements are not closed: hibernate-configuration. Line 1, position 659. 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.Xml.XmlException: Unexpected end of file has occurred. The following elements are not closed: hibernate-configuration. Line 1, position 659.

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:

[XmlException: Unexpected end of file has occurred. The following elements are not closed: hibernate-configuration. Line 1, position 659.] System.Xml.XmlTextReaderImpl.Throw(Exception e) +76 System.Xml.XmlTextReaderImpl.Throw(String res, String arg) +126 System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String arg) +18 System.Xml.XmlTextReaderImpl.ThrowUnclosedElements() +254 System.Xml.XmlTextReaderImpl.ParseEndElement() +3975442 System.Xml.XmlTextReaderImpl.ParseElementContent() +243 System.Xml.XmlTextReaderImpl.Read() +45 System.Xml.XmlTextReader.Read() +15 System.Xml.XmlCharCheckingReader.Read() +39 System.Xml.XsdValidatingReader.Read() +37 System.Xml.XPath.XPathDocument.LoadFromReader(XmlReader reader, XmlSpace space) +428 System.Xml.XPath.XPathDocument..ctor(XmlReader reader, XmlSpace space) +20 System.Xml.XPath.XPathDocument..ctor(XmlReader reader) +6 NHibernate.Cfg.ConfigurationSchema.HibernateConfiguration..ctor(XmlReader hbConfigurationReader, Boolean fromAppSetting) +80

[HibernateConfigException: An exception occurred during configuration of persistence layer.] NHibernate.Cfg.ConfigurationSchema.HibernateConfiguration..ctor(XmlReader hbConfigurationReader, Boolean fromAppSetting) +127 NHibernate.Cfg.Configuration.Configure(XmlReader textReader) +118 Application.DataModel.NHibernateDataProviderFactory..ctor(DataProviderFactoryInfo factoryInfo) in C:\@Geeks.Coder\NHibernateDataProvider\NHibernateDataProviderFactory.cs:26

[TargetInvocationException: Exception has been thrown by the target of an invocation.] 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 System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1051 System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +111 System.Activator.CreateInstance(Type type, Object[] args) +16 Application.DataModel.Database.RegisterDataProviderFactory(DataProviderFactoryInfo factoryInfo) in C:\@Geeks.Coder\Application.DataModel\DataAccessAPI\Database.ProviderManagement.cs:81 Application.DataModel.Database..cctor() in C:\@Geeks.Coder\Application.DataModel\DataAccessAPI\Database.ProviderManagement.cs:23

[TypeInitializationException: The type initializer for 'Application.DataModel.Database' threw an exception.] Application.DataModel.Database.Save(Entity entity) in C:\@Geeks.Coder\Application.DataModel\DataAccessAPI\Database.Save.cs:26 Application.DataModel.ApplicationEventManager.RecordException(String description, Exception exception) in C:\@Geeks.Coder\Application.DataModel\Auditing\ApplicationEventManager.cs:183

+1  A: 

There is an XML parsing error with the hibernate-configuration element in the config file.

You need to fix the XML so that it is valid and the hibernate-configuration tag is closed properly.

Michael Maddox