It turns out that Java9 changed the implementation and usage of SunPKCS11, breaking Java8 code. I had to apply the following patch to the module-signer:
I rebuild the module signer with Java 11.
When I try to sign a module for Ignition 8, I have the following issue
D:\dev\ignition\modules\src\Signer-module>java -jar module-signer8.jar -keystore=D:\dev\ignition\modules\src\Signer-module/certif/export_certif.jks -keystore-pwd=siai -alias=byes-siai -alias-pwd=******* -chain=D:\dev\ignition\modules\src\Signer-module/certif/byes_siai.p7b -module-in=D:/dev/ignition/modules/src/VideoViewer/VideoViewer-build/target/BYES-VideoViewer-unsigned.modl -module-out=D:/dev/ignition/modules/dist/BYES-VideoViewer-signed-1.4.0.modl
Erreur : LinkageError lors du chargement de la classe principale com.inductiveautomation.ignitionsdk.ModuleSigner$Main
java.lang.UnsupportedClassVersionError: com/inductiveautomation/ignitionsdk/ModuleSigner$Main has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 53.0
Dear all,
I cloned the master project from GitHub, compiled the project and run.
The following error occured:
C:\DataBusiness\moranandr1\Desktop\ignition\sdk\module signer\module-signer-master\module-signer-master\target>java -jar module-signer-1.0.0-jar-with-dependencies.jar -keystore=C:\Users\moranandr1\sdk.jks -keystore-pwd=*** -alias=fts-eng -alias-pwd=*** -c
hain=C:\Users\moranandr1\fts_eng.p7b -module-in=C:\DataBusiness\moranandr1\Desktop\ignition\sdk\modules\kernel\base\base-build\target\Base-unsigned.modl -module-out=C:\DataBusiness\moranandr1\Desktop\ignition\sdk\modules\kernel\base\base-build\target\Base.modl
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/inductiveautomation/ignitionsdk/ModuleSigner$Main has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class
file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
I saw the modifications from @pturmel have been correctly added.
I also tried to compile with both 11.0.5 and 11.0.3 jdk versions.
What’s going on?
@mazeyrat were you able to sign your module with that configuration?
The module signer jar need to be compiled with jdk 11 and the call of this command need to use jre 11. You have to provide a full path of the java from jre 11 to avoid this kind of issue if multiples java are installed on your machine
You need to check java version for C:\DataBusiness\moranandr1\Desktop\ignition\sdk\module signer\module-signer-master\module-signer-master\target>java -version