Custom driver has No ClassDefFoundError; works on Ignition V8.1.24 but fails in V8.1.27 +

Hello Team,

We have a custom driver module created for a particular MHE ; and this is working fine on our current fleet version of Ignition V8.1.24.
We are in the process of upgrading to the minor revision V8.1.3+; and this particular driver which works well on the 8.1.24 fails with a error of Couldnot initialise class.
We think we are missing some api s on the newer sdk; is that the case?
How could we make this module suitable for the latest Ignition version.

Thanks,
Amazon MAP Team

java.lang.NoClassDefFoundError: Could not initialize class com.amazon.rme.castalia.driver.DematicSC3XopcDriver at com.amazon.rme.castalia.driver.DematicSC3XopcDriverType.createDriver([DematicSC3XopcDriverType.java:112](http://dematicsc3xopcdrivertype.java:112/)) at com.inductiveautomation.ignition.gateway.opcua.server.DriverAdapter$DriverAddressSpace.startup(DriverAdapter.kt:146) at com.inductiveautomation.ignition.gateway.opcua.server.DriverAdapter.startup(DriverAdapter.kt:82) at com.inductiveautomation.ignition.gateway.opcua.server.DeviceManager$DeviceAddressSpace.startup(DeviceManager.kt:443) at com.inductiveautomation.ignition.gateway.opcua.server.DeviceManager.createAndStartupDevice(DeviceManager.kt:236) at com.inductiveautomation.ignition.gateway.opcua.server.DeviceManager.access$createAndStartupDevice(DeviceManager.kt:52) at com.inductiveautomation.ignition.gateway.opcua.server.DeviceManager$DeviceSettingsRecordListener$recordUpdated$1.invokeSuspend(DeviceManager.kt:397) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)




ava.lang.ExceptionInInitializerError: null
at com.amazon.rme.castalia.driver.DematicSC3XopcDriver.(DematicSC3XopcDriver.java:174)
at com.amazon.rme.castalia.driver.DematicSC3XopcDriverType.createDriver(DematicSC3XopcDriverType.java:112)
at com.inductiveautomation.ignition.gateway.opcua.server.DriverAdapter$DriverAddressSpace.startup(DriverAdapter.kt:146)
at com.inductiveautomation.ignition.gateway.opcua.server.DriverAdapter.startup(DriverAdapter.kt:82)
at com.inductiveautomation.ignition.gateway.opcua.server.DeviceManager$DeviceAddressSpace.startup(DeviceManager.kt:443)
at com.inductiveautomation.ignition.gateway.opcua.server.DeviceManager.createAndStartupDevice(DeviceManager.kt:236)
at com.inductiveautomation.ignition.gateway.opcua.server.DeviceManager.access$createAndStartupDevice(DeviceManager.kt:52)
at com.inductiveautomation.ignition.gateway.opcua.server.DeviceManager$DeviceSettingsRecordListener$recordAdded$1.invokeSuspend(DeviceManager.kt:317)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at com.inductiveautomation.ignition.gateway.opcua.server.DeviceManager$DeviceSettingsRecordListener.recordAdded(DeviceManager.kt:316)
at com.inductiveautomation.ignition.gateway.opcua.server.DeviceManager$DeviceSettingsRecordListener.recordAdded(DeviceManager.kt:314)
at com.inductiveautomation.ignition.gateway.localdb.PersistenceInterfaceImpl.notifyRecordAdded(PersistenceInterfaceImpl.java:168)
at com.inductiveautomation.ignition.gateway.redundancy.RedundantPersistenceInterfaceImpl.doNotifyRecordAdded(RedundantPersistenceInterfaceImpl.java:98)
at com.inductiveautomation.ignition.gateway.redundancy.RedundantPersistenceInterfaceImpl$RecordUpdateListener.recordAdded(RedundantPersistenceInterfaceImpl.java:398)
at com.inductiveautomation.ignition.gateway.redundancy.RedundantPersistenceInterfaceImpl$RecordAddedMessage.notify(RedundantPersistenceInterfaceImpl.java:474)
at com.inductiveautomation.ignition.gateway.redundancy.RedundantPersistenceInterfaceImpl$RecordUpdateListener.receiveCall(RedundantPersistenceInterfaceImpl.java:390)
at com.inductiveautomation.ignition.gateway.redundancy.QueueableMessageReceiver.receiveCall(QueueableMessageReceiver.java:47)
at com.inductiveautomation.ignition.gateway.redundancy.RedundancyManagerImpl.dispatchMessage(RedundancyManagerImpl.java:1042)
at com.inductiveautomation.ignition.gateway.redundancy.RedundancyManagerImpl$ExecuteTask.run(RedundancyManagerImpl.java:1110)
at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$ThrowableCatchingRunnable.run(BasicExecutionEngine.java:544)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: java.lang.NoSuchMethodException: org.eclipse.milo.opcua.stack.core.types.builtin.Variant.(java.lang.String)
at com.rme.xopcutil.nodes.NodeDataType.getVariantConstructor(NodeDataType.java:111)
at com.rme.xopcutil.nodes.NodeDataType.createWithTransformer(NodeDataType.java:87)
at com.rme.xopcutil.nodes.NodeDataType.(NodeDataType.java:28)
... 33 common frames omitted
Caused by: java.lang.NoSuchMethodException: org.eclipse.milo.opcua.stack.core.types.builtin.Variant.(java.lang.String)
at java.base/java.lang.Class.getConstructor0(Unknown Source)
at java.base/java.lang.Class.getConstructor(Unknown Source)
at com.rme.xopcutil.nodes.NodeDataType.getVariantConstructor(NodeDataType.java:100)
... 35 common frames omitted

This means the static initializer of your driver class is throwing an uncaught Exception.

It looks like the root of it is this:

Caused by: java.lang.NoSuchMethodException: org.eclipse.milo.opcua.stack.core.types.builtin.Variant.(java.lang.String)

The Variant constructor(s) did not change any time recently, so it may have something to do with whatever your com.rme.xopcutil.nodes.NodeDataType.getVariantConstructor function is doing and how it behaves on JDK 11 vs JDK 17.