Notes from Installing Sitecore Commerce 8.2.1

I followed the installation guide to install Sitecore commerce 8.2.1. Since there are a lot of steps to follow there is a good probability of running into issues, and I did run into a few. Here are some of the issues I ran into and their fixes.

  • Entity Adventure Works Catalog|AW535-11| was not found. I received this error during the initialization of environment using http://localhost:5000/commerceops/InitializeEnvironment(environment=’AdventureWorksShops’),
    • To resolve this I had to run the “Commerce Server Catalog Manager” and manually import the catalog from “/{Site root}/\Website\SitecoreCommerce\Data\Catalog\Catalog.xml” 
    • I also updated imported the inventory catalog from “/{Site root}/\Website\SitecoreCommerce\Data\Inventory\Inventory.xml” 
  • While trying to add to cart I received a similar message “AW200-12 was not found in catalog Adventure Works Catalog”. To fix this I had to make a few changes
    • The first issue was that my SQL instance was missing Full Text Search. The stack trace was
      An exception occurred in the 'CatalogWebService' Web service.  Exception details follow: 
      
      CommerceServer.Core.Catalog.CatalogDatabaseException: Search failed. ---> System.Data.SqlClient.SqlException: Cannot use a CONTAINS or FREETEXT predicate on table or indexed view 'dbo.Adventure Works Catalog_en-US_Catalog' because it is not full-text indexed.
         at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
         at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
         at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
         at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
         at System.Data.SqlClient.SqlDataReader.get_MetaData()
         at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
         at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
         at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
         at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
         at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
         at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
         at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
         at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
         at CommerceServer.Core.Catalog.Internal.SqlHelper.ExecuteDataset(SqlConnection connection, CommandType commandType, String commandText, CatalogDataSetType catalogDataSetType, SqlParameter[] commandParameters, String outParameterName, Object& outParameterValue)
         at CommerceServer.Core.Catalog.Internal.SqlHelper.ExecuteDataset(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters, CatalogDataSetType catalogDataSetType, String outParameterName, Object& outParameterValue)
         at CommerceServer.Core.Catalog.Internal.SqlHelper.ExecuteDataset(ExecutionContext executionContext, String spName, Object[] parameterValues, CatalogDataSetType catalogDataSetType, String outParameterName, Object& outParameterValue)
         at CommerceServer.Core.Catalog.Internal.CommonHelpers.Search(CatalogExecutionContext executionContext, StringCollection catalogsToSearchCollection, String sqlClause, String ftsPhrase, String advancedFtsPhrase, String language, CatalogSearchOptions searchOptions, InventoryOptions inventoryOptions, JoinTableInformation joinTableInformation, String categoryClause, Boolean recursive, Int32& totalRecords, Boolean returnTotalRecords)
         --- End of inner exception stack trace ---
         at CommerceServer.Core.Catalog.Internal.CommonHelpers.Search(CatalogExecutionContext executionContext, StringCollection catalogsToSearchCollection, String sqlClause, String ftsPhrase, String advancedFtsPhrase, String language, CatalogSearchOptions searchOptions, InventoryOptions inventoryOptions, JoinTableInformation joinTableInformation, String categoryClause, Boolean recursive, Int32& totalRecords, Boolean returnTotalRecords)
         at CommerceServer.Core.Catalog.Internal.CatalogContext.Search(CatalogExecutionContext catalogExecutionContext, StringCollection catalogsToSearch, String sqlClause, String ftsPhrase, String advancedftsPhrase, String language, CatalogSearchOptions searchOptions, InventoryOptions inventoryOptions, JoinTableInformation joinTableInformation, String categoryClause, Boolean recursive)
         at CommerceServer.Core.Catalog.Internal.CatalogSearch.Search(Int32& totalRecords, Boolean returnTotalRecords)
         at CommerceServer.Core.Catalog.Internal.CatalogServerContextBase.Search(CatalogSearchParameters catalogSearchParameters, CatalogSearchOptions searchOptions, InventoryOptions inventoryOptions, JoinTableInformation joinTableInformation

       

      To fix this make sure Full-Text Search is installed, and re-import the catalog

    • After the import the friendly error stayed the same but the log files were reporting “Failed to retrieve the AzMan Scope named InventoryCatalog_Adventure Works Inventory” with the stack trace
      An exception occurred in the 'CatalogWebService' Web service.  Exception details follow: 
      
      CommerceServer.Core.Catalog.Internal.ScopeDoesNotExistException: Failed to retrieve the AzMan Scope named InventoryCatalog_Adventure Works Inventory. ---> System.Runtime.InteropServices.COMException: The scope specified was not found. (Exception from HRESULT: 0x8007013E)
         at CommerceServer.Core.Interop.Security.AzRoles.IAzClientContext.AccessCheck(String bstrObjectName, Object varScopeNames, Object varOperations, Object varParameterNames, Object varParameterValues, Object varInterfaceNames, Object varInterfaceFlags, Object varInterfaces)
         at CommerceServer.Core.Internal.AzClientContext.AccessCheck(String auditMessage, Int32[] operationIDs, String scope)
         at CommerceServer.Core.Internal.AzClientContext.AccessCheckSingle(String auditMessage, Int32 operationId, String scope)
         at CommerceServer.Core.Catalog.Internal.CatalogAuthorization.CanUserPerformScopedOperation(AuthorizationScope scope, String entityName, Int32 operationId)
         --- End of inner exception stack trace ---
         at CommerceServer.Core.Catalog.Internal.CatalogAuthorization.CanUserPerformScopedOperation(AuthorizationScope scope, String entityName, Int32 operationId)
         at CommerceServer.Core.Catalog.Internal.InventoryCatalog.GetAssociatedInventoryCatalogProperties(ExecutionContext executionContext, String productCatalogName, Boolean getFromCache, Boolean getReadOnly)
         at CommerceServer.Core.Catalog.Internal.CatalogServerContextBase.GetAssociatedInventoryCatalog(String productCatalogName)
         
         
         
         CommerceServer.Core.ServerFaultException: Failed to retrieve the AzMan Scope named InventoryCatalog_Adventure Works Inventory. ---> System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Failed to retrieve the AzMan Scope named InventoryCatalog_Adventure Works Inventory. ---> CommerceServer.Core.ServerFaultException: Failed to retrieve the AzMan Scope named InventoryCatalog_Adventure Works Inventory.
         --- End of inner exception stack trace ---
         at CommerceServer.Core.Catalog.Internal.WebServiceUtility.PropagateOrLogException(Exception except)
         at CommerceServer.Core.Catalog.Internal.CatalogServerContextBase.GetAssociatedInventoryCatalog(String productCatalogName)
         at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
         at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
         at CommerceServer.Core.Catalog.WebService.Proxies.CatalogWebService.AuthorizedInvoke(String methodName, Object[] parameters)
         --- End of inner exception stack trace ---
         at CommerceServer.Core.ServiceAgent.TryHandleWebMethodException(Exception ex, SoapHttpClientProtocol serviceProxy)
         at CommerceServer.Core.Catalog.WebService.Proxies.CatalogWebService.AuthorizedInvoke(String methodName, Object[] parameters)
         at CommerceServer.Core.Catalog.WebService.Proxies.CatalogWebService.GetAssociatedInventoryCatalog(String productCatalogName)
         at CommerceServer.Core.Inventory.InventoryContext.GetAssociatedInventoryCatalog(String productCatalogName)
         at CommerceServer.Core.UI.CatalogManager.CatalogCache.GetAssociatedInventoryCatalog(String productCatalogName)
         at CommerceServer.Core.UI.CatalogManager.CatalogItemObject.CreateInventoryPropertyStore()
         at CommerceServer.Core.UI.CatalogManager.CatalogItemObject.InitializeProperties(String definitionName)
         at CommerceServer.Core.UI.CatalogManager.CatalogItemObject.set_DefinitionName(String value)
         at CommerceServer.Core.UI.CatalogManager.CatalogItemObject.InitializeMembers()
         at CommerceServer.Core.UI.CatalogManager.CatalogItemObject.Get(CatalogItemTaskArguments taskArguments, Boolean getObjectFromCache)
         at CommerceServer.Core.UI.CatalogManager.CatalogItemController.SetObject(TaskArguments taskArguments, Boolean getObjectFromCache)
         at CommerceServer.Core.UI.CatalogManager.CatalogManagerController.EnterTask(TaskArgumentsHolder taskArgumentsHolder)
         at CommerceServer.Core.UI.UIProcess.GraphNavigator.StartTask(TaskArgumentsHolder holder)
         at CommerceServer.Core.UI.UIProcess.UIPManager.StartNavigationTask(String navigationGraph, TaskArgumentsHolder args)
         at CommerceServer.Core.UI.CatalogManager.CatalogManager.ShowEditProductDialog()

      To fix this I had to reassign the roles. following step #3 from http://commercesdn.sitecore.net/SitecoreCommerce/DeploymentGuide/en-us/index.html#Concepts/c_SC_SetUpCommerceServerSite.html

    • Assign the roles inside Windows Authorization Stores for web service identity
      • Grant-CSCatalogWebServicePermissions –File “C:\inetpub\wwwroot\csservices\CFSolutionStorefrontsite_CatalogWebService\CatalogAuthorizationStore.xml” -Identity “CSFndRuntimeUser” -Role “Administrator”
      • Grant-CSProfilesWebServicePermissions –File “C:\inetpub\wwwroot\csservices\CFSolutionStorefrontsite_ProfilesWebService\ProfilesAuthorizationStore.xml” -Identity “CSFndRuntimeUser” -Role “ProfileAdministrator”
Notes from Installing Sitecore Commerce 8.2.1

One thought on “Notes from Installing Sitecore Commerce 8.2.1

Leave a Reply

Your email address will not be published. Required fields are marked *