Nop 2 Fresh install - Object reference not set to an instance of an object

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Clean install of Nop 2.0, clean SQL DB get the following error on first run

Steve

//get tax rate

           errored on this line >  var calculateTaxResult = activeTaxProvider.GetTaxRate(calculateTaxRequest);

            if (calculateTaxResult.Success)
                return calculateTaxResult.TaxRate;
            else
                return decimal.Zero;

System.NullReferenceException was unhandled by user code
  Message=Object reference not set to an instance of an object.
  Source=Nop.Services
  StackTrace:
       at Nop.Services.Tax.TaxService.GetTaxRate(ProductVariant productVariant, Int32 taxCategoryId, Customer customer) in Z:\Visual Studio 2010\nopCommerce\nopCommerce_2.00_Beta_Source\Libraries\Nop.Services\Tax\TaxService.cs:line 237
       at Nop.Services.Tax.TaxService.GetProductPrice(ProductVariant productVariant, Int32 taxCategoryId, Decimal price, Boolean includingTax, Customer customer, Boolean priceIncludesTax, Decimal& taxRate) in Z:\Visual Studio 2010\nopCommerce\nopCommerce_2.00_Beta_Source\Libraries\Nop.Services\Tax\TaxService.cs:line 317
       at Nop.Services.Tax.TaxService.GetProductPrice(ProductVariant productVariant, Decimal price, Boolean includingTax, Customer customer, Decimal& taxRate) in Z:\Visual Studio 2010\nopCommerce\nopCommerce_2.00_Beta_Source\Libraries\Nop.Services\Tax\TaxService.cs:line 298
       at Nop.Services.Tax.TaxService.GetProductPrice(ProductVariant productVariant, Decimal price, Customer customer, Decimal& taxRate) in Z:\Visual Studio 2010\nopCommerce\nopCommerce_2.00_Beta_Source\Libraries\Nop.Services\Tax\TaxService.cs:line 281
       at Nop.Services.Tax.TaxService.GetProductPrice(ProductVariant productVariant, Decimal price, Decimal& taxRate) in Z:\Visual Studio 2010\nopCommerce\nopCommerce_2.00_Beta_Source\Libraries\Nop.Services\Tax\TaxService.cs:line 257
       at Nop.Web.Controllers.CatalogController.PrepareProductPriceModel(Product product) in Z:\Visual Studio 2010\nopCommerce\nopCommerce_2.00_Beta_Source\Presentation\Nop.Web\Controllers\CatalogController.cs:line 192
       at Nop.Web.Controllers.CatalogController.PrepareProductOverviewModel(Product product) in Z:\Visual Studio 2010\nopCommerce\nopCommerce_2.00_Beta_Source\Presentation\Nop.Web\Controllers\CatalogController.cs:line 300
       at Nop.Web.Controllers.CatalogController.<HomepageProducts>b__2e(Product x) in Z:\Visual Studio 2010\nopCommerce\nopCommerce_2.00_Beta_Source\Presentation\Nop.Web\Controllers\CatalogController.cs:line 1524
       at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
       at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
       at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
       at Nop.Web.Controllers.CatalogController.HomepageProducts() in Z:\Visual Studio 2010\nopCommerce\nopCommerce_2.00_Beta_Source\Presentation\Nop.Web\Controllers\CatalogController.cs:line 1523
       at lambda_method(Closure , ControllerBase , Object[] )
       at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
       at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
       at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12()
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
  InnerException:
12 years ago
Your plugins are not deployed (/Plugins directory is empty)

https://www.nopcommerce.com/boards/t/10500/publishing-20.aspx
12 years ago
this may be a silly question, but are we able to run Nop 2.0 from VS2010 in develepment mode, just reading thru the post you have directed me to.

Thanks

steve
12 years ago
The error above is reported while running Nop 2.0 in VS2010 debug mode

//get tax rate

           errored on this line >  var calculateTaxResult = activeTaxProvider.GetTaxRate(calculateTaxRequest);

            if (calculateTaxResult.Success)
                return calculateTaxResult.TaxRate;
            else
                return decimal.Zero;

activeTaxProvider.GetTaxRate(calculateTaxRequest)  value is null
steve
12 years ago
MrShrek wrote:
The error above is reported while running Nop 2.0 in VS2010 debug mode

It tells that your \plugins direcotry is empty for some reasons (by default all plugins are copied into it)
12 years ago
Maybe it is a good idea to post a thread on the proper way to deploy nopCommerce. I spent a whole day chasing ghosts because the error messages are no so easy to understand. Only after many hours of going nuts that I figured out the plugins were not deployed.

Best,
Mario
12 years ago
MarioRosario wrote:
Maybe it is a good idea to post a thread on the proper way to deploy nopCommerce. I spent a whole day chasing ghosts because the error messages are no so easy to understand. Only after many hours of going nuts that I figured out the plugins were not deployed.

Best,
Mario

https://www.nopcommerce.com/boards/t/10575/how-to-publish-v20-video.aspx?p=1
12 years ago
Up to now I have unzipped nopcommerce  2.0 and opened it up in VS2010, tried to run it as I have with all previous versions.

Is there something I am missing ?

The plugins  directory is not empty ?

it would be usefule if some one could give a consice method of how to run V2.0 in VS2010 delepment environment.

Thanks

Steve
12 years ago
wxDevelopment wrote:
Maybe it is a good idea to post a thread on the proper way to deploy nopCommerce. I spent a whole day chasing ghosts because the error messages are no so easy to understand. Only after many hours of going nuts that I figured out the plugins were not deployed.

Best,
Mario
https://www.nopcommerce.com/boards/t/10575/how-to-publish-v20-video.aspx?p=1


Thanks. I will test your deployment proceedure, I think your proceedure will probably work, but right now I'm trying to figure out why I am having a performance issue. It could by my computers but I'm not sure.

Best,
Mario
12 years ago
MrShrek wrote:
Up to now I have unzipped nopcommerce  2.0 and opened it up in VS2010, tried to run it as I have with all previous versions.

Is there something I am missing ?

The plugins  directory is not empty ?

it would be usefule if some one could give a consice method of how to run V2.0 in VS2010 delepment environment.

Thanks

Steve


I'll document (start a thread) on how I got it up and running soon, let me know if you need specific or urgent help.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.