# 'Unable to load hook class ' exception deploying module

**URL:** <https://forum.inductiveautomation.com/t/unable-to-load-hook-class-exception-deploying-module/22328>\
**Category:** Module Development\
**Created:** [February 4, 2019, 6:05pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-hook-class-exception-deploying-module/22328 "2019-02-04T18:05:40Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![f.pinciaroli](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/f.pinciaroli/32/6101_2.png) [@f.pinciaroli](https://forum.inductiveautomation.com/u/f.pinciaroli)\
**Post date:** [February 4, 2019, 6:05pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-hook-class-exception-deploying-module/22328/1 "2019-02-04T18:05:40Z")

</div>

Hello,

I’m trying to deploy a new test module generated with the opc-ua-driver-archetype.  
The problem comes posting the modl to the gateway using the post goal…  
I get; Unable to load hook class “it.italprogetti.DriverHook”.  
Looking the .modl it seems the DriverHook class is placed in the right path(as specified in the pom.xml)

this is a part of the pom.xml

```auto
        <configuration>
                    <projectScopes>
                        <projectScope>
                            <name>test-driver</name>
                            <scope>G</scope>
                        </projectScope>
                    </projectScopes>

                    <moduleId>it.italprogetti.test-driver</moduleId>
                    <moduleName>${project.parent.name}</moduleName>
                    <moduleDescription>${project.description}</moduleDescription>
                    <moduleVersion>1.8.0</moduleVersion>
                    <requiredIgnitionVersion>7.7.0</requiredIgnitionVersion>
                    <requiredFrameworkVersion>6</requiredFrameworkVersion>

                    <hooks>
                        <hook>
                            <scope>G</scope>
                            <hookClass>it.italprogetti.DriverHook</hookClass>
                        </hook>
                    </hooks>

                </configuration>

Where is the problem?

Thanks,
Federico
```

---

<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 4, 2019, 6:14pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-hook-class-exception-deploying-module/22328/2 "2019-02-04T18:14:50Z")

</div>

Can you upload or send a copy of your built module and tell us what version of Ignition you’re trying to install it on?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 4, 2019, 6:17pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-hook-class-exception-deploying-module/22328/3 "2019-02-04T18:17:38Z")

</div>

Not an expert on our dependency resolution, but as far as I know there should be an indication that your module relies on the OPC-UA module in order to build. Are you using one of the module builder plugins?

---

<div class="post-metadata">

**Author:** ![f.pinciaroli](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/f.pinciaroli/32/6101_2.png) [@f.pinciaroli](https://forum.inductiveautomation.com/u/f.pinciaroli)\
**Post date:** [February 4, 2019, 8:20pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-hook-class-exception-deploying-module/22328/4 "2019-02-04T20:20:16Z")

</div>

My Ignition Version is 7.9.6  
I’m using the ignition maven plugin to build and post the module.

This is ta copy built module…  
[test-driver-Driver-Module-unsigned.modl](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/8de4b31b46b37784b07d2787f15c828858007293.modl) (2.3 KB)

---

<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 4, 2019, 8:32pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-hook-class-exception-deploying-module/22328/5 "2019-02-04T20:32:16Z")

</div>

@paul-griffith is correct that it’s missing a `<depends>` entry.

Copy it from this example: [https://github.com/inductiveautomation/ignition-sdk-examples/blob/master/ModbusDriverExample/mde-build/pom.xml](https://github.com/inductiveautomation/ignition-sdk-examples/blob/master/ModbusDriverExample/mde-build/pom.xml)

and see if that fixes it.

---

<div class="post-metadata">

**Author:** ![f.pinciaroli](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/f.pinciaroli/32/6101_2.png) [@f.pinciaroli](https://forum.inductiveautomation.com/u/f.pinciaroli)\
**Post date:** [February 4, 2019, 8:43pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-hook-class-exception-deploying-module/22328/6 "2019-02-04T20:43:12Z")

</div>

added the depends entry and now it works.

Thank you very much Kevin for the support.

Federico

---

<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, 2019, 2:16pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-hook-class-exception-deploying-module/22328/7 "2019-02-13T14:16:18Z")

</div>

A post was split to a new topic: [depDendency “fpmi” is not installed](https://forum.inductiveautomation.com/t/depdendency-fpmi-is-not-installed/22538)

---

<div class="post-metadata">

**Author:** ![Behzad.Ebrahimi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/behzad.ebrahimi/32/38108_2.png) [@Behzad.Ebrahimi](https://forum.inductiveautomation.com/u/Behzad.Ebrahimi)\
**Post date:** [November 1, 2022, 12:54am UTC](https://forum.inductiveautomation.com/t/unable-to-load-hook-class-exception-deploying-module/22328/8 "2022-11-01T00:54:25Z")

</div>

The link is invalid!  
Could I have a copy of 'ModbusDriverExample', please?

---

<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:** [November 1, 2022, 1:38am UTC](https://forum.inductiveautomation.com/t/unable-to-load-hook-class-exception-deploying-module/22328/9 "2022-11-01T01:38:26Z")

</div>

The Modbus driver example is deprecated, there is no reason you need to reference it for anything. If you’re building a new driver/device module then look at the device example on GitHub.

---

<div class="post-metadata">

**Author:** ![Behzad.Ebrahimi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/behzad.ebrahimi/32/38108_2.png) [@Behzad.Ebrahimi](https://forum.inductiveautomation.com/u/Behzad.Ebrahimi)\
**Post date:** [November 1, 2022, 6:10pm UTC](https://forum.inductiveautomation.com/t/unable-to-load-hook-class-exception-deploying-module/22328/11 "2022-11-01T18:10:15Z")

</div>

Thank you, Kevin  
But I need it to increase my knowledge.  
Also, I want to use some of the codes to easily create a setting page interface.  
Please send it to me via 'behzad.ebrahimi@FeedEngineering.com'
