java.lang.UnsatisfiedLinkError: No HIL client implementor found

Hi,

I use a S7G2 platform on MicroEJ SDK 4.1.4. I’ve create my own SNI function, but when I try to use it on the simulator the simulation seems to be frozen for some time then I get this trace on console:

Exception in thread "main" java.lang.UnsatisfiedLinkError: No HIL client implementor found (timeout)
		at java.lang.Throwable.fillInStackTrace(Throwable.java:79)
		at java.lang.Throwable.<init>(Throwable.java:30)
		at java.lang.Error.<init>(Error.java:10)
		at java.lang.LinkageError.<init>(LinkageError.java:10)
		at java.lang.UnsatisfiedLinkError.<init>(UnsatisfiedLinkError.java:10)
		at com.test.main(SNI.java:19)
		at java.lang.MainThread.run(Thread.java:836)
		at java.lang.Thread.runWrapper(Thread.java:372)

Following the links I could see that the issue happens when the native is called.

How can fix that?

Thanks

Hi Marc,

You need to add a mock to your platform. A mock will be a Java implementation of your function called on the simulator. To do that, You can:

  • Create a new standard Java project
  • Add a Variable (HILENGINE)
  • Create a class with the same fullqualified name than the one containing your SNI function
  • For each SNI function, create an implementation with the same declaration as public static functions

Then you can export your mock to use it:

  • Export the mock projact as a jar to [platform-name]-configuration/dropins/mocks/dropins
  • Rebuild the platfom

If you don’t want to rebuild your platform, you can:

  • Export the mock projact as a jar to [platformname]-[version]/source/mocks/dropins
    But the next time you’ll rebuild your platform, it will be deleted.

For more information, see chapter 20.3 of the device developer guide.
https://developer.microej.com/packages/devdevguide-4.1-A/TLT-0784-MAN-DeviceDevGuide-1.1.0.pdf

We also have an exemple here (‘Adding a mock of the native function to the JPF’ part)

Regards,