# com.inductiveautomation.xopc.driver.api.configuration.DriverType

**URL:** <https://forum.inductiveautomation.com/t/com-inductiveautomation-xopc-driver-api-configuration-drivertype/32215>\
**Category:** Module Development\
**Created:** [February 13, 2020, 1:15pm UTC](https://forum.inductiveautomation.com/t/com-inductiveautomation-xopc-driver-api-configuration-drivertype/32215 "2020-02-13T13:15:30Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blynch](https://avatars.discourse-cdn.com/v4/letter/b/eada6e/32.png) [@Blynch](https://forum.inductiveautomation.com/u/Blynch)\
**Post date:** [February 13, 2020, 1:15pm UTC](https://forum.inductiveautomation.com/t/com-inductiveautomation-xopc-driver-api-configuration-drivertype/32215/1 "2020-02-13T13:15:30Z")

</div>

Hello,  
I’m trying to convert a legacy Driver from v7.9 to v8 and im getting the following Java error after installing the driver in Ignition v8 Gateway.

I realize that the class “com.inductiveautomation.xopc.driver.api.configuration.DriverType” cannot be loaded due to the changes made with the newer version however I don’t know how to get around this without rewriting my entire driver. i’m hoping there’s a 1:1 class that i can remap to but i’m sure its not that easy.

I’ve hunted trough the new programming guide supplied for v8 but haven’t had any luck yet.  
Any help would be greatly appreciated!!

com.inductiveautomation.ignition.common.modules.ModuleLoadException: Unable to load hook class “”.  
at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$LoadedModule.loadHook(ModuleManagerImpl.java:2299)  
at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$LoadedModule.load(ModuleManagerImpl.java:1994)  
at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl.startupModule(ModuleManagerImpl.java:1164)  
at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$2.call(ModuleManagerImpl.java:733)  
at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl.executeModuleOperation(ModuleManagerImpl.java:905)  
at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl.installModuleInternal(ModuleManagerImpl.java:695)  
at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$InstallCommand.execute(ModuleManagerImpl.java:1851)  
at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$Receiver.receiveCall(ModuleManagerImpl.java:1801)  
at com.inductiveautomation.ignition.gateway.redundancy.QueueableMessageReceiver.receiveCall(QueueableMessageReceiver.java:47)  
at com.inductiveautomation.ignition.gateway.redundancy.RedundancyManagerImpl.dispatchMessage(RedundancyManagerImpl.java:813)  
at com.inductiveautomation.ignition.gateway.redundancy.RedundancyManagerImpl$ExecuteTask.run(RedundancyManagerImpl.java:849)  
at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$ThrowableCatchingRunnable.run(BasicExecutionEngine.java:518)  
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.NoClassDefFoundError: com/inductiveautomation/xopc/driver/api/configuration/DriverType  
at java.base/java.lang.ClassLoader.defineClass1(Native Method)  
at java.base/java.lang.ClassLoader.defineClass(Unknown Source)  
at java.base/java.security.SecureClassLoader.defineClass(Unknown Source)  
at java.base/java.net.URLClassLoader.defineClass(Unknown Source)  
at java.base/java.net.URLClassLoader$1.run(Unknown Source)  
at java.base/java.net.URLClassLoader$1.run(Unknown Source)  
at java.base/java.security.AccessController.doPrivileged(Native Method)  
at java.base/java.net.URLClassLoader.findClass(Unknown Source)  
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)  
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)  
at driver.GatewayHook.(GatewayHook.java:22)  
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)  
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)  
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)  
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)  
at java.base/java.lang.Class.newInstance(Unknown Source)  
at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$LoadedModule.loadHook(ModuleManagerImpl.java:2279)  
… 17 more  
Caused by: java.lang.ClassNotFoundException: com.inductiveautomation.xopc.driver.api.configuration.DriverType  
at java.base/java.net.URLClassLoader.findClass(Unknown Source)  
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)  
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)  
… 34 more

8.0.2 (b2019060511)  
Azul Systems, Inc. 11.0.3

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 13, 2020, 2:11pm UTC](https://forum.inductiveautomation.com/t/com-inductiveautomation-xopc-driver-api-configuration-drivertype/32215/2 "2020-02-13T14:11:27Z")

</div>

That DriverType class does exist in v8. However, the OPC/UA server module name changed from `xopc` to `com.inductiveautomation.opcua`. Make sure you’ve made that adjustment in your build, or your module won’t be pulled into the classloader that has access to DriverType and all the other stuff you will need.

However, you _ **are** _ going to have a significant rewrite. All of the classes under `com.inductiveautomation.opcua.*` in v7.9 are gone. Most have replacements under `org.eclipse.milo.opcua.stack.*` or `org.eclipse.milo.opcua.sdk.*` in v8.0. There are semantic changes, too.

@Kevin.Herron, do you have a porting guide? I recall some suffering when doing this for my Ethernet/IP driver.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 13, 2020, 2:49pm UTC](https://forum.inductiveautomation.com/t/com-inductiveautomation-xopc-driver-api-configuration-drivertype/32215/3 "2020-02-13T14:49:22Z")

</div>

`DriverType` still exists and is defined at that location.

My guess is that your module isn’t being loaded underneath the OPC UA module’s ClassLoader any more because the module id changed from “xopc” to “com.inductiveautomation.opcua” but your module.xml is still referencing “xopc” as its dependency.

edit: lol, I just realized you already said this @pturmel. I didn’t read your post close enough 🙂

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 13, 2020, 2:53pm UTC](https://forum.inductiveautomation.com/t/com-inductiveautomation-xopc-driver-api-configuration-drivertype/32215/4 "2020-02-13T14:53:32Z")

</div>

As far as porting goes, there’s definitely _some_ work that needs to be done. You can still use your existing driver written against the `Driver` interface because of the adapter/bridge I wrote, but as @pturmel mentioned there’s a lot of OPC UA related imports that need updating.

Get your module compiling against the 8.0 SDK APIs, start deleting broken imports, and let your IDE help you start importing the new classes. Post here when you have questions.

---

<div class="post-metadata">

**Author:** ![Blynch](https://avatars.discourse-cdn.com/v4/letter/b/eada6e/32.png) [@Blynch](https://forum.inductiveautomation.com/u/Blynch)\
**Post date:** [February 13, 2020, 4:38pm UTC](https://forum.inductiveautomation.com/t/com-inductiveautomation-xopc-driver-api-configuration-drivertype/32215/5 "2020-02-13T16:38:37Z")

</div>

Fantastic! That worked.  
OK, now after successfully loading the module into my gateway i am not able to see the driver in the driver list when adding a new device. Could this be a class mismatch issue as well?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 13, 2020, 4:40pm UTC](https://forum.inductiveautomation.com/t/com-inductiveautomation-xopc-driver-api-configuration-drivertype/32215/6 "2020-02-13T16:40:19Z")

</div>

Check to see if the module is faulted and if there’s a bunch of errors in your gateway logs or not.

---

<div class="post-metadata">

**Author:** ![Blynch](https://avatars.discourse-cdn.com/v4/letter/b/eada6e/32.png) [@Blynch](https://forum.inductiveautomation.com/u/Blynch)\
**Post date:** [February 13, 2020, 4:41pm UTC](https://forum.inductiveautomation.com/t/com-inductiveautomation-xopc-driver-api-configuration-drivertype/32215/7 "2020-02-13T16:41:13Z")

</div>

The module is not faulted and there are no errors in the gateway log.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 13, 2020, 4:43pm UTC](https://forum.inductiveautomation.com/t/com-inductiveautomation-xopc-driver-api-configuration-drivertype/32215/8 "2020-02-13T16:43:38Z")

</div>

Guess you just need to start debugging/troubleshooting then. Maybe add some logging to your module hook and ensure that `getDriverTypes()` is being called for starters.

---

<div class="post-metadata">

**Author:** ![phandc](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@phandc](https://forum.inductiveautomation.com/u/phandc)\
**Post date:** [October 27, 2021, 3:51am UTC](https://forum.inductiveautomation.com/t/com-inductiveautomation-xopc-driver-api-configuration-drivertype/32215/9 "2021-10-27T03:51:19Z")

</div>

@Blynch How did you solve that problem?  
I got a similar problem, the Looger said “Caused by: java.lang.ClassNotFoundException: com.inductiveautomation.xopc.driver.api.DriverContext”. I know that DriverContext are in “com.inductiveautomation.opcua:opc-ua-gateway-api” package now. But my Intellij ide still recommend “com.inductiveautomation.xopc.driver.api.DriverContext”.

Thank you for your time!

---

<div class="post-metadata">

**Author:** ![Rahul\_k](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@Rahul\_k](https://forum.inductiveautomation.com/u/Rahul_k)\
**Post date:** [July 6, 2022, 5:13pm UTC](https://forum.inductiveautomation.com/t/com-inductiveautomation-xopc-driver-api-configuration-drivertype/32215/10 "2022-07-06T17:13:45Z")

</div>

Hi @Kevin.Herron

I am trying to import driver related classes in Ignition8.1.

I have added `opc-ua-gateway-api-9.1.13.jar` jar in my dependencies libs/.  
But my IDE is only recognizing `com.inductiveautomation.xopc.driver.api` classes instead of `com.inductiveautomation.opcua`.

I am able to generate a signed modl file (with imports as com.inductiveautomation.xopc.driver.api.) but when installed on Ignition server driver state is Faulted with below error

```auto
Error loading hook classes
com.inductiveautomation.ignition.common.modules.ModuleLoadException: Unable to load hook class "com.amazon.rme.castalia.GwHook" for module "com.amazon.rme.castalia".
at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$LoadedModule.loadHook(ModuleManagerImpl.java:2363)
at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$LoadedModule.load(ModuleManagerImpl.java:2036)
at java.base/java.lang.Thread.run(Unknown Source)

> Caused by: java.lang.NoClassDefFoundError: com/inductiveautomation/xopc/driver/common/AbstractDriverModuleHook

```

1Q. Can you please provide complete class for one Driver API (eg : AbstractDriverModuleHook)

2Q. Can you please elaborate more on how to pull xopc driver APIs in v8.1.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [July 6, 2022, 5:15pm UTC](https://forum.inductiveautomation.com/t/com-inductiveautomation-xopc-driver-api-configuration-drivertype/32215/11 "2022-07-06T17:15:54Z")

</div>

Why don’t you start by looking at the device example and seeing what dependencies it uses vs the ones you use: [ignition-sdk-examples/pom.xml at master · inductiveautomation/ignition-sdk-examples · GitHub](https://github.com/inductiveautomation/ignition-sdk-examples/blob/master/opc-ua-device/opc-ua-device-gateway/pom.xml)

You should also make sure your driver module declares its dependency on the OPC UA module: [ignition-sdk-examples/pom.xml at ddf234b4a900f28835bf16a350faf265e39f93df · inductiveautomation/ignition-sdk-examples · GitHub](https://github.com/inductiveautomation/ignition-sdk-examples/blob/ddf234b4a900f28835bf16a350faf265e39f93df/opc-ua-device/opc-ua-device-build/pom.xml#L55-L60)
