All project content is available for reading, but you need to be a member of the project for Subversion checkout of source code, or to create/modify any information.
Login if you are a member. Apply here to request membership (open to all).

Ticket #66 (new enhancement)

Opened 10 years ago

Last modified 10 years ago

Event log errors on update

Reported by: thomas.haug@… Owned by: sveinung@…
Priority: minor Component: ManageLanguages
Keywords: Cc:


When updating an existing text a customer gets the following error in the Application event-log;

An unhandled exception occurred and the process was terminated.

Application ID: /LM/W3SVC/2/Root

Process ID: 3220

Exception: System.Exception

Message: Error "Root element is missing." while parsing language file "E:\wwwroot\lang\AHO.Web.xml"

StackTrace:    at EPiServer.Core.LanguageManager.ReadLanguageFiles(DirectoryInfo dir, String ignoreFile)
   at EPiServer.Core.LanguageManager.Reload(String ignoreFile)
   at EPiServer.Core.LanguageManager.LanguageFiles_GenericUpdate(Object source, FileSystemEventArgs e)
   at System.IO.FileSystemWatcher.OnChanged(FileSystemEventArgs e)
   at System.IO.FileSystemWatcher.NotifyFileSystemEventArgs(Int32 action, String name)
   at System.IO.FileSystemWatcher.CompletionStatusChanged(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* overlappedPointer)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

InnerException: System.Xml.XmlException

Message: Root element is missing.

StackTrace:    at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlTextReader.Read()
   at EPiServer.Core.LanguageDocument.Load(Stream fileStream)
   at EPiServer.Core.LanguageManager.ReadLanguageFiles(DirectoryInfo dir, String ignoreFile)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Subsequently the following error appears;

EventType clr20r3, P1 w3wp.exe, P2 6.0.3790.3959, P3 45d6968e, P4 episerver, P5 5.1.422.256, P6 48037c43, P7 77d, P8 95, P9 system.exception, P10 NIL.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

From the user interface of Manage Languages everything seems ok. The changes are saved. I can also edit the exact same file on my own laptop with no errors. That might indicate a timing problem on fast multi CPU servers where the language manager tries to reload the file before it's completely written. Something to investigate on a rainy day :)

Change History

comment:1 Changed 10 years ago by steve@…

Is the saving done in several steps? The first Save will trigger the reload of the lang files.

A possible workaround is to write to another extension than .xml and when done with all file manipulation, delete and rename (and hope it is fast enough.)

Note: See HelpUser/Tickets for help on using tickets.