Don't miss out Virtual Happy Hour today (April 26).

Try our conversational search powered by Generative AI!

Object reference not set to an instance of an object - While accessing CMS catalog UI

Vote:
 

Hi Team,

I had created a new branch and got the latest code of my application and set all the cofig connections needed. I can see commerece manager application running fine..But when I try to edit/view pages from commerce catalog UI, I see  500 Internal server error for this particlular url: https://electrolux.local/EPiServer/cms/Stores/contentstructure/?referenceId=-2147483642_1_CatalogContent&query=getchildren&market=&includeProperties=true&allLanguages=true&toplevel=true¤tCategory=-2147483642_1_CatalogContent&sort(+typeSortIndex)&dojo.preventCache=1538111333866

When I try opening the same in browser, I see below error details:

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace: 

[NullReferenceException: Object reference not set to an instance of an object.]
   EPiServer.Commerce.Shell.Rest.CatalogContentModelTransform.AddMetaClassName(IDictionary`2 properties, IMetaClass metaClassContent) +48
   EPiServer.Commerce.Shell.Rest.CatalogContentModelTransform.TransformInstance(IModelTransformContext context) +174
   EPiServer.Commerce.Shell.Rest.CatalogContentModelTransform.Execute(IEnumerable`1 models) +279
   EPiServer.Cms.Shell.UI.Rest.ContentStoreModelCreator.CreateContentDataStoreModels(IEnumerable`1 content, DefaultQueryParameters queryParameters) +562
   EPiServer.Cms.Shell.UI.Rest.ContentStructureStore.Get(ContentReference id, String query, ContentReference referenceId, String[] typeIdentifiers, Nullable`1 allLanguages, IEnumerable`1 sortColumns, ItemRange range) +466
   lambda_method(Closure , ControllerBase , Object[] ) +444
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +279
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +34
   System.Web.Mvc.<>c__DisplayClass13.b__10() +79
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +454
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +454
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +658
   EPiServer.Shell.Services.Rest.RestControllerBase.ExecuteCore() +226
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +91
   EPiServer.Shell.Services.Rest.RestHttpHandler.ProcessRequest(HttpContextBase httpContext) +278
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +790
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +88

I see below when I click on the parent node:




Object reference not set to an instance of an object.


Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.



Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:




An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.




Stack Trace:




[NullReferenceException: Object reference not set to an instance of an object.]
EPiServer.Commerce.Shell.Rest.CatalogContentModelTransform.AddMetaClassName(IDictionary`2 properties, IMetaClass metaClassContent) +48
EPiServer.Commerce.Shell.Rest.CatalogContentModelTransform.TransformInstance(IModelTransformContext context) +174
EPiServer.Commerce.Shell.Rest.CatalogContentModelTransform.Execute(IEnumerable`1 models) +279
EPiServer.Cms.Shell.UI.Rest.ContentStoreModelCreator.CreateContentDataStoreModels(IEnumerable`1 content, DefaultQueryParameters queryParameters) +562
EPiServer.Cms.Shell.UI.Rest.ContentStructureStore.Get(ContentReference id, String query, ContentReference referenceId, String[] typeIdentifiers, Nullable`1 allLanguages, IEnumerable`1 sortColumns, ItemRange range) +466
lambda_method(Closure , ControllerBase , Object[] ) +444
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +279
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +34
System.Web.Mvc.<>c__DisplayClass13.<InvokeActionMethodWithFilters>b__10() +79
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +454
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +454
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +658
EPiServer.Shell.Services.Rest.RestControllerBase.ExecuteCore() +226
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +91
EPiServer.Shell.Services.Rest.RestHttpHandler.ProcessRequest(HttpContextBase httpContext) +278
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +790
System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +88





Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3163.0



Can you please look into this issue and let me what could be missing here. Also please let me know if something is not clear on the same.

Thanks,

Niharika

#197294
Sep 28, 2018 7:44
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.