Can you help me out with the following error:

[InvalidOperationException: <page xmlns=''> was not expected.]
   Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderPage.Read17_Page() +382

[InvalidOperationException: There is an error in the XML document.]
   System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) +1435
   System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle) +163
   DD4T.Factories.PageFactory.GetIPageObject(String pageStringContent) +540
   DD4T.Factories.PageFactory.TryFindPage(String url, IPage& page) +1387
   DD4T.Mvc.Controllers.TridionControllerBase.GetModelForPage(String PageId) +241
   DD4T.Mvc.Controllers.TridionControllerBase.Page(String pageId) +83

Any idea why this is happening? The xmlns is not in the broker database.

  • Show your code for GetIPageObject(String pageStringContent) Nov 13 '13 at 19:13
  • 1
    This error means that the XML that was generated isn't valid. Did you generate the XML using the DD4T TBB's? Nov 13 '13 at 19:20
  • Yes I used the TBB's from DD4T, as I mentioned above, the xmlns statement isn't in the broker database, so it can't come from the tbb's or can it? The GetIPageObject is from the DD4T Dll's. It is in the PageFactory.
    – Thijs
    Nov 13 '13 at 19:44
  • 2
    Remove the 'Convert XML to Java' TBB Nov 13 '13 at 20:30
  • 1
    Nice. This TBB is only used in Java projects afaik. Btw, it's a good idea to start with as less TBB's as possible. If you don't have metadata on your components/pages yet, remove the 'Add inherited metadata to page/component' from your template. It saves you a lot of XML and thus performance... Nov 13 '13 at 20:43

As it turned out from the comment from Albert, I had to remove the "Convert XML to Java" TBB from my Page Templates/Component Templates.

Thanks again!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.