Intermittent Azure SQl Order Save issue  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Intermittent Azure SQl Order Save issue

Postby SBarnes » Tue Oct 01, 2019 1:56 pm

We are getting an issue not all the time related to saving orders under Azure SQL, we have added code to try resaving the order a second time which overcomes the issue most of the time but it does occur on occasion, bar attempting the save multiple times is there any other way to overcome this issue?

Code: Select all
Line 869:  Error Stack Trace   at JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrderLine.DoLineCalculations(String ChangeSource)
   Line 869:  Error Stack Trace   at JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrderLine.DoLineCalculations(String ChangeSource)
   Line 870:    at JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder.CompensateTaxRound()
   Line 870:    at JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder.CompensateTaxRound()
   Line 871:    at JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder.iSave(Boolean SavingForPrint, Boolean SavingForSplit)
   Line 871:    at JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder.iSave(Boolean SavingForPrint, Boolean SavingForSplit)
   Line 872:    at JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder.iSave()
   Line 872:    at JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder.iSave()
   Line 874:    at WOrderQueue.OrderConsolidator.CancelBackorder(SalesOrder newsalesorder) in C:\attkey\WOrderQueue SR6\WOrderQueue\OrderConsolidator.cs:line 70
   Line 874:    at WOrderQueue.OrderConsolidator.CancelBackorder(SalesOrder newsalesorder) in C:\attkey\WOrderQueue SR6\WOrderQueue\OrderConsolidator.cs:line 70
   Line 875:    at WOrderQueue.OrderConsolidators.CancelBackorders(SalesOrder newsalesorder) in C:\attkey\WOrderQueue SR6\WOrderQueue\OrderConsolidators.cs:line 57
   Line 875:    at WOrderQueue.OrderConsolidators.CancelBackorders(SalesOrder newsalesorder) in C:\attkey\WOrderQueue SR6\WOrderQueue\OrderConsolidators.cs:line 57
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1617
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Intermittent Azure SQl Order Save issue

Postby SBarnes » Wed Oct 09, 2019 7:38 am

Hi

With this problem I've noticed a couple of methods on the database object namely

Code: Select all
                            SalesOrder.Manager.Database.BreakConnections();
                            SalesOrder.Manager.Database.GetNewConnection(SalesOrder.Manager.Database.ConnectionString);


Will this force Jiwa to reconnect itself to the database so as to be able to retry the save operation?

I also noticed the IsConnected property and EnsureConnectionValid.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1617
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Intermittent Azure SQl Order Save issue

Postby Scott.Pearce » Fri Oct 11, 2019 2:42 pm

What is the error message you are getting when the save fails?
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 742
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 221

Re: Intermittent Azure SQl Order Save issue

Postby SBarnes » Fri Oct 11, 2019 3:01 pm

Error Exception Object reference not set to an instance of an object. see https://service.jiwa.com.au/browse/DEV-7834 as I now believe there is a bug if call save on an order with status of processed if you change anything on a line.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1617
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Intermittent Azure SQl Order Save issue  Topic is solved

Postby Mike.Sheen » Fri Nov 01, 2019 6:27 pm

SBarnes wrote:Error Exception Object reference not set to an instance of an object. see https://service.jiwa.com.au/browse/DEV-7834 as I now believe there is a bug if call save on an order with status of processed if you change anything on a line.


I tried to reproduce this issue and could not - DEV-7834 has been updated with how I tried.

We've asked on the service desk issue you logged JIWA-5181 for some steps to repro - if you want this fixed in the next service release you'll need to be quick to make that window as we're not far from releasing that!
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: Intermittent Azure SQl Order Save issue

Postby SBarnes » Sat Nov 02, 2019 3:29 pm

Hi Mike,

I've actually been able to work around the issue for the time being.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1617
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 3 guests

cron