# Deploying a module that depends on several other JARs

**URL:** <https://forum.inductiveautomation.com/t/deploying-a-module-that-depends-on-several-other-jars/9541>\
**Category:** 3rd Party Modules\
**Created:** [January 13, 2015, 6:43pm UTC](https://forum.inductiveautomation.com/t/deploying-a-module-that-depends-on-several-other-jars/9541 "2015-01-13T18:43:57Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![troy.anderson](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@troy.anderson](https://forum.inductiveautomation.com/u/troy.anderson)\
**Post date:** [January 13, 2015, 6:43pm UTC](https://forum.inductiveautomation.com/t/deploying-a-module-that-depends-on-several-other-jars/9541/1 "2015-01-13T18:43:57Z")

</div>

I’m having a problem testing a module I developed. The module depends on several other JARs that I have included in the build process. The module appears to build and deploy to the gateway server correctly. However, I encounter an error when I attempt to launch the Ignition Designer. The error indicates that one of my dependent JARs cannot be found. I setup the project as described in the documentation. I verified that the dependent JARs are included in the module.

I am certain my module works because I can rebuild, deploy, and run my project without the dependent JARs by including the source code in those JARs within my module. The issue I am encountering is specifically related to building a module that is dependent on other JARs.

Thank you

---

<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:** [January 13, 2015, 6:51pm UTC](https://forum.inductiveautomation.com/t/deploying-a-module-that-depends-on-several-other-jars/9541/2 "2015-01-13T18:51:39Z")

</div>

Does your module.xml file have entries for each jar with the correct scopes?

---

<div class="post-metadata">

**Author:** ![troy.anderson](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@troy.anderson](https://forum.inductiveautomation.com/u/troy.anderson)\
**Post date:** [January 15, 2015, 2:18pm UTC](https://forum.inductiveautomation.com/t/deploying-a-module-that-depends-on-several-other-jars/9541/3 "2015-01-15T14:18:09Z")

</div>

Kevin,

I verified that the module.xml file has the proper scope definitions. All my dependent JARs are scoped to ‘DC’ since they are required by both designer and client.

The error I am seeing is “Exception: Error unpacking analysis.jar” The ‘analysis.jar’ archive is one of my dependent JARS. I copied the .modl to a temp folder and renamed it .zip. Then I extracted the contents to verify it contains everything that is needed. I see analysis.jar which has been packed to analysis.jar.pack.gz. I assume the problem occurs while unpacking analysis.jar.pack.gz to analysis.jar.

Thanks

---

<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:** [January 15, 2015, 5:27pm UTC](https://forum.inductiveautomation.com/t/deploying-a-module-that-depends-on-several-other-jars/9541/4 "2015-01-15T17:27:39Z")

</div>

Is this your only dependency jar or are there others? Do the others work? Can you post the entire text and stack trace of the error message?

Also - what version of Ignition and what version of the JDK are you using to build this?

EDIT: If you’re using Ignition 7.7 and JDK 8 you need to remove the attributes from the pack200 task in your build file that specify compatibility with Java 5.

---

<div class="post-metadata">

**Author:** ![troy.anderson](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@troy.anderson](https://forum.inductiveautomation.com/u/troy.anderson)\
**Post date:** [January 15, 2015, 6:43pm UTC](https://forum.inductiveautomation.com/t/deploying-a-module-that-depends-on-several-other-jars/9541/5 "2015-01-15T18:43:41Z")

</div>

Kevin,

There are other dependent JARs. Analysis.jar is the first in the build and module.xml list. I do not know if the others work since this error is the only thing I see. What I see is a pop-up dialog box with the following statement only "

Error launching application:  
Exception: Error unpacking analysis.jar  
"  
Buttons are ‘Exit’ or ‘Retry’ There is no stack trace I can see.

This dialog appears when I launch the ‘Designer’

I am using Java 8 with Ignition 7.7.1 on a Mac. I do not know what attributes you are referring to with respect to the ant task pack200. So I removed the attribute configfile="${p200props}" from each ant pack200 task but that did not resolve my problem. Plus I do not know where the ‘configfile’ is to look up what attributes I may need to remove.

---

<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:** [January 15, 2015, 7:01pm UTC](https://forum.inductiveautomation.com/t/deploying-a-module-that-depends-on-several-other-jars/9541/6 "2015-01-15T19:01:33Z")

</div>

There should be a pack200.properties file in your build directory somewhere…

If it has these lines in it, remove them:

```auto
com.sun.java.util.jar.pack.package.majver=150
com.sun.java.util.jar.pack.package.minver=7
```

[inductiveautomation.com/for … 45001&f=89](https://www.inductiveautomation.com/forum/viewtopic.php?p=45001&f=89)

---

<div class="post-metadata">

**Author:** ![troy.anderson](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@troy.anderson](https://forum.inductiveautomation.com/u/troy.anderson)\
**Post date:** [January 15, 2015, 7:05pm UTC](https://forum.inductiveautomation.com/t/deploying-a-module-that-depends-on-several-other-jars/9541/7 "2015-01-15T19:05:30Z")

</div>

Kevin,

I remember that before the holiday I made that change after finding that discussion thread on Google. It does not resolve my problem.

---

<div class="post-metadata">

**Author:** ![troy.anderson](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@troy.anderson](https://forum.inductiveautomation.com/u/troy.anderson)\
**Post date:** [January 24, 2015, 10:16pm UTC](https://forum.inductiveautomation.com/t/deploying-a-module-that-depends-on-several-other-jars/9541/8 "2015-01-24T22:16:32Z")

</div>

Kevin,

Do you have any other tips because the last one you posted does not work. Are there some logs somewhere I can look at to narrow down where my problem exists?

Thanks

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [January 26, 2015, 4:54pm UTC](https://forum.inductiveautomation.com/t/deploying-a-module-that-depends-on-several-other-jars/9541/9 "2015-01-26T16:54:52Z")

</div>

Try launching with the Java Console showing and get the full stack trace of the error it’s encountering unpacking the jar.

---

<div class="post-metadata">

**Author:** ![nifemi](https://avatars.discourse-cdn.com/v4/letter/n/a5b964/32.png) [@nifemi](https://forum.inductiveautomation.com/u/nifemi)\
**Post date:** [May 5, 2015, 2:05pm UTC](https://forum.inductiveautomation.com/t/deploying-a-module-that-depends-on-several-other-jars/9541/10 "2015-05-05T14:05:02Z")

</div>

Good day,

There is a " Copy built project jars and lib jars to temp folder" block in the build.xml of your module, it looks like a line needs to be added for each jar.

example to add collections-generic.jar, located in the ‘lib’ folder in the project gateway root:

```auto
<!-- Copy built project jars and lib jars to temp folder -->
<copy file="${basedir}/${modulename_compact}/Gateway/lib/collections-generic-4.01.jar" todir="${basedir}/${modulename_compact}/Build/temp_modl/" />
```

This is an old thread and you may no longer need it, but I just encountered the same problem and this solved it for me.

---

<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:** [May 5, 2015, 3:22pm UTC](https://forum.inductiveautomation.com/t/deploying-a-module-that-depends-on-several-other-jars/9541/11 "2015-05-05T15:22:20Z")

</div>

[quote=“nifemi”]Good day,

There is a " Copy built project jars and lib jars to temp folder" block in the build.xml of your module, it looks like a line needs to be added for each jar.

example to add collections-generic.jar, located in the ‘lib’ folder in the project gateway root:

```auto
<!-- Copy built project jars and lib jars to temp folder -->
<copy file="${basedir}/${modulename_compact}/Gateway/lib/collections-generic-4.01.jar" todir="${basedir}/${modulename_compact}/Build/temp_modl/" />
```

This is an old thread and you may no longer need it, but I just encountered the same problem and this solved it for me.[/quote]

Thanks for the update.

It’s worth noting that we have a new Maven-based SDK now, along with a Maven plugin for building modl files, and a lot of this work is handled by the plugin now. See [github.com/inductiveautomation/ … k-examples](https://github.com/inductiveautomation/ignition-sdk-examples) for more info.

---

<div class="post-metadata">

**Author:** ![troy.anderson](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@troy.anderson](https://forum.inductiveautomation.com/u/troy.anderson)\
**Post date:** [October 24, 2015, 3:52pm UTC](https://forum.inductiveautomation.com/t/deploying-a-module-that-depends-on-several-other-jars/9541/12 "2015-10-24T15:52:34Z")

</div>

I know I started this a year ago and never got back until now, sorry.

I’m still having this problem. The Java console states that I have duplicate entries for a class I have defined. This class is in one of my JARs that both the Designer and Client use. So I have scoped that JAR with “DC”.

I’m still using the same module and Java versions when I started this discussion.

I have tried everyones suggestions but this problem remains.

Here are some details:

The dependency order is as follows: designer control depends on the client control which depends on a few JARs. Some of the JARs depend on each other; I made sure all JAR dependencies are included. Each of my JAR dependencies contain class paths to the dependent JARs within their own manifests. Here are my module jar statements:

```
            <jar scope="C">utils.jar.pack.gz</jar>
	<jar scope="C">exceptions.jar.pack.gz</jar>
	<jar scope="C">core.jar.pack.gz</jar>
	<jar scope="C">mcatypes.jar.pack.gz</jar>
	<jar scope="C">math.jar.pack.gz</jar>
	<jar scope="C">datasrcs.jar.pack.gz</jar>
	<jar scope="C">radtypes.jar.pack.gz</jar>
	<jar scope="C">analysis.jar.pack.gz</jar>
	<jar scope="C">controls.jar.pack.gz</jar>
	<jar scope="CD">spectroscopy-client.jar.pack.gz</jar>
           <jar scope="D">spectroscopy-designer.jar.pack.gz</jar>

```

When I try to start the designer I add an error in the console indicating the designer control cannot find a class in my ‘controls.jar.pack.gz’ file. But my designer control is dependent on the spectroscopy-client.jar.pack.gz which depends on ‘controls.jar.pack.gz’ file. I tried changing the module.xml to include the jars like

```
            <jar scope="C">utils.jar.pack.gz</jar>
	<jar scope="C">exceptions.jar.pack.gz</jar>
	<jar scope="C">core.jar.pack.gz</jar>
	<jar scope="C">mcatypes.jar.pack.gz</jar>
	<jar scope="C">math.jar.pack.gz</jar>
	<jar scope="C">datasrcs.jar.pack.gz</jar>
	<jar scope="C">radtypes.jar.pack.gz</jar>
	<jar scope="C">analysis.jar.pack.gz</jar>
	<jar scope="CD">controls.jar.pack.gz</jar>
	<jar scope="CD">spectroscopy-client.jar.pack.gz</jar>
           <jar scope="D">spectroscopy-designer.jar.pack.gz</jar>

```

But the next time I start the designer I get an error indicating I’m missing a class that I know is contained in ‘datasrcs.jar.pack.gz’. So I tried changing my module.xml to

```
            <jar scope="C">utils.jar.pack.gz</jar>
	<jar scope="C">exceptions.jar.pack.gz</jar>
	<jar scope="C">core.jar.pack.gz</jar>
	<jar scope="C">mcatypes.jar.pack.gz</jar>
	<jar scope="C">math.jar.pack.gz</jar>
	<jar scope="CD">datasrcs.jar.pack.gz</jar>
	<jar scope="C">radtypes.jar.pack.gz</jar>
	<jar scope="C">analysis.jar.pack.gz</jar>
	<jar scope="CD">controls.jar.pack.gz</jar>
	<jar scope="CD">spectroscopy-client.jar.pack.gz</jar>
           <jar scope="D">spectroscopy-designer.jar.pack.gz</jar>

```

At this point I see an error in the Java console indicating duplicate class definitions found while unpacking ‘datasrcs.jar.pack.gz’.

Downloading “[http://localhost:8088/main/system/jar/mcom.canberra.opcua/datasrcs.jar](http://localhost:8088/main/system/jar/mcom.canberra.opcua/datasrcs.jar)” (timeout=60000)…  
Connect successful.  
Starting download of 6764 bytes  
Download successful (in 1ms), unpacking…  
Download attempt #1 for file datasrcs.jar failed.  
java.lang.Exception: Error unpacking datasrcs.jar  
at com.inductiveautomation.ignition.client.launch.steps.DownloadJarsStep.downloadJar(DownloadJarsStep.java:224)  
at com.inductiveautomation.ignition.client.launch.steps.DownloadJarsStep.run(DownloadJarsStep.java:78)  
at com.inductiveautomation.ignition.client.launch.AbstractStepRunner.run(AbstractStepRunner.java:32)  
at java.lang.Thread.run(Thread.java:745)  
Caused by: java.util.zip.ZipException: duplicate entry: com/canberra/controllable/IControllable.class  
at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:233)  
at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:109)  
at com.sun.java.util.jar.pack.NativeUnpack.writeEntry(NativeUnpack.java:323)  
at com.sun.java.util.jar.pack.NativeUnpack.run(NativeUnpack.java:226)  
at com.sun.java.util.jar.pack.NativeUnpack.run(NativeUnpack.java:247)  
at com.sun.java.util.jar.pack.UnpackerImpl.unpack(UnpackerImpl.java:136)  
at com.inductiveautomation.ignition.client.launch.steps.DownloadJarsStep.downloadJar(DownloadJarsStep.java:221)

Thanks

---

<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:** [October 24, 2015, 11:54pm UTC](https://forum.inductiveautomation.com/t/deploying-a-module-that-depends-on-several-other-jars/9541/13 "2015-10-24T23:54:54Z")

</div>

Well I guess the obvious question is: are you sure “com/canberra/controllable/IControllable.class” is defined only in one jar?

---

<div class="post-metadata">

**Author:** ![troy.anderson](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@troy.anderson](https://forum.inductiveautomation.com/u/troy.anderson)\
**Post date:** [October 25, 2015, 11:02am UTC](https://forum.inductiveautomation.com/t/deploying-a-module-that-depends-on-several-other-jars/9541/14 "2015-10-25T11:02:59Z")

</div>

Hi Kevin,

I thought not, based on examining the contents, until I tried a tool that err’d revealing duplicates existed. Then I looked at the build scripts for those dependent JARs and noticed duplicates were sneaking in. After fixing the build scripts everything is now working.

Thanks
