Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java java.lang.ClassNotFoundException: jade.core.migration.InterPlatformMobilityService

Tags:

java

maven

I’m trying to resolve java.lang.ClassNotFoundException:jade.core.migration.InterPlatformMobilityService, which occurs in the JADE (Java Agent Development Framework) when I install add package for “Inter” platform mobility, which has a JAR titled “migration.jar” which contains InterPlatformMobilityService class. I need this extra JAR, to send an agent (code & data) across different computers.

Here is my output that shows the error:

INFO: Service jade.core.mobility.AgentMobility initialized
Sep 03, 2021 3:38:48 PM jade.core.AgentContainerImpl initAdditionalServices
WARNING: Exception initializing service jade.core.migration.InterPlatformMobilityService
jade.core.ServiceException: An error occurred during service activation - Caused by:  jade.core.migration.InterPlatformMobilityService
        at jade.core.AgentContainerImpl.startService(AgentContainerImpl.java:1169)
        at jade.core.AgentContainerImpl.initAdditionalServices(AgentContainerImpl.java:450)
        at jade.core.AgentContainerImpl.startNode(AgentContainerImpl.java:389)
        at jade.core.AgentContainerImpl.joinPlatform(AgentContainerImpl.java:502)
        at jade.core.Runtime.createMainContainer(Runtime.java:159)
        at abc.def.hgi.Setup.start(Setup.java:47)
        at abc.def.hgi.App.main(App.java:51)
Nested Exception:
java.lang.ClassNotFoundException: jade.core.migration.InterPlatformMobilityService
        at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at jade.core.AgentContainerImpl.startService(AgentContainerImpl.java:1153)
        at jade.core.AgentContainerImpl.initAdditionalServices(AgentContainerImpl.java:450)
        at jade.core.AgentContainerImpl.startNode(AgentContainerImpl.java:389)
        at jade.core.AgentContainerImpl.joinPlatform(AgentContainerImpl.java:502)
        at jade.core.Runtime.createMainContainer(Runtime.java:159)
        at abc.def.hgi.Setup.start(Setup.java:47)
        at abc.def.hgi.App.main(App.java:51)

My code is purely Java & built via Maven, here is my pom:

 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>abc.def.ghi</groupId>
      <artifactId>my_edge_ai</artifactId>
      <packaging>jar</packaging>
      <version>1.0-SNAPSHOT</version>
      <name>my_edge_ai</name>
      <url>http://maven.apache.org</url>
     <properties>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        </properties>
        <repositories>
            <repository> 
                <id>tilab</id> 
                <url>https://jade.tilab.com/maven/</url> 
            </repository>
                <repository>
                    <id>jade-ipms</id>
                    <url>file:${basedir}/add-ons/ipms/lib/migration.jar</url>
                </repository>
                <repository>
                    <id>jade-ipms-harcoded</id>
                    <url></url>
                </repository>
        </repositories>
        <dependencies>
            <dependency>  
                <groupId>com.tilab.jade</groupId> 
                <artifactId>jade</artifactId> 
                <version>4.5.0</version>  
            </dependency>
            <dependency>  
                <groupId>com.tilab.jade</groupId> 
                <artifactId>jade-misc</artifactId> 
                <version>2.8.0</version>  
            </dependency>
            <dependency>  
                <groupId>com.tilab.jade</groupId> 
                <artifactId>jade-test-suite</artifactId> 
                <version>1.13.0</version>  
            </dependency>
            <dependency>  
                <groupId>com.tilab.jade</groupId> 
                <artifactId>jade-wsdc</artifactId> 
                <version>2.7.0</version>  
            </dependency>
    
            <dependency>  
                <groupId>com.tilab.jade</groupId> 
                <artifactId>jade-xml-codec</artifactId> 
                <version>1.11.0</version>  
            </dependency>
        </dependencies>
        <build>
            <plugins>
                <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.1.1</version>
                </plugin>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
            <execution>
                <id>copy-dependencies</id>
                <phase>prepare-package</phase>
                <goals>
                    <goal>copy-dependencies</goal>
                </goals>
                <configuration>
                    <outputDirectory>
                        ${project.build.directory}/libs
                    </outputDirectory>
                </configuration>
            </execution>
        </executions>
    </plugin>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
            <archive>
                <manifest>
                    <addClasspath>true</addClasspath>
                    <classpathPrefix>libs/</classpathPrefix>
                    <mainClass>
                        abc.def.ghi.App
                    </mainClass>
                </manifest>
            </archive>
        </configuration>
    </plugin>
            </plugins>
        </build>
    </project>

Based the JADE’s ipms (InterPlatformMobilityService) download guide, I extracted “ipmsAddOn-1.5.zp” under the my <my_path>/jade/<extract_here> , the same level that <my_path>/jade/lib resides, see the “ipms” README: https://jade.tilab.com/doc/tutorials/ipms/README

Finally, I built my project via “mvn clean install”, with success, output snippet:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  13.753 s
[INFO] Finished at: 2021-09-03T15:22:24-07:00
[INFO] ------------------------------------------------------------------------

I ran my “jar” via:

java -jar ./target/my_edge_ai-1.0-SNAPSHOT.jar 1 main

The java code attempts to initialize JADE with InterPlatformMobilityService via (refer snippet): Which start JADE, with this exception:

This is referenced from (Usage of the JADE Mobility Services, by Fabio Bellifemine etl al.):

“6.4.2 INTER-PLATFORM MOBILITY SERVICE The IPMS is not built into the platform and must be installed as an add-on. To install the add-on, the package distribution file must be unzipped inside the JADE folder from where the ant lib command is used to create a Jar file containing all compiled class files. To use the service, it must be explicitly specified on the command line, without forgetting to include the Intra-Platform Mobility Service first:”

java jade.Boot -services jade.core.mobility.AgentMobilityService;jade.core.migration. InterPlatformMobilityService

I was getting the same java.lang.ClassNotFoundException, when attempting to launch Intra-Platform Mobility Service via both Java or command-line approach.

Attempt 1 (migration.jar as repo to the pom.xml):

<repositories>
        <repository> 
            <id>tilab</id> 
            <url>https://jade.tilab.com/maven/</url> 
        </repository>
            <repository>
                <id>jade-ipms</id>
                <url>file:${basedir}/add-ons/ipms/lib/migration.jar</url>
            </repository>
            <repository>
                <id>jade-ipms-harcoded</id>
                <url>/root/my/my/jade/jade/add-ons/ipms/lib/migration.jar</url>
            </repository>
    </repositories>

Built project without errors, however got the same exception as runtime: java.lang.ClassNotFoundException: jade.core.migration.InterPlatformMobilityService.

Attempt 2 ( I copied the migration.jar, manually to my projects /lib):

root@pc-064067:~/my/my/jade/jade/my_edge_ai/my_edge_ai/libs# ls
commons-codec-1.3.jar  jade.jar  migration.jar

Again, built project without errors, however got the same exception as runtime: java.lang.ClassNotFoundException: jade.core.migration.InterPlatformMobilityService.

Attempt # 3, I added migration.jar, to my system class path:

export CLASSPATH=/root/my/my/jade/jade/my_edge_ai/my_edge_ai/libs/jade.jar:$CLASSPATH
export CLASSPATH=/root/my/my/jade/jade/my_edge_ai/my_edge_ai/libs/commons-codec-1.3.jar:$CLASSPATH
export CLASSPATH=/root/my/my /jade/jade/my_edge_ai/my_edge_ai/libs/migration.jar:$CLASSPATH

java -jar ./target/my-1.0-SNAPSHOT.jar 1 main

Again, built project without errors, however got the same exception as runtime: java.lang.ClassNotFoundException: jade.core.migration.InterPlatformMobilityService.

I got the same error also using Java -cp or -classpath flag.

I finally, opened up migration.jar in order to inspect if jade.core.migration.InterPlatformMobilityService was actually present which it was.

Attempt # 4) I did something nasty, I copied the classes in migration.jar directly under my src/main/java, however again the same error!

java.lang.ClassNotFoundException: jade.core.migration.InterPlatformMobilityService.

Attempt 5:

  1. Based on StackOverflow feedback, I installed the JAR locally like this:

    mvn install:install-file -Dfile=/home/azureuser/cyz/my/multi_agents/my_edge_ai/JadeDownload/jade/add-ons/ipms/lib/migration.jar -DgroupId=jade.core.migration -DartifactId=InterPlatformMobilityService -Dversion=1.5 -Dpackaging=jar -DJadeAddOnsPath=/home/azureuser/xyz/my/multi_agents/my_edge_ai/JadeDownload/jade/add-ons/ipms/lib/

Output snippet:

[INFO] ---------------------< abc.def.hgi:my_edge_ai >---------------------
[INFO] Building my_edge_ai 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ my_edge_ai ---
[INFO] Installing /home/azureuser/xyz/my/multi_agents/my_edge_ai/JadeDownload/jade/add-ons/ipms/lib/migration.jar to /home/azureuser/.m2/repository/jade/core/migration/InterPlatformMobilityService/1.5/InterPlatformMobilityService-1.5.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.893 s
[INFO] Finished at: 2021-09-07T23:50:50Z
[INFO] ------------------------------------------------------------------------
  1. Added this dependency block to the dependencies section:
jade.core.migration migration 1.5 system ${JadeAddOnsPath}/migration.jar
  1. Built the project :

    sudo mvn clean install -DJadeAddOnsPath=/home/azureuser/xyz/my/multi_agents/my_edge_ai/JadeDownload/jade/add-ons/ipms/lib/

Output snippet:

[INFO] --- maven-jar-plugin:3.1.1:jar (default-jar) @ my_edge_ai ---
[INFO] Building jar: /home/azureuser/xyz/my/multi_agents/my_edge_ai/my_edge_ai/target/my_edge_ai-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ my_edge_ai ---
[INFO] Installing /home/azureuser/xyz/my/multi_agents/my_edge_ai/my_edge_ai/target/my_edge_ai-1.0-SNAPSHOT.jar to /root/.m2/repository/abc/def/hgi/my_edge_ai/1.0-SNAPSHOT/my_edge_ai-1.0-SNAPSHOT.jar
[INFO] Installing /home/azureuser/xyz/my/multi_agents/my_edge_ai/my_edge_ai/pom.xml to /root/.m2/repository/abc/def/hgi/my_edge_ai/1.0-SNAPSHOT/my_edge_ai-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.609 s
[INFO] Finished at: 2021-09-07T23:51:57Z
[INFO] ------------------------------------------------------------------------

However same error:

WARNING: Exception initializing service jade.core.migration.InterPlatformMobilityService
jade.core.ServiceException: An error occurred during service activation - Caused by:  jade.core.migration.InterPlatformMobilityService
        at jade.core.AgentContainerImpl.startService(AgentContainerImpl.java:1169)
        at jade.core.AgentContainerImpl.initAdditionalServices(AgentContainerImpl.java:450)
        at jade.core.AgentContainerImpl.startNode(AgentContainerImpl.java:389)
        at jade.core.AgentContainerImpl.joinPlatform(AgentContainerImpl.java:502)
        at jade.core.Runtime.createMainContainer(Runtime.java:159)
        at abc.def.hgi.Setup.start(Setup.java:68)
        at abc.def.hgi.App.main(App.java:55)
Nested Exception:
java.lang.ClassNotFoundException: jade.core.migration.InterPlatformMobilityService
        at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at jade.core.AgentContainerImpl.startService(AgentContainerImpl.java:1153)
        at jade.core.AgentContainerImpl.initAdditionalServices(AgentContainerImpl.java:450)
        at jade.core.AgentContainerImpl.startNode(AgentContainerImpl.java:389)
        at jade.core.AgentContainerImpl.joinPlatform(AgentContainerImpl.java:502)
        at jade.core.Runtime.createMainContainer(Runtime.java:159)
        at abc.def.hgi.Setup.start(Setup.java:68)
        at abc.def.hgi.App.main(App.java:55)

Attempt #6 (use jar -, based on stackoverflow feedback):

Searching for jade.core.migration.InterPlatformMobilityService in the atual JAR, therefore MUST be under jade/core/migration/InterPlatformMobilityService, which it is, see bold section.

jar -tvf ./add-ons/ipms/lib/migration.jar 

Output snippet:

0 Tue May 23 16:26:46 PDT 2017 META-INF/
   103 Tue May 23 16:26:44 PDT 2017 META-INF/MANIFEST.MF
     0 Tue May 23 16:26:44 PDT 2017 jade/
     0 Tue May 23 16:26:44 PDT 2017 jade/core/
     0 Tue May 23 16:26:46 PDT 2017 jade/core/migration/
     0 Tue May 23 16:26:46 PDT 2017 jade/core/migration/analysis/
     0 Tue May 23 16:26:46 PDT 2017 jade/core/migration/code/
     0 Tue May 23 16:26:46 PDT 2017 jade/core/migration/ontology/
     0 Tue May 23 16:26:46 PDT 2017 samples/
     0 Tue May 23 16:26:46 PDT 2017 samples/mobilegui/
  2739 Tue May 23 16:26:44 PDT 2017 jade/core/migration/AMSInitiator$PowerupRequest.class
  8881 Tue May 23 16:26:44 PDT 2017 jade/core/migration/AMSInitiator.class
 10918 Tue May 23 16:26:46 PDT 2017 jade/core/migration/AMSResponder.class
  1003 Tue May 23 16:26:46 PDT 2017 jade/core/migration/InterPlatformMobilityHelper.class
  2526 Tue May 23 16:26:46 PDT 2017 jade/core/migration/InterPlatformMobilityProxy.class
   272 Tue May 23 16:26:46 PDT 2017 **jade/core/migration/InterPlatformMobilityService$1.class**
  1687 Tue May 23 16:26:46 PDT 2017 jade/core/migration/InterPlatformMobilityService$CodeLocatorMonitor.class
  6816 Tue May 23 16:26:46 PDT 2017 jade/core/migration/InterPlatformMobilityService$CommandOutgoingFilter.class

I also checked the JAR manually by changing it to zip & jade.core.migration.InterPlatformMobilityService is where its suppose to be:

enter image description here

root:~/my/my/jade/jade/my_edge_ai/my_edge_ai# jar -tvf ./target/my_edge_ai-1.0-SNAPSHOT.jar   

Output:

401 Wed Sep 08 12:40:46 PDT 2021 META-INF/MANIFEST.MF
     0 Wed Sep 08 12:40:46 PDT 2021 META-INF/
     0 Wed Sep 08 12:40:40 PDT 2021 abc/
     0 Wed Sep 08 12:40:40 PDT 2021 abc/def/
     0 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/
     0 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/yellowpages/
     0 Wed Sep 08 12:40:46 PDT 2021 META-INF/maven/
     0 Wed Sep 08 12:40:46 PDT 2021 META-INF/maven/abc.def.hgi/
     0 Wed Sep 08 12:40:46 PDT 2021 META-INF/maven/abc.def.hgi/my_edge_ai/
  1045 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/App.class
  3438 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/ManagerAgent.class
  2164 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/SearchForAudioAgent$1.class
  3993 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/SearchForAudioAgent.class
  2228 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/SearchForBiometricAgent$1.class
  3024 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/SearchForBiometricAgent.class
  3316 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/SearchForImageAnalysisAgent.class
  1094 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/TestAgent$1.class
  3555 Tue Sep 07 15:44:40 PDT 2021 META-INF/maven/abc.def.hgi/my_edge_ai/pom.xml
  2703 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/AudioAnalysisRegisterAgent$InaCyclicBehavior.class
  2264 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/SearchForImageAnalysisAgent$1.class
  2669 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/Setup.class
  1406 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/TestAgent.class
    98 Wed Sep 08 12:40:46 PDT 2021 META-INF/maven/abc.def.hgi/my_edge_ai/pom.properties
  4507 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/AudioAnalysisRegisterAgent.class
  2313 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/yellowpages/DFRegisterAgent.class
  2667 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/yellowpages/DFSubscribeAgent$1.class
  2827 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/BiometricsRegisterAgent.class
  2755 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/yellowpages/DFSearchAgent.class
  1870 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/yellowpages/DFSubscribeAgent.class
   284 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/HelloAgent.class
   275 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/HiAgent.class
  1891 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/ManagerAgent$1.class
  2481 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/yellowpages/SubDF.class
  2836 Wed Sep 08 12:40:40 PDT 2021 abc/def/hgi/ImageAnalyisRegisterAgent.class

Further investigations:

MANIFEST.MF of the projects built Jar(./target/my-1.0-SNAPSHOT.jar):

Manifest-Version: 1.0
Built-By: root
Class-Path: libs/jade-4.5.0.jar libs/commons-codec-1.3.jar libs/jade-m
 isc-2.8.0.jar libs/jade-test-suite-1.13.0.jar libs/jade-wsdc-2.7.0.ja
 r libs/axis-plus-1.4.0.jar libs/addressing-1.1.1.jar libs/wss4j-1.5.1
 .jar libs/xmlsec-1.3.0.jar libs/jade-xml-codec-1.11.0.jar
Created-By: Apache Maven 3.6.3
Build-Jdk: 1.8.0_292
Main-Class: abc.def.ghi.App

Attempt # 7 (Issue only solved on local machine) :

  1. I decided to build a "fat JAR" that includes all libraries (http://tutorials.jenkov.com/maven/maven-build-fat-jar.html) inside the JAR itself.

  2. I updated the pom.xml by adding this fat JAR plugin:

    org.apache.maven.plugins maven-assembly-plugin 3.1.1
                 <configuration>
                     <descriptorRefs>
                         <descriptorRef>jar-with-dependencies</descriptorRef>
                     </descriptorRefs>
                     <archive>
                         <manifest>
                             <addClasspath>true</addClasspath>
                             <classpathPrefix>libs/</classpathPrefix>
                             <mainClass>abc.def.ghi.App</mainClass>
                         </manifest>
                     </archive>
                 </configuration>
                 <executions>
                     <execution>
                         <id>make-assembly</id>
                         <phase>package</phase>
                         <goals>
                             <goal>single</goal>
                         </goals>
                     </execution>
                 </executions>
             </plugin>
    
  3. Further fixed incorrect pom.xml artifactId, based the artifactID in (~/.m2/repository/jade/core/migration/InterPlatformMobilityService/1.5/InterPlatformMobilityService-1.5.pom)

    jade.core.migration InterPlatformMobilityService 1.5 system ${JadeAddOnsPath}/migration.jar

4) Final commands, were:

mvn install:install-file -Dfile=/root/my/,y/jade/jade/add-ons/ipms/lib/migration.jar -DgroupId=jade.core.migration -DartifactId=InterPlatformMobilityService -Dversion=1.5 -Dpackaging=jar

output snippet:

[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ carna_edge_ai ---
[INFO] Installing /root/my/my/jade/jade/add-ons/ipms/lib/migration.jar to /root/.m2/repository/jade/core/migration/InterPlatformMobilityService/1.5/InterPlatformMobilityService-1.5.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.409 s
[INFO] Finished at: 2021-09-09T14:42:31-07:00
[INFO] ------------------------------------------------------------------------

Then build & package JAR:

sudo mvn clean package -DJadeAddOnsPath=/home/azureuser/xyz/my/multi_agents/my_edge_ai/JadeDownload/jade/add-ons/ipms/lib/

output snippet:

[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ my_edge_ai ---
[INFO] Building jar: /root/my/my/jade/jade/my_edge_ai/my_edge_ai/target/my_edge_ai-1.0-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-assembly-plugin:3.1.1:single (make-assembly) @ my_edge_ai ---
[INFO] Building jar: /root/my/my/jade/jade/my_edge_ai/my_edge_ai/target/my_edge_ai-1.0-SNAPSHOT-jar-with-dependencies.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  24.332 s
[INFO] Finished at: 2021-09-09T14:55:00-07:00
[INFO] ------------------------------------------------------------------------

Final run:

 java -jar ./target/my_edge_ai-1.0-SNAPSHOT-jar-with-dependencies.jar 1 main

The program started with no errors or exceptions.

However repeating the same exact steps on the azure Ubuntu server & triple checking paths, again yields:

java.lang.ClassNotFoundException:jade.core.migration.InterPlatformMobilityService

I even tried run the jar using -classpath flag:

sudo java -classpath "/home/azureuser/xyz/my/multi_agents/my_edge_ai/JadeDownload/jade/lib/jade.jar;/home/azureuser/xyz/my/multi_agents/my_edge_ai/JadeDownload/jade/lib/commons-codec/commons-codec-1.3.jar;/home/azureuser/xyz/my/multi_agents/my_edge_ai/JadeDownload/jade/add-ons/ipms/lib/migration.jar" -jar ./target/my_edge_ai-1.0-SNAPSHOT-jar-with-dependencies.jar 1 main

However again (only on remote now):

java.lang.ClassNotFoundException:jade.core.migration.InterPlatformMobilityService

The smoking gun! Finally I checked the contents of the fat JAR,maven is NOT including jade.core.migration.InterPlatformMobilityService in the fat JAR built on remote Ubuntu, but it's including it on local Ubuntu.

SOLVED:

In the remote pom.xml, I changed the InterPlatformMobilityService dependency to use maven local repo rather than pointing to actual file:

jade.core.migration InterPlatformMobilityService 1.5 system ${JadeAddOnsPath}/migration.jar -->

Thanks for community support & feedback!

Any more solutions?

Thoughts?

Appreciated

like image 793
cyber101 Avatar asked Nov 06 '22 00:11

cyber101


1 Answers

SOLVED:

In the remote pom.xml, I changed the InterPlatformMobilityService dependency to use maven local repo rather than pointing to actual file:

jade.core.migration InterPlatformMobilityService 1.5 system ${JadeAddOnsPath}/migration.jar --> Thanks for community support & feedback!

like image 127
cyber101 Avatar answered Nov 12 '22 15:11

cyber101