Skip to main content
4 of 4
added 80 characters in body

Glass.Mapper.Sc.SitecoreService.Create fails

We upgraded from sitecore 7.2 to 8.2 and glass mapper from 4.0.9.60 to 4.4.0.199/4.4.1.331-beta. After upgrade, new SitecoreService("master").Create<SC.EW.Models.ViewModels.Resource, Item>(folderItem, name, language) is failing with below exception messages. Below is full stack trace.
Resource class : https://www.dropbox.com/s/qu3qgneupw2xdym/Resource.cs?dl=0
GlassBase class: https://www.dropbox.com/s/lk8w4d66v20o32a/EWGlassBase.cs?dl=0

Exception messages: 1.Failed to find configuration for parent item type Sitecore.Data.Items.Item at base.GlassContext.GetTypeConfiguration(parent, false, true)
2.The type Sitecore.Collections.ChildList does not contain any generic arguments
Sitecore Config: https://www.dropbox.com/s/xi8xy587k7krao2/ew%20norm.showconfig.xml?dl=0

15016 19:03:10 ERROR EW Exception on ItemService.Create. Path: /sitecore/content/EmpowerWomen/Home/Resources/Documents/2017/12, Name: testtest, Language: en. Exception: Glass.Mapper.MapperException Message: Failed to find configuration for parent item type Sitecore.Data.Items.Item Source: Glass.Mapper.Sc at Glass.Mapper.Sc.SitecoreService.Create[T,TK](TK parent, String newName, Language language, Boolean updateStatistics, Boolean silent) at UNWomen.SC.EW.Core.Services.ItemService.Create[T](String path, String name, Language language, Boolean useYearMonthFolders, Boolean checkDuplicatedName) in C:\Source\Repos\UNWSitecore\UNWomen.SC.EW.Core\Services\ItemService.cs:line 43

Nested Exception

Exception: Glass.Mapper.MapperException Message: The type Sitecore.Collections.ChildList does not contain any generic arguments Source: Glass.Mapper at Glass.Mapper.Utilities.GetGenericArgument(Type type) at Glass.Mapper.Sc.DataMappers.SitecoreChildrenMapper.Setup(DataMapperResolverArgs args) at Glass.Mapper.Pipelines.DataMapperResolver.Tasks.DataMapperStandardResolverTask.Execute(DataMapperResolverArgs args) at Glass.Mapper.Pipelines.AbstractPipelineRunner2.<>c__DisplayClass8.<.ctor>b__1(T args) at Glass.Mapper.Pipelines.AbstractPipelineTask1.Next(T args) at Glass.Mapper.Pipelines.AbstractPipelineRunner2.Run(T args) at Glass.Mapper.Context.ProcessProperties(IEnumerable1 properties) at Glass.Mapper.Context.Load(IConfigurationLoader[] loaders) at Glass.Mapper.Context.GetTypeConfigurationFromType[T](Type type, Boolean doNotLoad, Boolean checkBase) at Glass.Mapper.Sc.SitecoreService.Create[T,TK](TK parent, String newName, Language language, Boolean updateStatistics, Boolean silent)