Sales By Product Report throwing error

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
egormsen
Captain (CAPT)
Captain (CAPT)
Posts: 236
Joined: Fri May 16, 2008 9:16 am

Sales By Product Report throwing error

Post by egormsen » Wed Apr 17, 2013 12:49 pm

I have upgraded my 7.0.7 database to Gold and when trying the various reports the Sales by Product Report is not working. All of the other sales and product reports seem to be correct.

Here is what is what is in the error log.

An error has occured at http://devstore.weighdown.com/Admin/Rep ... oduct.aspx
Exception: Exception of type 'System.Web.HttpUnhandledException' was thrown. Stack Trace: at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Inner Exception: No row with the given identifier exists[CommerceBuilder.Products.Vendor#0] Inner Exception Stack Trace: at NHibernate.Impl.SessionFactoryImpl.DefaultEntityNotFoundDelegate.HandleEntityNotFound(String entityName, Object id) at NHibernate.Proxy.DefaultLazyInitializer.Intercept(InvocationInfo info) at VendorProxy.get_Name() at CommerceBuilder.Reporting.ReportDataSource.GetProductBreakdownSummary(DateTime fromDate, DateTime toDate, Int32 vendorId, String sortExpression) at AbleCommerce.Admin.Reports.ProductBreakdown.BindReport() at AbleCommerce.Admin.Reports.ProductBreakdown.Page_Load(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Eldon Gormsen
Weigh Down Ministries
AC Gold R12 SR1
http://store.weighdown.com

User avatar
ForumsAdmin
AbleCommerce Moderator
AbleCommerce Moderator
Posts: 399
Joined: Wed Mar 13, 2013 7:19 am

Re: Sales By Product Report throwing error

Post by ForumsAdmin » Fri Apr 19, 2013 8:07 am

Apparently something is wrong with the data. Probably some product is assigned a warehouse that does not exist.

egormsen
Captain (CAPT)
Captain (CAPT)
Posts: 236
Joined: Fri May 16, 2008 9:16 am

Re: Sales By Product Report throwing error

Post by egormsen » Fri Apr 19, 2013 9:14 am

The Sales by product report runs fine in our 7.0.7 store. So if there is something wrong with the data, then it the upgrade script broke it. Either that or there is a problem with the new report.

FYI - I did verify that the all warehouses do exist.

Any other suggestions?
Eldon Gormsen
Weigh Down Ministries
AC Gold R12 SR1
http://store.weighdown.com

User avatar
ForumsAdmin
AbleCommerce Moderator
AbleCommerce Moderator
Posts: 399
Joined: Wed Mar 13, 2013 7:19 am

Re: Sales By Product Report throwing error

Post by ForumsAdmin » Fri Apr 19, 2013 9:22 am

Code: Select all

No row with the given identifier exists Inner Exception: No row with the given identifier exists[CommerceBuilder.Products.Vendor#0] Inner Exception Stack Trace: at 
Sorry I meant to say there product is assigned a 'vendor' that does not exist.

----

In AC7 data integrity checks were not fully enforced. So it was possible to have references to old entities that no more existed in the system. However in AC Gold data integrity checks are enforced. From the exception it looks like NHibernate tries to load a vendor associated with a product. It fails to find the vendor and throws an exception.

egormsen
Captain (CAPT)
Captain (CAPT)
Posts: 236
Joined: Fri May 16, 2008 9:16 am

Re: Sales By Product Report throwing error

Post by egormsen » Fri Apr 19, 2013 9:39 am

That was it. We do not use the Vendor field and somehow for some products the VendorId field was set to 0 and the rest where set to null, so I updated the column to set all values to null and now the report works.

Thanks for the help!
Eldon Gormsen
Weigh Down Ministries
AC Gold R12 SR1
http://store.weighdown.com

User avatar
ForumsAdmin
AbleCommerce Moderator
AbleCommerce Moderator
Posts: 399
Joined: Wed Mar 13, 2013 7:19 am

Re: Sales By Product Report throwing error

Post by ForumsAdmin » Fri Apr 19, 2013 10:17 am

We will update our upgrade scripts to ensure this happens automatically.

Post Reply