# Unable to build modules from the example repo

**URL:** <https://forum.inductiveautomation.com/t/unable-to-build-modules-from-the-example-repo/24513>\
**Category:** Module Development\
**Created:** [April 30, 2019, 3:13pm UTC](https://forum.inductiveautomation.com/t/unable-to-build-modules-from-the-example-repo/24513 "2019-04-30T15:13:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [April 30, 2019, 3:13pm UTC](https://forum.inductiveautomation.com/t/unable-to-build-modules-from-the-example-repo/24513/1 "2019-04-30T15:13:13Z")

</div>

version: 7.9.10  
os: win 7 pro  
ide: intelliJ

Hey everyone,

I'm new to these territories of Ignition and I'm following:  
[https://docs.inductiveautomation.com/display/SE/Environment+Setup](https://docs.inductiveautomation.com/display/SE/Environment+Setup)

I'm using chocolatey as my package manager.  
I successfully cloned the example repo:  
`git clone https://github.com/inductiveautomation/ignition-sdk-examples.git`

I launched the IDE via pom.xml it looks like all dependencies are downloaded and cached.

Then when I run `mvn package` from git or cmd I get an error about class 55.0 should be 52.0  
error:

> ```
> class file has wrong version 55.0, should be 52.0
> Please remove or make sure it appears in the correct subdirectory of the classpath.
> 
> ```

Additional notes with regards to [Environment Setup - Ignition SDK Programmer's Guide - Ignition Documentation](https://docs.inductiveautomation.com/display/SE/Environment+Setup)  
Step 1: "You will need Java JDK 1.8+..."  
Is this required because when I used chocolatey to install maven it forced me to download jdk 18.0\_211?

Step 3: "you will want a running version of Ignition..."  
This step doesn't specify what version, but the git repo's readme.md states "A running, 8.0+ version of Ignition" as a requirement.

---

<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:** [April 30, 2019, 3:14pm UTC](https://forum.inductiveautomation.com/t/unable-to-build-modules-from-the-example-repo/24513/2 "2019-04-30T15:14:32Z")

</div>

The docs are a bit out of date, you need JDK 11, which is what that error is about.

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [April 30, 2019, 3:33pm UTC](https://forum.inductiveautomation.com/t/unable-to-build-modules-from-the-example-repo/24513/3 "2019-04-30T15:33:44Z")

</div>

@Kevin.Herron thank you!

To anyone else experiencing the same issue; after installing jdk 11 you’ll need to update your JAVA\_HOME environment variables and point to the jdk11 install directory. I restarted git/bash and was able to the build the module.

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [April 30, 2019, 6:22pm UTC](https://forum.inductiveautomation.com/t/unable-to-build-modules-from-the-example-repo/24513/4 "2019-04-30T18:22:35Z")

</div>

While that fixed the build of the expression sample. I'm getting a different error when building the scripting example (which is the one I'm really after).

> [INFO] -------------------------------------------------------------  
> [ERROR] COMPILATION ERROR :  
> [INFO] -------------------------------------------------------------  
> [ERROR] /Z:/SHARED/ignitionDev/ignition-sdk-examples/scripting-function/scripting-function-gateway/src/main/java/com/inductiveautomation/ignition/examples/scripting/GatewayHook.java:[43,5] method does not override or implement a method from a supertype  
> [INFO] 1 error  
> [INFO] -------------------------------------------------------------  
> [INFO] ------------------------------------------------------------------------  
> [INFO] Reactor Summary for scripting-function 1.0.0-SNAPSHOT:  
> [INFO]  
> [INFO] scripting-function ................................. SUCCESS [0.127 s]  
> [INFO] scripting-function-common .......................... SUCCESS [01:19 min]  
> [INFO] scripting-function-client .......................... SUCCESS [18.879 s]  
> [INFO] scripting-function-designer ........................ SUCCESS [8.095 s]  
> [INFO] scripting-function-gateway ......................... FAILURE [28.707 s]  
> [INFO] scripting-function-build ........................... SKIPPED  
> [INFO] ------------------------------------------------------------------------  
> [INFO] BUILD FAILURE  
> [INFO] ------------------------------------------------------------------------  
> [INFO] Total time: 02:20 min  
> [INFO] Finished at: 2019-04-30T13:14:50-05:00  
> [INFO] ------------------------------------------------------------------------  
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project scripting-function-gateway: Compilation failure  
> [ERROR] /Z:/SHARED/ignitionDev/ignition-sdk-examples/scripting-function/scripting-function-gateway/src/main/java/com/inductiveautomation/ignition/examples/scripting/GatewayHook.java:[43,5] method does not override or implement a method from a supertype

---

<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:** [April 30, 2019, 7:04pm UTC](https://forum.inductiveautomation.com/t/unable-to-build-modules-from-the-example-repo/24513/5 "2019-04-30T19:04:00Z")

</div>

This one isn’t your fault, the scripting example needed to be updated. I just pushed the fix and it should compile now once you pull the changes in.

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [April 30, 2019, 7:06pm UTC](https://forum.inductiveautomation.com/t/unable-to-build-modules-from-the-example-repo/24513/6 "2019-04-30T19:06:53Z")

</div>

I'm just cowboy'ing over here and decided to delete:

> @Override  
> public Object getRPCHandler(......)

I got the module to build, but then noticed the method did not work (no RPC handler lol)

@Kevin.Herron, pulled the changes and it built. Thanks!

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [April 30, 2019, 7:43pm UTC](https://forum.inductiveautomation.com/t/unable-to-build-modules-from-the-example-repo/24513/7 "2019-04-30T19:43:13Z")

</div>

How do I build this module for a 7.9.10 install?  
I tried modifying the parent pom.xml  
from:  
`<ignition-platform-version>8.0.0</ignition-platform-version>`  
to:  
`<ignition-platform-version>7.9.10</ignition-platform-version>`

> [ERROR] Failed to execute goal on project scripting-function-gateway: Could not resolve dependencies for project com.inductiveautomation.ignition.examples:scripting-function-gateway:jar:1.0.0-SNAPSHOT: Could not find artifact org.eclipse.milo:sdk-client:jar:0.1.0-SNAPSHOT in snapshots ([https://nexus.inductiveautomation.com/repository/inductiveautomation-snapshots](https://nexus.inductiveautomation.com/repository/inductiveautomation-snapshots))

I also tried using 7.9.0 with the same results. My thought behind that was if I can import modules to a 8.0.1-rc1 gateway using 8.0.0 as the ignition-platform-version then 7.9.0 would work with all 7.9.\*  
Unfortunately, that wasn't the case.

---

<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:** [April 30, 2019, 7:49pm UTC](https://forum.inductiveautomation.com/t/unable-to-build-modules-from-the-example-repo/24513/8 "2019-04-30T19:49:23Z")

</div>

There’s a branch in that repo called `ignition-7.9` that has the 7.9 version of the examples: [https://github.com/inductiveautomation/ignition-sdk-examples/tree/ignition-7.9](https://github.com/inductiveautomation/ignition-sdk-examples/tree/ignition-7.9)

Changing the SDK version is not enough, some examples don’t even exist and others have been changed quite a bit.

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [April 30, 2019, 8:15pm UTC](https://forum.inductiveautomation.com/t/unable-to-build-modules-from-the-example-repo/24513/9 "2019-04-30T20:15:54Z")

</div>

Thanks @Kevin.Herron. I was able to build the 7.9 scripting example using the correct branch.
