Kentico 9 Continuous Integration Error

187 views Asked by At

I'm working on the Kentico E-commerce project, it was moved from 8.2.48 version to 9.0.50 for the purpose of using Continuous Integration feature, but there is an error now:

Message: Serialization of object type @Product tax class@ (ECommerce.SKUTaxClass) failed for object @551, 2@ ([Unknown]: 0). See inner exception for further details.

    Exception type: CMS.ContinuousIntegration.ObjectTypeSerializationException
    Stack Trace: 
    at CMS.ContinuousIntegration.Internal.FileSystemStoreAllJob.StoreSingleObjectTypeObject(FileSystemStoreJob storeJob, ObjectTypeInfo typeInfo, String objectType, BaseInfo info, Int32 counter, Int32 total)
    at CMS.ContinuousIntegration.Internal.FileSystemStoreAllJob.@@c__DisplayClass6.@StoreAllObjectTypeObjects@b__3(BaseInfo info)
    at CMS.ContinuousIntegration.Internal.AbstractFileSystemJob.CancellableForEach[T](CancellationToken cancellationToken, IEnumerable`1 collection, Action`2 action)
    at CMS.ContinuousIntegration.Internal.AbstractFileSystemJob.CancellableForEach[T](CancellationToken cancellationToken, IEnumerable`1 collection, Action`1 action)
    at CMS.ContinuousIntegration.Internal.FileSystemStoreAllJob.StoreAllObjectTypeObjects(String objectType, Int32 counter, Int32 total)
    at CMS.ContinuousIntegration.Internal.AbstractFileSystemJob.CancellableForEach[T](CancellationToken cancellationToken, IEnumerable`1 collection, Action`2 action)
    at CMS.ContinuousIntegration.Internal.FileSystemStoreAllJob.StoreObjects()
    at CMS.ContinuousIntegration.Internal.FileSystemStoreAllJob.RunInternal(CancellationToken cancellationToken)
    at CMS.ContinuousIntegration.Internal.AbstractFileSystemAllJob.Run(Nullable`1 cancellationToken)

    Message: Serialization of the object CMS.Ecommerce.SKUTaxClassInfo (ecommerce.skutaxclass) has failed.

    Exception type: CMS.ContinuousIntegration.ObjectSerializationException
    Stack Trace: 
    at CMS.ContinuousIntegration.Internal.AbstractSingleObjectJob.Run(BaseInfo baseInfo)
    at CMS.ContinuousIntegration.Internal.FileSystemStoreAllJob.StoreSingleObjectTypeObject(FileSystemStoreJob storeJob, ObjectTypeInfo typeInfo, String objectType, BaseInfo info, Int32 counter, Int32 total)

    Message: Missing site ID value for object AAA. Object type does not support global objects.

    Exception type: System.Exception
    Stack Trace: 
    at CMS.DataEngine.TranslationReferenceLoader.LoadFromInfoObject(BaseInfo info)
    at CMS.ContinuousIntegration.FileSystemBindingsProcessor.CreateParentElement(XmlNode rootElement, BaseInfo parent)
    at CMS.ContinuousIntegration.FileSystemBindingsProcessor.PrepareNewDocument(String relativePath, BaseInfo parent, String rootElementName)
    at CMS.ContinuousIntegration.CachedFileSystemBindingsProcessor.PrepareNewDocument(String relativePath, BaseInfo parent, String rootElementName)
    at CMS.ContinuousIntegration.FileSystemBindingsProcessor.AppendBindingInternal(BaseInfo binding, String relativePath)
    at CMS.ContinuousIntegration.CachedFileSystemBindingsProcessor.AppendBindingInternal(BaseInfo binding, String relativePath)
    at CMS.ContinuousIntegration.Internal.FileSystemStoreJob.StoreBaseInfo(BaseInfo baseInfo, String relativePath)
    at CMS.ContinuousIntegration.Internal.AbstractSingleObjectJob.Run(BaseInfo baseInfo)

The object AAA is a Product option for the product which set as (global) and used in 2 sites. So these objects were set as global by Kentico admin ui and I do not understand why CI can't deal with them as is?

p.s. I'm super new to the Kentico and really need your help (:

2

There are 2 answers

0
pmazaleu On BEST ANSWER

In short, place this class (or use the attached file directly) anywhere into (Old)App_Code folder in your project. The application will restart (upon a codefile change) and the CI should be working correctly.

using CMS.Base;
using CMS.Ecommerce; 
using CMS.DataEngine; 
[SystemObjectCustomizationLoader] public partial class CMSModuleLoader {
        /// <summary>
        /// Custom attribute class for the CMSModuleLoader.
        /// </summary>
        private class SystemObjectCustomizationLoaderAttribute : CMSLoaderAttribute
        {
            /// <summary>
            /// Called automatically when the application starts.
            /// </summary>
            public override void Init()
            {
                // Allows global objects support for product options and variants. Fixes issue with CI serialization of global products with options or global variants having global taxes. 
                SKUInfo.TYPEINFOOPTIONSKU.SupportsGlobalObjects = true;
                SKUInfo.TYPEINFOVARIANT.SupportsGlobalObjects = true;
            }
        } }

(с) Zdenek Cetkovsky, E-Commerce Senior Support Specialist

7
Roman Hutnyk On

Very last message states:

Message: Missing site ID value for object AAA.

So try to assing that option to your site(s).