Common Plugin Upgrade Issues  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Common Plugin Upgrade Issues

Postby Scott.Pearce » Fri Apr 08, 2016 11:25 am

A few things changed in our code base for the v7.0.157.0 release that can affect custom plugins. Very simple to fix, but you need to be aware. I've outlined the common issues below, along with their solutions.


The plugin contains a reference to JiwaSendEmail.DLL, which has been deprecated.

Symptom
Upon importing a plugin, the following error message occurs:
Code: Select all
Error : Some references failed to resolve.  These will not have the 'Resolved' check set against them in the references list

Module : Plugin_ReadCompleted


Checking the “Assembly References” tab on the plugin shows an errored line at the bottom of the grid. The fields of the line are blank, except for the “Full Name” field, which reads:

Code: Select all
“Could not load file or assembly ‘JiwaSendEmail, Version=1.0.157.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c’ or one of it’s dependencies.  The system cannot find the file specified.”


Cause
The assembly JiwaSendEmail.DLL has been deprecated. Many plugins reference this even though they don’t use it, because JiwaApplication.DLL used to reference it and all plugins require a reference to JiwaApplication.DLL.

Solution
Delete the errored line from the “Assembly References” grid.



Plugin contains a class that inherits from a Jiwa base class, such as “JiwaFinancials.Jiwa.JiwaApplication.JiwaCollectionItem”, which has a new MustOverride member.

Symptom
Compilation of the plugin, either at login time or via Plugin Maintenance, gives an error similar to:

Code: Select all
“Error:  Class ‘XXXX’ must either be declared ‘MustInherit’ or override the following inherited ‘MustOverride’ member(s):  JiwaFinancials.Jiwa.JiwaApplication.JiwaCollectionItem(Of XXXX) : Protected MustOverride Sub iSave().”


Cause
A change to the Jiwa base classes has been made such that all inherited classes MUST override a method called “iSave()”. This was done to provide connection resilience code throughout Jiwa and to provide a more consistent interface between Jiwa classes.

Solution
Ensure that all such inherited classes include:

Code: Select all
Protected Overrides Sub iSave()
      
End Sub


even if not called/used.



Plugin contains a class that inherits from a Jiwa base class, such as “JiwaFinancials.Jiwa.JiwaApplication.JiwaCollectionItem”, which has had it's SaveRecord member name changed.

Cause
To bring some consistency to the Jiwa base classes, the Overridable method "SaveRecord" has been renamed to "iSave()". Any class inheriting from such a base class is now trying to Override a method which no longer exists in the base.

Solution
Rename instances of:

Code: Select all
Public Overrides Sub SaveRecord()


to:

Code: Select all
Protected Overrides Sub iSave()
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 765
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 230

Re: Common Plugin Upgrade Issues

Postby TomW » Tue May 10, 2016 4:42 pm

Scott

I have upgraded to 157 today and found a problem with the sample plugin Mike put up "Widget Sample List Maintenance" all was good pre upgrade and then the plugin would no longer compile it was showing the SaveRecord error as you described.

The only part of the code I changed was the function from "public override void SaveRecord()" to your suggested "protected override void iSave()" this allowed me to recompile and I thought I got out of jail easily but, not so. When I try to run the plugin from the menu as before I now get the message
"Error: The menu option refers to a plugin that is either disabled or no
longer exists."
Module: CreateForm

Any clues to my next step.

Thanks,

Tom
TomW
Occasional Contributor
Occasional Contributor
 
Posts: 22
Joined: Wed Jun 24, 2015 11:02 am
Topics Solved: 1

Re: Common Plugin Upgrade Issues  Topic is solved

Postby Mike.Sheen » Tue May 24, 2016 10:13 am

TomW wrote:Scott

I have upgraded to 157 today and found a problem with the sample plugin Mike put up "Widget Sample List Maintenance" all was good pre upgrade and then the plugin would no longer compile it was showing the SaveRecord error as you described.

The only part of the code I changed was the function from "public override void SaveRecord()" to your suggested "protected override void iSave()" this allowed me to recompile and I thought I got out of jail easily but, not so. When I try to run the plugin from the menu as before I now get the message
"Error: The menu option refers to a plugin that is either disabled or no
longer exists."
Module: CreateForm

Any clues to my next step.

Thanks,

Tom


I've updated that thread to include a new version of the plugin which is compatible with 07.00.157.00 or later.

The error you are getting is because the menu item has an invalid reference to a form. Make sure the plugin is enabled - if it was not, enable it quit Jiwa and try again.

If that still doesn't help - open menu maintenance and inspect the menu item. Select the menu item, and then look at the "Form" property in the properties window - use the lookup button to locate the form "Widget Sample List Maintenance".

MenuMaint.PNG
Menu Maintenance
MenuMaint.PNG (32.43 KiB) Viewed 10625 times


If that still doesn't help, then you should:

  • Open menu maintenance and delete the menu item
  • Open Form Maintenance and delete the form
  • Quit Jiwa
  • Log into Jiwa
  • Add the form to the Form Maintenance (Make sure you select the Form Type "Plugin" FIRST then choose the assembly to select the plugin. Make sure you select the class name also)
  • Quit Jiwa
  • Log into Jiwa
  • Open menu maintenance and add the item to the menu.
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: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Common Plugin Upgrade Issues

Postby TomW » Tue May 24, 2016 3:41 pm

Thanks Mike all good now.
TomW
Occasional Contributor
Occasional Contributor
 
Posts: 22
Joined: Wed Jun 24, 2015 11:02 am
Topics Solved: 1


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 0 guests