Migrating to Architecture 9.0.0
This chapter describes the steps to migrate a VEE Port from Architecture 8.6.0 to Architecture 9.0.0.
As a reminder, refer to the Architecture 9.0.0 Changelog section for the complete list of changes and updates.
Minimum Versions
Architecture 9.0.0 requires the following minimum versions:
UI Pack: version
14.5.5or higher, with its UI Abstraction Layer (see UI Pack Version).Net Pack: version
15.0.2or higher (see Mock Return Type).Crypto: version
2.3.0or higher (see Mock Return Type).EDC Kernel API: version
2.0.0or higher (see Kernel API Versions).SSL Kernel API: version
1.5.0or higher (see Kernel API Versions).MicroUI Kernel API: version
4.0.0or higher, required since Architecture8.6.0(see Migrating to Architecture 8.6.0).MWT Kernel API: version
2.5.0or higher, required since Architecture8.6.0(see Migrating to Architecture 8.6.0).Bluetooth Kernel API: version
2.4.0or higher, required since Architecture8.6.0(see Migrating to Architecture 8.6.0).
Context Local Storage Initialization Access
Architecture 9.0.0 enforces that a Context Local Storage field declared in a kernel.intern file must be accessible from its initialization method’s declaring class, according to standard Java access rules.
The following error may occur at Kernel build if this is not the case:
SOAR-S ERROR :
[M302] - IllegalAccessError: class 'ej.microui.display.KFDisplayFont' tried to access private field 'ej.microui.display.RasterFont.fonts'.
This example occurs when using a UI Pack older than 14.5.5: RasterFont.fonts is a private static field initialized by a method declared in a different class (KFDisplayFont), which Architecture 9.0.0 no longer allows.
To fix this error, update to UI Pack 14.5.5 or higher.
Private Members in Kernel API
Architecture 9.0.0 no longer accepts a private field or method declared in a Kernel API definition file.
The following errors may occur at Kernel build:
SOAR-S ERROR :
[M65] - Private method 'com.mycompany.MyClass.myMethod()void' cannot be exposed in 'kernel.api'.
SOAR-S ERROR :
[M64] - Private field 'com.mycompany.MyClass.myField' cannot be exposed in 'kernel.api'.
To fix these errors, remove the declaration of the private member from the Kernel API definition file.
Kernel API Versions
If a Kernel depends on one of the following Kernel APIs, Architecture 9.0.0 requires the given version or higher:
com.microej.kernelapi:edcversion2.0.0(see the EDC Kernel API versions)com.microej.kernelapi:sslversion1.5.0(see the SSL Kernel API versions)
Older versions declare private constructors that Architecture 9.0.0 no longer accepts. The following errors may occur at Kernel build:
SOAR-S ERROR :
[M57] - Unknown method 'java.lang.Package.Package()void' (type is referenced by the file .../edc-1.3.0.jar[kernel.api]).
SOAR-S ERROR :
[M57] - Unknown method 'javax.net.ssl.SSLContext.SSLContext()void' (type is referenced by the file .../ssl-1.4.0.jar[kernel.api]).
The first error occurs with the EDC Kernel API 1.3.0 and older.
The EDC Kernel API 1.4.0 does not cause this error, but it does not declare the instance fields of the EDC types, such as FilterInputStream.in or Vector.elementData.
Since Architecture 9.0.0, a type declared as Kernel API no longer exposes its instance fields.
A Feature that accesses one of these fields then fails at Feature build with an [M58] - Unknown field error.
The second error occurs with the SSL Kernel API 1.4.0 and older.
The same error also occurs for the constructors of TrustManagerFactory, KeyManagerFactory, CertificateFactory and KeyStore.
To fix these errors, update the EDC Kernel API to version 2.0.0 or higher, and the SSL Kernel API to version 1.5.0 or higher.
UI Pack Version
A VEE Port that uses the UI Pack requires UI Pack 14.5.5 or higher with Architecture 9.0.0.
With an older UI Pack, the link of the executable can fail. For example, the x86 Linux VEE Port with UI Pack 14.4.2 fails with:
undefined reference to `__icetea__ICETEA_1HEAP$$Limit'
undefined reference to `IMAGE_DECODERS_TABLE'
To fix this error, update the UI Pack and the UI Abstraction Layer of the VEE Port to version 14.5.5 or higher.
Mock Return Type
Architecture 9.0.0 checks that a Mock method returns the same type as the native method it implements. With an older Architecture, the Simulator called such a Mock method, and the Application received a wrong value without any error.
When the return types differ, the native method call now throws an UnsatisfiedLinkError:
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.mycompany.Sensor.getSensorValue()I; Return Type Mismatch
In this example, the native method getSensorValue returns an int, and the Mock method returns void.
The HIL Engine can also print the following error, here for a native method write that returns an int:
ERROR: Inconsistent Mock implementation: The method 'write(I[BII)I' cannot be loaded from the HIL classpath (java.lang.NoSuchMethodError:Return Type Mismatch).
A library or a Pack whose Mock contains such a mismatch no longer works on the Simulator.
Known Libraries Minimum Versions:
To fix this error, update the library or the Pack to a version whose Mock matches its native methods. For a Mock you maintain, change the return type of the Mock method to the return type of the native method.
