Failed to deserialize and resume task

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
8/14/2009 3:24:46 PM
Gravatar
Total Posts 18

Failed to deserialize and resume task

Hi Joe,

i have the following errors in the log. The Problem occurs when we try to register a new user with eMail-Message to the admin (<add key="NotifyAdminsOnNewUserRegistration" value="true" />)

Do you know what i can do? ( mojoPortal Version 2.2.9.6 MSSQL ).

 

2009-08-14 22:09:04,240 ERROR mojoPortal.Web.WebTaskManager - Failed to deserialize and resume task
2009-08-14 22:09:19,239 ERROR mojoPortal.Web.WebTaskManager - Failed to deserialize and resume task
2009-08-14 22:09:34,237 ERROR mojoPortal.Web.WebTaskManager - Failed to deserialize and resume task
2009-08-14 22:09:39,893 ERROR mojoPortal.Business.WebHelpers.IndexWriterTask - System.InvalidOperationException: Fehler im XML-Dokument (170,-323). ---> System.Xml.XmlException: ' ', hexidezimaler Wert 0x0B, ist ein ungültiges Zeichen. Zeile 170, Position -323.
bei System.Xml.XmlTextReaderImpl.Throw(Exception e)
bei System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
bei System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String[] args)
bei System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Int32 pos, Char invChar)
bei System.Xml.XmlTextReaderImpl.ParseNumericCharRefInline(Int32 startPos, Boolean expand, BufferBuilder internalSubsetBuilder, Int32& charCount, EntityType& entityType)
bei System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
bei System.Xml.XmlTextReaderImpl.ParseText()
bei System.Xml.XmlTextReaderImpl.ParseElementContent()
bei System.Xml.XmlTextReaderImpl.Read()
bei System.Xml.XmlTextReader.Read()
bei System.Xml.XmlReader.ReadElementString()
bei Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderIndexItem.Read2_IndexItem(Boolean isNullable, Boolean checkType)
bei Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderIndexItem.Read3_IndexItem()
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
bei System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader)
bei mojoPortal.Business.SerializationHelper.DeserializeFromString(Type type, String serializedObject)
bei mojoPortal.Business.WebHelpers.IndexWriterTask.ProcessQueue(DataTable q, String indexPath)
2009-08-14 22:09:49,237 ERROR mojoPortal.Web.WebTaskManager - Failed to deserialize and resume task
2009-08-14 22:10:04,237 ERROR mojoPortal.Web.WebTaskManager - Failed to deserialize and resume task
2009-08-14 22:10:19,237 ERROR mojoPortal.Web.WebTaskManager - Failed to deserialize and resume task
2009-08-14 22:10:32,018 ERROR mojoPortal.Business.WebHelpers.IndexWriterTask - System.InvalidOperationException: Fehler im XML-Dokument (170,-323). ---> System.Xml.XmlException: ' ', hexidezimaler Wert 0x0B, ist ein ungültiges Zeichen. Zeile 170, Position -323.
bei System.Xml.XmlTextReaderImpl.Throw(Exception e)
bei System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
bei System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String[] args)
bei System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Int32 pos, Char invChar)
bei System.Xml.XmlTextReaderImpl.ParseNumericCharRefInline(Int32 startPos, Boolean expand, BufferBuilder internalSubsetBuilder, Int32& charCount, EntityType& entityType)
bei System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
bei System.Xml.XmlTextReaderImpl.ParseText()
bei System.Xml.XmlTextReaderImpl.ParseElementContent()
bei System.Xml.XmlTextReaderImpl.Read()
bei System.Xml.XmlTextReader.Read()
bei System.Xml.XmlReader.ReadElementString()
bei Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderIndexItem.Read2_IndexItem(Boolean isNullable, Boolean checkType)
bei Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderIndexItem.Read3_IndexItem()
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
bei System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader)
bei mojoPortal.Business.SerializationHelper.DeserializeFromString(Type type, String serializedObject)
bei mojoPortal.Business.WebHelpers.IndexWriterTask.ProcessQueue(DataTable q, String indexPath)
2009-08-14 22:10:34,237 ERROR mojoPortal.Web.WebTaskManager - Failed to deserialize and resume task
2009-08-14 22:10:49,252 ERROR mojoPortal.Web.WebTaskManager - Failed to deserialize and resume task
2009-08-14 22:10:58,846 ERROR mojoPortal.Web.mojoBasePage - 192.168.10.2-de-DE - /Secure/Register.aspx
550 5.1.1 User unknown

2009-08-14 22:10:58,846 ERROR mojoPortal.Web.Global - 192.168.10.2-de-DE - /Secure/Register.aspx
550 5.1.1 User unknown

2009-08-14 22:11:04,252 ERROR mojoPortal.Web.WebTaskManager - Failed to deserialize and resume task
2009-08-14 22:11:19,252 ERROR mojoPortal.Web.WebTaskManager - Failed to deserialize and resume task
2009-08-14 22:11:22,033 ERROR mojoPortal.Business.WebHelpers.IndexWriterTask - System.InvalidOperationException: Fehler im XML-Dokument (170,-323). ---> System.Xml.XmlException: ' ', hexidezimaler Wert 0x0B, ist ein ungültiges Zeichen. Zeile 170, Position -323.
bei System.Xml.XmlTextReaderImpl.Throw(Exception e)
bei System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
bei System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String[] args)
bei System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Int32 pos, Char invChar)
bei System.Xml.XmlTextReaderImpl.ParseNumericCharRefInline(Int32 startPos, Boolean expand, BufferBuilder internalSubsetBuilder, Int32& charCount, EntityType& entityType)
bei System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
bei System.Xml.XmlTextReaderImpl.ParseText()
bei System.Xml.XmlTextReaderImpl.ParseElementContent()
bei System.Xml.XmlTextReaderImpl.Read()
bei System.Xml.XmlTextReader.Read()
bei System.Xml.XmlReader.ReadElementString()
bei Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderIndexItem.Read2_IndexItem(Boolean isNullable, Boolean checkType)
bei Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderIndexItem.Read3_IndexItem()
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
bei System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader)
bei mojoPortal.Business.SerializationHelper.DeserializeFromString(Type type, String serializedObject)
bei mojoPortal.Business.WebHelpers.IndexWriterTask.ProcessQueue(DataTable q, String indexPath)
2009-08-14 22:11:34,252 ERROR mojoPortal.Web.WebTaskManager - Failed to deserialize and resume task
2009-08-14 22:11:49,267 ERROR mojoPortal.Web.WebTaskManager - Failed to deserialize and resume task
 

8/14/2009 3:31:00 PM
Gravatar
Total Posts 18

Re: Failed to deserialize and resume task

Hello again,

i just followed this thread but it did not help :-(

http://www.mojoportal.com/Forums/Thread.aspx?pageid=5&mid=34&ItemID=2&thread=2471&postid=10489

Klaus

8/15/2009 5:27:29 AM
Gravatar
Total Posts 18439

Re: Failed to deserialize and resume task

Hi Klaus,

I figured out what was causing that and fixed it in recent versions.

Basically the problem was related to localizing the taskname before serializing the task. So whatever user interaction was triggerring the task, like a forum post from a user with their language preference set to something other than english in the browser. The task would get serialized with the localized name because the user thread was running in a specific culture based on their broswer settings. But then the background thread would try to deserialize the task and the special characters would cause a problem probably because the background thread that tasks run on is not using the same culture that the task was serialized using.

So I removed the localization on the task names and just use the english labels. Since doing that I have not encountered this error anymore. 

Therefore I believe if you upgrade to the latest version it will solve the problem.

Hope it helps,

Joe

8/15/2009 6:03:31 AM
Gravatar
Total Posts 18439

Re: Failed to deserialize and resume task

Hi Klaus,

Now this is interesting. I checked my log just now and its full of the same error. So I opened the mp_IndexingQueue table to see what the problem was and it trurns out to be this very post. When you post this error, because the content includes this "&#xB;" and "0x0B" which is part of the error, it causes the same error on my site when it tries to deserialize the task that would add the content of this post into the search index. I have error handling wrapped around it in current version so the error is caught and logged. A little googling found this, which seems to indicate several character strings not allowed in xml. So the consequence is that this thread is not in the search index. The serialized IndexItem stays in the mp_IndexingQueue so every time the IndexWriter task runs it continues to try and process this item and each time it throws the error which is trapped and logged.

I am researching it further to figure out a strategy to prevent this error. Probbably have to add some filtering to the content before serializing the item.

Best,

Joe

8/15/2009 7:58:05 AM
Gravatar
Total Posts 18439

Re: Failed to deserialize and resume task

Hi Klaus,

I was able to produce and fix this problem on my local machine by pasting your error into forums on my local machine. 

It will be fixed in the next release and will be fixed in svn trunk by tonight.

Its really not related to the user registration notification other than when the notification queues an email task to send to the admins StartOrResumeTasks is called and the unfinished IndexWriter task tries again to index the bad item from the mp_IndexingQueue table.

Best,

Joe

8/15/2009 9:12:23 AM
Gravatar
Total Posts 18

Re: Failed to deserialize and resume task

Hi Joe,

ok, that sounds good; Thanks for the quick fix.

We will update the Portal from source next week.

Klaus

You must sign in to post in the forums. This thread is closed to new posts.