Intermittent Azure SQl Order Save issue

Discussions relating to plugin development, and the Jiwa API.

Intermittent Azure SQl Order Save issue

Postby SBarnes » Tue Oct 01, 2019 12: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
stuart@attkey.com.au
SBarnes
Jiwa Senpai
Jiwa Senpai
 
Posts: 633
Joined: Fri Aug 15, 2008 2:27 pm
Topics Solved: 63

Re: Intermittent Azure SQl Order Save issue

Postby SBarnes » Wed Oct 09, 2019 6: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
stuart@attkey.com.au
SBarnes
Jiwa Senpai
Jiwa Senpai
 
Posts: 633
Joined: Fri Aug 15, 2008 2:27 pm
Topics Solved: 63

Re: Intermittent Azure SQl Order Save issue

Postby Scott.Pearce » Fri Oct 11, 2019 1: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
Jiwa Senpai
Jiwa Senpai
 
Posts: 495
Joined: Tue Feb 12, 2008 10:27 am
Location: North Sydney, New South Wales
Topics Solved: 158

Re: Intermittent Azure SQl Order Save issue

Postby SBarnes » Fri Oct 11, 2019 2: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
stuart@attkey.com.au
SBarnes
Jiwa Senpai
Jiwa Senpai
 
Posts: 633
Joined: Fri Aug 15, 2008 2:27 pm
Topics Solved: 63

Re: Intermittent Azure SQl Order Save issue

Postby Mike.Sheen » Fri Nov 01, 2019 5: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
Jiwa Shihan
Jiwa Shihan
 
Posts: 1448
Joined: Tue Feb 12, 2008 10:12 am
Location: North Sydney
Topics Solved: 486

Re: Intermittent Azure SQl Order Save issue

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

Hi Mike,

I've actually been able to work around the issue for the time being.
Regards
Stuart Barnes
stuart@attkey.com.au
SBarnes
Jiwa Senpai
Jiwa Senpai
 
Posts: 633
Joined: Fri Aug 15, 2008 2:27 pm
Topics Solved: 63


Return to Technical / Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron