Question

We rebuilt the DD4T TBBs from source control and deployed them to tridion using TCMUploadAssembly.exe.

We Created a simple component with a multimedia link field ,a component link field and a text field and populated the values. Then created a CT with [Generate dynamic component, Publish binaries for component ] TBB’s inside it and tried to publish a single DCP.

We are able to run the CT against component in template builder and get the expected output [ i.e well formatted Serialized component XML output]

However when publishing we get a serialization error. (see below) . This error is occurring while the code is trying to serialize any component field (text/multimedia/component link etc)

We are unable to identify the root cause. Tried to remote debug the code , even though all the dynamic.component object properties are correctly set while serializing the component object we are facing this issue. Even tried to restart COM +, publisher services but issue still persists. Any pointers is highly appreciated.

Couldn’t able to find why the code is running correctly in Template builder without serialization errors but failing at publish time with below error.

Here’s the error message:

There was an error generating the XML document.

There was an error generating the XML document.

Object reference not set to an instance of an object.

Component: Templating

Errorcode: 0

User: NORD\DWTMTSUser

StackTrace Information Details:

at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterField.XSArrayInfo.get_Item(Object a, Int32 i)

at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterField.Write13_Field(String n, String ns, Object o, Boolean isNullable, Boolean needType)

at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterField.Write14_Field(Object o)

at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)

at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o)

at DD4T.ContentModel.SerializableDictionary`3.WriteXml(XmlWriter writer) in D:\DW-Source\Mainline\Src\DD4T\DD4T.ContentModel\SerializableDictionary.cs:line 80

at System.Xml.Serialization.XmlSerializationWriter.WriteSerializable(IXmlSerializable serializable, String name, String ns, Boolean isNullable, Boolean wrapped)

at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write13_Component(String n, String ns, Component o, Boolean isNullable, Boolean needType) in :line 0

at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write32_Component(Object o) in :line 0

at Microsoft.Xml.Serialization.GeneratedAssembly.ComponentSerializer.Serialize(Object objectToSerialize, XmlSerializationWriter writer) in :line 0

at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)

at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)

at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle)

at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces)

at DD4T.Templates.Base.BaseComponentTemplate.Transform(Engine engine, Package package) in D:\DW-Source\Mainline\Src\DD4T\DD4T.Templates.Base\BaseComponentTemplate.cs:line 88

at Tridion.ContentManager.Templating.Assembly.AssemblyMediator.Transform(Engine engine, Template template, Package package)

at Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.RunTemplate(Engine engine, Package package, String templateUri, String className)

at Tridion.Templating.CSharpTemplate.CSharpSourceTemplate.Transform(Engine __engine, Package __package)

at Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.Transform(Engine engine, Template template, Package package)

at Tridion.ContentManager.Templating.Engine.ExecuteTemplate(Template template, Package package)

Was it helpful?

Solution

Did Quirijn's answer help you? https://groups.google.com/d/msg/dynamic-delivery-4-tridion/K0BzzPovUz4/1RvTHFHktukJ

Also, if you have multiple publishers make sure you you add the DD4T.Templates.Base.dll to the GAC of all your publishers. (If you've gone for option 2 of Q's answer)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top