SR13 API issue  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

SR13 API issue

Postby neil.interactit » Fri Sep 02, 2022 12:55 pm

Hey guys,

I have run into an issue that has me stumped.

There were some API connectivity issues, so per viewtopic.php?f=32&t=1672&p=7294, we updated to SR13 along with the API plugin updates. All good! Everything worked.

As this was a minor update the client had Jiwa LIVE updated directly, so afterward asked for Jiwa TEST to be updated. I took a new copy of the (updated) LIVE database and replaced the TEST database with it.

I have confirmed the TEST API server is running SR13, have locally run Jiwa to recompile the plugins (in case that helps), and have restarted the (self-hosted) API service.

The test API is now responding with:
Code: Select all
System.MissingMethodException: Method not found: 'System.Collections.Generic.IDictionary`2<System.String,JiwaFinancials.Jiwa.JiwaApplication.Manager> JiwaFinancials.Jiwa.JiwaServiceModel.RESTAPIPlugin.get_JiwaSessionDictionary()'.
   at AnglicareRestApiCustomRoutes.JiwaExtensions.GetManager(Service Service)
   at AnglicareRestApiCustomRoutes.CustomServices.Post(SalesOrderLinesRequest request)
   at lambda_method(Closure , Object , Object )
   at ServiceStack.Host.ServiceRunner`1.<ExecuteAsync>d__13.MoveNext()

I dug deeper, and internally was able to expose the offending AnglicareRestApiCustomRoutes plugin code line:
Code: Select all
    public class CustomServices : Service
    {
        [Authenticate]
        public SalesOrderLinesResponse Post(SalesOrderLinesRequest request)
        {
            var manager = this.GetManager();

AnglicareRestApiCustomRoutes is a custom plugin copied/adapted from the supplied custom API example plugin.

So to restate - LIVE is working fine, but TEST, essentially a copy of LIVE, is not working.

Any help appreciated!

Cheers,
Neil
neil.interactit
Kohai
Kohai
 
Posts: 227
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6

Re: SR13 API issue  Topic is solved

Postby Mike.Sheen » Fri Sep 02, 2022 2:31 pm

neil.interactit wrote:LIVE is working fine, but TEST, essentially a copy of LIVE, is not working.


If that is true, then you probably just need to:
1. Stop the API service
2. Delete the contents of the ProgramData\Jiwa Financials\Jiwa 7\7.2.1 folder
3. Start the API service

This will force a recompile of all plugins, so the service start might take a little longer.

neil.interactit wrote:have locally run Jiwa to recompile the plugins (in case that helps)


That would, if the API service is using the same Windows user account as what you logged in as - I suspect in this case that's not the case - but deleting the folder as I indicated above will remove all doubt as the plugins for all users and all databases gets wiped clean.
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: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: SR13 API issue

Postby neil.interactit » Fri Sep 02, 2022 3:47 pm

Sweet! Nail on the head! Thanks Mike.
neil.interactit
Kohai
Kohai
 
Posts: 227
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6


Return to Technical and or Programming

Who is online

Users browsing this forum: Google [Bot] and 27 guests