Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Merijn van Mourik 58 posts 128 karma points
    May 02, 2013 @ 15:45
    Merijn van Mourik
    0

    TC.HasCurrentOrder throws error

    Hi,

    I was testing order creation/finalizing with teacommerce, suddenly this error while calling TC.HasCurrentOrder(1) from a SurfaceController.

    Also the TeaCommerce backoffice panel doesn't show content anymore. Any idea?

    I'm running 2.1.0.

    Merijn

    <edit>Just noticed also the store picker throws this error.  I'll backup database/files and reinstall teacommerce let's see what happens.</edit>

     

     

    [ArgumentNullException: Value cannot be null.
    Parameter name: context]
       Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters) +262
       Autofac.ResolutionExtensions.Resolve(IComponentContext context, IEnumerable`1 parameters) +117
       TeaCommerce.Api.Web.SessionController.GetCookieValue(Int64 storeId, String key) +202
       TeaCommerce.Api.Web.SessionController.CheckAndMoveOrderIds(Int64 storeId) +214
       TeaCommerce.Api.Web.TeaCommerceHelper.HasCurrentOrder(Int64 storeId) +180
       doecadeau.Controllers.SurfaceControllers.ETicketsSurfaceController.ShowBestelTicketsKnop(String doedingId) in c:\Projects\doecadeau\Source\doecadeau2\Controllers\SurfaceControllers\ETicketsSurfaceController.cs:20
       lambda_method(Closure , ControllerBase , Object[] ) +127
       System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +261
       System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +39
       System.Web.Mvc.Async.<>c__DisplayClass42.b__41() +34
       System.Web.Mvc.Async.<>c__DisplayClass39.b__33() +124
       System.Web.Mvc.Async.<>c__DisplayClass4f.b__49() +838059
       System.Web.Mvc.Async.<>c__DisplayClass4f.b__49() +838059
       System.Web.Mvc.Async.<>c__DisplayClass37.b__36(IAsyncResult asyncResult) +15
       System.Web.Mvc.Async.<>c__DisplayClass2a.b__20() +33
       System.Web.Mvc.Async.<>c__DisplayClass25.b__22(IAsyncResult asyncResult) +838644
       System.Web.Mvc.<>c__DisplayClass1d.b__18(IAsyncResult asyncResult) +28
       System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +15
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +65
       System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +15
       System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +51
       System.Web.Mvc.<>c__DisplayClass8.b__3(IAsyncResult asyncResult) +42
       System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +15
       System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +51
       System.Web.Mvc.<>c__DisplayClass4.b__3() +15
       System.Web.Mvc.ServerExecuteHttpHandlerWrapper.Wrap(Func`1 func) +41
       System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) +1411
    
    [HttpException (0x80004005): Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.]
       System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) +2819
       System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage) +275
       System.Web.HttpServerUtilityWrapper.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) +94
       System.Web.Mvc.Html.ChildActionExtensions.ActionHelper(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues, TextWriter textWriter) +700
       System.Web.Mvc.Html.ChildActionExtensions.Action(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues) +123
       ASP._Page_Views_Doeding_cshtml.Execute() in c:\Projects\doecadeau\Source\doecadeau2\Views\Doeding.cshtml:117
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
       System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +126
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +181
       System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +378
       System.Web.Mvc.<>c__DisplayClass1a.b__17() +33
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +854172
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +265
       System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +854224
       System.Web.Mvc.<>c__DisplayClass1d.b__19() +40
       System.Web.Mvc.Async.<>c__DisplayClass1.b__0() +15
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +65
       System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +15
       System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +51
       System.Web.Mvc.<>c__DisplayClass8.b__3(IAsyncResult asyncResult) +42
       System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +15
       System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +51
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288

    This is from the UmbracoTraceLog when I click on the backoffice TeaCommerce section.

    2013-05-02 15:46:54,597 [5] INFO  Umbraco.Core.PluginManager - [Thread 20] Completed resolution of types of umbraco.BusinessLogic.Actions.IActionHandler, found 1 (took 2ms)
    2013-05-02 15:46:58,037 [5] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 9] An unhandled exception occurred
    System.ArgumentNullException: Value cannot be null.
    Parameter name: context
       at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
       at Autofac.ResolutionExtensions.Resolve[TService](IComponentContext context, IEnumerable`1 parameters)
       at TeaCommerce.Umbraco.Application.Trees.StoreTree.CreateRootNode(XmlTreeNode& rootNode)
       at umbraco.presentation.webservices.TreeDataService.LoadAppTrees(TreeRequestParams treeParams)
       at umbraco.presentation.webservices.TreeDataService.ProcessRequest(HttpContext context)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    After uninstall of teacommerce 2.1.0 this error: Could not load file or assembly 'TeaCommerce.Api, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

    [FileNotFoundException: Could not load file or assembly 'TeaCommerce.Api, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.]
       System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes) +0
       System.Reflection.RuntimeAssembly.GetExportedTypes() +49
       Umbraco.Core.TypeFinder.GetTypesWithFormattedException(Assembly a) +139
       Umbraco.Core.TypeFinder.GetTypes(Type assignTypeFrom, IEnumerable`1 assemblies, Boolean onlyConcreteClasses) +161
       Umbraco.Core.PluginManager.LoadViaScanningAndUpdateCacheFile(TypeList typeList, TypeResolutionKind resolutionKind, Func`1 finder) +53
       Umbraco.Core.PluginManager.ResolveTypes(Func`1 finder, TypeResolutionKind resolutionType, Boolean cacheResult) +1145
       Umbraco.Web.WebBootManager.InitializeApplicationEventsResolver() +76
       Umbraco.Core.CoreBootManager.Initialize() +537
       Umbraco.Web.WebBootManager.Initialize() +51
       Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e) +100
    
    [HttpException (0x80004005): Could not load file or assembly 'TeaCommerce.Api, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.]
       System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +12863325
       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +175
       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404
       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475
    
    [HttpException (0x80004005): Could not load file or assembly 'TeaCommerce.Api, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12880068
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12721257
  • Anders Burla Johansen 2560 posts 8256 karma points
    May 02, 2013 @ 16:34
    Anders Burla Johansen
    100

    This is because the SuppressDependency has changed signature from the 2.0.1 build you got - So you should build your custom code using the newest dll. That should do the trick

    Kind regards
    Anders

  • Merijn van Mourik 58 posts 128 karma points
    May 02, 2013 @ 16:44
    Merijn van Mourik
    0

    Hi Anders,

    I will comment out all event handlers and try again.

    Merijn

  • Merijn van Mourik 58 posts 128 karma points
    May 02, 2013 @ 16:58
    Merijn van Mourik
    0

    Hi Anders,

    This indeed is the problem. I was already suppressing but forgot the 'I' in the suppressdependency because the dependency must be set on the interface.

    This is working ok now:

     [TeaCommerce.Api.Dependency.SuppressDependency("TeaCommerce.Api.PriceCalculators.IOrderCalculator","TeaCommerce.Api")]

    Sorry for overflooding you with information in this one. It took me a while before I got the clear mindset that solves problems....

    Best regards,

    Merijn

  • Anders Burla Johansen 2560 posts 8256 karma points
    May 02, 2013 @ 18:02
    Anders Burla Johansen
    0

    Yeah - it is always the interface that you want to suppress :)

    Kind regards
    Anders

  • Alexey Badyl 33 posts 205 karma points
    Sep 10, 2013 @ 10:31
    Alexey Badyl
    0

    Hi all,

    I have installed TC 2.1.3 оn our acceptance enviroment. But by some reason after deployment we got the following error:

    2013-09-10 09:28:20,903 [28] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 12] An unhandled exception occurred
    System.ArgumentNullException: Value cannot be null.
    Parameter name: context
       at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
       at Autofac.ResolutionExtensions.Resolve[TService](IComponentContext context, IEnumerable`1 parameters)
       at TeaCommerce.Umbraco.Application.Trees.StoreTree.CreateRootNode(XmlTreeNode& rootNode)
       at umbraco.presentation.webservices.TreeDataService.LoadAppTrees(TreeRequestParams treeParams)
       at umbraco.presentation.webservices.TreeDataService.ProcessRequest(HttpContext context)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    On our test enviromen everything work but by some reason it is stop work on acceprtance.

    Any idea?

     

  • Anders Burla Johansen 2560 posts 8256 karma points
    Sep 12, 2013 @ 14:01
    Anders Burla Johansen
    0

    If it works on the test environment and not production - then try and see what is different about these two system setups. Maybe permissions for folders or some of the config files?

    Kind regards
    Anders

  • Alexey Badyl 33 posts 205 karma points
    Oct 31, 2013 @ 10:18
    Alexey Badyl
    0

    The source of problems was in the following:

    Our solution was configurated to use .net 4.0, but by some reason our developer add into project dll with runtime version 4.5 (EntityFramework.dll)

    After we changed dll version from 4.5 to 4.0 TC start work.

    One I found strage that it happen only on production:)

     

     

Please Sign in or register to post replies

Write your reply to:

Draft