Is Device.getId() function available on STM32F7 emulator?

Hello,
I am trying a very simple use case to display the dvice ID (given by the API Device.getId()) on the STM32F7 simulator and the function throws the following exception:

deviceid SEVERE: java.lang.Throwable.(Throwable.java: 37)
deviceid SEVERE: java.lang.Exception.(Exception.java: 18)
deviceid SEVERE: java.lang.ReflectiveOperationException.(ReflectiveOperationException.java: 18)
deviceid SEVERE: java.lang.ClassNotFoundException.(ClassNotFoundException.java: 18)
deviceid SEVERE: fr.picodev.eval.deviceId.deviceIDBackgroundService.getDeviceUuid(deviceIDBackgroundService.java: 45)
deviceid SEVERE: fr.picodev.eval.deviceId.deviceIDBackgroundService.onStart(deviceIDBackgroundService.java: 28)
deviceid SEVERE: com.microej.wadapps.management.util.BackgroundsManager.start(BackgroundsManager.java: 100)
deviceid SEVERE: com.microej.wadapps.management.util.BackgroundsManager.update(BackgroundsManager.java: 110)
deviceid SEVERE: ej.observable.Observable.notifyObservers(Observable.java: 120)
deviceid SEVERE: com.microej.wadapps.management.util.BackgroundServicesListImpl.add(BackgroundServicesListImpl.java: 44)
deviceid SEVERE: EvalDeviceId.generated.EvalDeviceIdActivator.link(EvalDeviceIdActivator.java: 21)
deviceid SEVERE: ej.components.registry.impl.AbstractRegistry.link(AbstractRegistry.java: 68)
deviceid SEVERE: ej.components.registry.util.BundleRegistryHelper.startup(BundleRegistryHelper.java: 52)
deviceid SEVERE: EvalDeviceId.generated.EvalDeviceIdEntryPoint.start(EvalDeviceIdEntryPoint.java: 15)
deviceid SEVERE: ej.kf.Kernel$2.run(Kernel.java: 222)
deviceid SEVERE: java.lang.Thread.run(Thread.java: 319)
deviceid SEVERE: java.lang.Thread.runWrapper(Thread.java: 379)

I added in the module.ivy file the following dependency:

<dependency org="ej.api" name="device" rev="1.0.2" conf="provided->*" />

I am running MicroEJ studio 19.05 on the latest simulator, downladed from the tutorials:

Architecture: ARM Cortex-M7 [CM7]
Hardware Part Number: STM32F746GDISCO
Compilation Toolchain: Keil 5 (ARMCC) [CM7hardfp_ARMCC5]
Runtime Name: MicroEJ-Developer-Runtime
Runtime Version: 1.4
Name: VDE-INDIGO-STM32F746GDISCO-L9EBM
Provider: MicroEJ
Version: 1.1.0
Core Engine Architecture: 14
Usage Level: dev
Technology Version: 1.6
License Tag: IS2T_J8F5C
Build Label: 20191022-1719

Is this API available or did I miss something?

The line of code triggering the exception is:

String uuid = toHexString(Device.getId());

Thanks for your help !
Stéphane

Hi Stéphane,

Applications are not allowed to use the Device API, instead you should use the Product API to obtain the device identifier. Like this

Product product = ServiceLoaderFactory.getServiceLoader().getService(Product.class);
String uuid = product.getDeviceIdentifier();

Thanks a lot !
It works like a charm !
Do you know where I could find in the documentation these kind of tricks (which API are available or not, and the lsit of services for example) ?
Kind regards,
Stéphane