3

I have installed a Sitecore 9 Update 1 and using Solr 6.6.2 for our ContentSearch. However when I've tried to create a contact on an empty List under List Manager but I am getting an error. Below is the details I've found on the log file. Any idea if there something I missed on my installation?

ERROR [Sitecore Services]: HTTP POST URL http://sc9u1/sitecore/api/lists/8aee5dca-bc25-471a-a893-3524e58b48ce/contacts

Exception Sitecore.XConnect.XdbCollectionUnavailableException: {"Message":"An error has occurred.","ExceptionMessage":"An error occurred when trying to create a controller of type 'ContactsController'. Make sure that the controller has a parameterless public constructor.","ExceptionType":"System.InvalidOperationException","StackTrace":"

at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)
at Sitecore.XConnect.Web.DependencyInjection.WebApiServiceControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType) at System.Web.Http.Controllers.HttpControllerDescriptor.CreateController(HttpRequestMessage request) at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()","InnerException":{"Message":"An error has occurred.","ExceptionMessage":"Type 'Sitecore.XConnect.Web.Controllers.ContactsController' does not have a default constructor","ExceptionType":"System.ArgumentException","StackTrace":" at System.Linq.Expressions.Expression.New(Type type) at System.Web.Http.Internal.TypeActivator.Create[TBase](Type instanceType) at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.GetInstanceOrActivator(HttpRequestMessage request, Type controllerType, Func1& activator)at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)"}} at Sitecore.Xdb.Common.Web.Synchronous.SynchronousExtensions.SuspendContextLock[TResult](Func1 taskFactory) at Sitecore.XConnect.Client.XConnectSynchronousExtensions.SuspendContextLock[TResult](Func1 taskFactory) at Sitecore.ListManagement.XConnect.SubscriptionService.<>c__DisplayClass2_0.b__0(IXdbContext client) at Sitecore.ListManagement.XConnect.XdbRequestPerformer.RequestWithRetry(Action1 action, String actionMessage) at Sitecore.ListManagement.XConnect.SubscriptionService.CreateSubscribedContact(Guid listId, String identifier, String source, String firstName, String lastName, String email) at Sitecore.ListManagement.Services.Repositories.ListSubscriptionsStore.CreateSubscribedContact(Guid listId, ContactDataModel contactDataModel) at Sitecore.ListManagement.Services.Controllers.ContactsController.CreateEntity(Guid listId, ContactDataModel contactDataModel) at lambda_method(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.b__9(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)

2
  • can you verify connection to xconnect, connection to databases ? Feb 1, 2018 at 12:00
  • That typically means an error resolving one of the dependencies for that controller in XConnect. So typically something with the search or data providers. Try increasing the logging level in XConnect to get find extra details on what might be going wrong.
    – eglasius
    Feb 1, 2018 at 19:19

1 Answer 1

0

I was able to resolve this by doing the following. Thanks to this post which I also refer. https://blog.wesleylomax.co.uk/2017/11/01/solrcore-initialization-failures-xconnect-sitecore-9/

  1. Restart (SiteName).xconnect Site in IIS.
  2. Stop Solr.
  3. Delete the core "sitecore_xdb" in the file system of Solr.
  4. Add the core "sitecore_xdb" folder again with the default items in /conf and data in the file system.
  5. Add the core again on the https://localhost:8983/solr/#/~cores/ and map the create folder.
  6. Start Solr.
  7. Run C:\inetpub\wwwroot\(SiteName).xconnect\App_data\jobs\continuous\IndexWorker\XConnectSearchIndexer.exe

After doing the things above I am now able to create contact on List Manager.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.