Critical JADE Hotfixes

PAR 67915 - .NET Import Issue in JADE 2018 and 2020

18 December 2020

Issue is addressed by 18.0.01.085 & 20.0.01.020 hotfixes
Please note, the initial hotfixes 18.0.01.084 and 20.0.01.018 were withdrawn and replaced by these two.
 

What is the problem?
With the release of JADE 18.0.01, the .NET external component library wizard was updated to support two new type conversions.

- DateTimeOffset .NET type now maps to TimeStampOffset JADE type
- Byte[] .NET type now maps to Binary JADE type

Both of these types previously mapped to JadeDotNetType in earlier releases.
Hotfix 18.0.01.074 was later released as it was found the new Binary type conversions were not working.

It has now come to our attention that as of hotfix 18.0.01.074 (including 20.0.01), any assemblies that were imported with the previous mapping (Byte[] to JadeDotNetType) may cause exceptions if attempting to access properties or methods with these types.

What is the solution?

To ensure backwards compatibility while also supporting these new mappings, we are releasing a new hotfix in JADE 18.0.01.085 and 20.0.01.020 which supports both the old and new type mappings. Any assemblies imported prior to JADE 18.0.01 will continue to function as expected after applying this hotfix.

However as this was not introduced with the initial release of 18.0.01, it may require a fix-up script to be run to correct the generated JadeDotNetType methods and compatibility flags.

Who needs to run the fix-up script?

Any JADE 18.0.01 or 20.0.01 systems that have had .NET assemblies imported/re-imported in either release AND have imported either of the following:

- Imported .NET classes with properties, fields, method/event parameters/return values of the type DateTimeOffset
- Imported .NET classes with properties, fields, method/event parameters/return values of the type Byte[]

The fix-up method `RootSchema::Schema::_fixDotNetImportMethodsAndSetFlags` will need to be executed once after applying the hotfix if the system meets the above criteria. This script will modify and recompile the necessary generated methods for affected assemblies, as well as set some compatibility flags on the generated assembly meta data.

We have also provided another method `RootSchema::Schema::_fixDotNetImportCompatibilityFlags` which will just perform setting the compatibility flags. This method should be used if the method changes are deployed to the system.

Alternatively, any imported .NET assemblies that meet the above criteria may be re-imported after applying the hotfix - this will cause the methods to be generated correctly and compatibility flags to be set.

Example of running the fix-up method via command line:
> jadclient path=database-path ini=initialization-file-name app=RootSchemaApp schema=RootSchema executeSchema=RootSchema executeClass=Schema executeMethod=_fixDotNetImportMethodsAndSetFlags