<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Axon ivy Docker Java referenced class not found exception</title><link>https://answers.axonivy.com/questions/4203/axon-ivy-docker-java-referenced-class-not-found-exception</link><description>&lt;p&gt;Hi Ivy team,&lt;/p&gt;
&lt;p&gt;I use axon ivy version 7.3.1(Designer and Engine), maven 3.6.2
I've create a dialog form with "add new" button, when user click that button, it will call a method in Java class.&lt;/p&gt;
&lt;p&gt;after run and build with maven, I have a &lt;strong&gt;"xxx-app-1.0.0-SNAPSHOT.iar"&lt;/strong&gt;. &lt;/p&gt;
&lt;p&gt;I copy this file to deploy folder of &lt;strong&gt;"AxonIvyEngine7.3.1.1904101154_All_x64"&lt;/strong&gt;
and run Engine and then run web app . everything is ok when I click "add new" button&lt;/p&gt;
&lt;p&gt;But when I copy that file :&lt;strong&gt;"xxx-app-1.0.0-SNAPSHOT.iar"&lt;/strong&gt; in docker file :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;   FROM axonivy/axonivy-engine:7.3.1
   LABEL maintainer="xxxx@abc.com"
   COPY --chown=ivy:ivy target/xxx-app-1.0.0-SNAPSHOT.iar deploy/    ( this command will copy xxx-app-1.0.0-SNAPSHOT.iar to deploy folder on container )
   EXPOSE 8080
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and then I create a docker-compose file &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;version: '3.3'
 services:
  axonivy-engine:
    image: my-app-test    
    build: .
    ports:
     - 8082:8080
    restart: always
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Run docker-compose up&lt;/li&gt;
&lt;li&gt;Run web app and then click "add new" button. I've get a errors:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Errorrs:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Caused by: ch.ivyteam.ivy.scripting.exceptions.classDef.ReferencedClassNotFoundException: Referenced class 'com/axonivy/persistence/beans/GenericEntity' not found for class 'controller.AddNew'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I don't why with same a file &lt;strong&gt;IAR&lt;/strong&gt; but when I run it on local it run well and doesn't through any errors
.But after run from &lt;strong&gt;docker container&lt;/strong&gt; the UI still appear ok, but when user click button, it call method in java class then through errors&lt;/p&gt;
&lt;p&gt;I've check in zip file on  &lt;strong&gt;"work"&lt;/strong&gt;  folder in Engine in docker container it still exist all file java class&lt;/p&gt;
&lt;p&gt;can you guy help me please &lt;/p&gt;
&lt;p&gt;my iar file:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://answers.axonivy.com/upfiles/my-app-1.0.0-SNAPSHOT.png"&gt;link text&lt;/a&gt;&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/4203/axon-ivy-docker-java-referenced-class-not-found-exception" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 27 Nov 2019 04:23:54 -0500</lastBuildDate><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/4203/axon-ivy-docker-java-referenced-class-not-found-exception/4211</link><description>&lt;p&gt;You're IAR defines additional deps:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;dependencies&amp;gt; 
&amp;lt;dependency&amp;gt; 
&amp;lt;groupid&amp;gt;com.axonivy&amp;lt;/groupid&amp;gt; 
&amp;lt;artifactid&amp;gt;persistence&amp;lt;/artifactid&amp;gt; 
&amp;lt;version&amp;gt;0.0.1&amp;lt;/version&amp;gt; 
&amp;lt;/dependency&amp;gt;
&amp;lt;/dependencies&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You must add JAR dependencies from maven with your IAR: otherwise they will not be accessible to the engine&lt;/p&gt;
&lt;p&gt;&lt;a href="https://answers.axonivy.com/questions/2089/add-library-with-pom-xml"&gt;https://answers.axonivy.com/questions/2089/add-library-with-pom-xml&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Wed, 27 Nov 2019 04:23:54 -0500</pubDate><guid>https://answers.axonivy.com/questions/4203/axon-ivy-docker-java-referenced-class-not-found-exception/4211</guid></item></channel></rss>