Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/385.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java JADE代理-异常消息:Dispatcher错误-由远程站点中的DispatcherException引起。没有对象id的骨架_Java_Agent_Agents Jade_Multi Agent - Fatal编程技术网

Java JADE代理-异常消息:Dispatcher错误-由远程站点中的DispatcherException引起。没有对象id的骨架

Java JADE代理-异常消息:Dispatcher错误-由远程站点中的DispatcherException引起。没有对象id的骨架,java,agent,agents-jade,multi-agent,Java,Agent,Agents Jade,Multi Agent,我正在尝试安装2个代理(DFSearchAgent)和另一个按类型注册服务的代理(DFRegisterAgent) 但是,我无法启动“外围容器”或承载第二个代理的额外容器 假设: 两个容器位于同一台机器上,因此具有相同的IP和相同的端口 JADE版本4.5.0 在WSL(Windows)上运行虚拟化Ubuntu 参考资料:及 最初,我使用JADE GUI选项在同一个“MainController”中启动DFSearchAgent和DfsRegisterAgent,步骤如下:,右键单击Main

我正在尝试安装2个代理(DFSearchAgent)和另一个按类型注册服务的代理(DFRegisterAgent)

但是,我无法启动“外围容器”或承载第二个代理的额外容器

假设:

  • 两个容器位于同一台机器上,因此具有相同的IP和相同的端口
  • JADE版本4.5.0
  • 在WSL(Windows)上运行虚拟化Ubuntu
  • 参考资料:及
最初,我使用JADE GUI选项在同一个“MainController”中启动DFSearchAgent和DfsRegisterAgent,步骤如下:,右键单击MainContainer,选择“启动新代理”,然后从预打包的示例中选择DFSearchedAgent:

控制台输出:

INFO: ----------------------------------
    This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
    downloaded in Open Source, under LGPL restrictions,
    at http://jade.tilab.com/
----------------------------------------
May 28, 2021 2:01:59 PM jade.imtp.leap.LEAPIMTPManager initialize
INFO: Listening for intra-platform commands on address:
- jicp://137.79.225.104:1099

May 28, 2021 2:02:00 PM jade.core.BaseService init
INFO: Service jade.core.management.AgentManagement initialized
May 28, 2021 2:02:00 PM jade.core.BaseService init
INFO: Service jade.core.messaging.Messaging initialized
May 28, 2021 2:02:00 PM jade.core.BaseService init
INFO: Service jade.core.resource.ResourceManagement initialized
May 28, 2021 2:02:00 PM jade.core.BaseService init
INFO: Service jade.core.mobility.AgentMobility initialized
May 28, 2021 2:02:00 PM jade.core.BaseService init
INFO: Service jade.core.event.Notification initialized
May 28, 2021 2:02:00 PM jade.mtp.http.HTTPServer <init>
INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
May 28, 2021 2:02:00 PM jade.core.messaging.MessagingService boot
INFO: MTP addresses:
http://XYZ-064067.xyz.abc.gov:7778/acc
May 28, 2021 2:02:00 PM jade.core.AgentContainerImpl joinPlatform
INFO: --------------------------------------
Agent container Main-Container@137.79.225.104 is ready.
--------------------------------------------

Agent DFRegisterAgent registering service "unknown" of type "weather-forecast
Agent DFSearchAgent found the following weather-forecast services:
Service "unknown" provided by agent DFRegisterAgent@137.79.225.104:1099/JADE
Exception message: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 15724561
May 28, 2021 2:50:27 PM jade.core.Runtime beginContainer
INFO: ----------------------------------
    This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
    downloaded in Open Source, under LGPL restrictions,
    at http://jade.tilab.com/
----------------------------------------
May 28, 2021 2:50:27 PM jade.imtp.leap.LEAPIMTPManager initialize
INFO: Listening for intra-platform commands on address:
- jicp://137.79.225.104:1099
May 28, 2021 2:50:40 PM jade.core.Runtime beginContainer
INFO: ----------------------------------
    This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
    downloaded in Open Source, under LGPL restrictions,
    at http://jade.tilab.com/
----------------------------------------
May 28, 2021 2:50:40 PM jade.imtp.leap.LEAPIMTPManager initialize
INFO: Listening for intra-platform commands on address:
- jicp://137.79.225.104:1099
May 28, 2021 3:02:15 PM jade.core.Runtime beginContainer
INFO: ----------------------------------
    This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
    downloaded in Open Source, under LGPL restrictions,
    at http://jade.tilab.com/
----------------------------------------
May 28, 2021 3:02:15 PM jade.imtp.leap.LEAPIMTPManager initialize
INFO: Listening for intra-platform commands on address:
- jicp://137.79.225.104:1099
jade.core.IMTPException: jade.core.IMTPException occurred in remote container [Main container cannot reach newly starting node [Container-1, 179334, jicp://137.79.225.104:1099]: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 179334]
package com.example.yellowpages;
import jade.util.leap.*; 
import jade.core.Profile;
import jade.core.ProfileImpl;
import jade.wrapper.*;
/**
 * Hello world!
 */
public final class App {
    private App() {
    }

    /**
     * Says hello to the world.
     * @param args The arguments of the program.
     */
    public static void main(String[] args) {
        System.out.println( "Start test..." );
        Properties pp = new Properties();
        pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
        Profile p = new ProfileImpl(pp);
        jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
        try {
            ac.acceptNewAgent("DFRegisterAgent",new DFRegisterAgent()).start();
            
        } catch (StaleProxyException e) {
            throw new Error(e);
        }
        System.out.println( "Test is complete..." );
    }
}
    package com.example.yellowpages;
    import jade.util.leap.*; 
    import jade.core.Profile;
    import jade.core.ProfileImpl;
    import jade.wrapper.*;
    /**
     * Hello world!
     */
    public final class App {
        private App() {
        }
    
        /**
         * Says hello to the world.
         * @param args The arguments of the program.
         */
        public static void main(String[] args) {
            System.out.println( "Start test..." );
            Properties pp = new Properties();
            pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
            Profile p = new ProfileImpl(pp);
            jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
            try {
                ac.acceptNewAgent("DFSearchAgent",new DFSearchAgent()).start();
                ac.acceptNewAgent("DFSubscribeAgent",new DFSubscribeAgent()).start();
                
            } catch (StaleProxyException e) {
                throw new Error(e);
            }
            System.out.println( "Test is complete..." );
        
}
}
Agent container Main-Container@137.79.225.104 is ready.
--------------------------------------------
Test is complete...
Agent DFRegisterAgent registering service "unknown" of type "weather-forecast"
INFO: --------------------------------------
Agent container Main-Container@137.79.225.104 is ready.
--------------------------------------------
Agent DFSearchAgent searching for services of type "weather-forecast"
Test is complete...
Agent DFSearchAgent did not find any weather-forecast service
现在开始解决问题…

但是,如果我使用两个不同的容器(1个MainContainer和1个peripheral)重新尝试上述步骤,则会得到一个异常(远程站点中的DispatcherException。没有对象id的框架)

尝试#1(使用1个主容器、1个外围容器、同一台机器)步骤:

INFO: ----------------------------------
    This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
    downloaded in Open Source, under LGPL restrictions,
    at http://jade.tilab.com/
----------------------------------------
May 28, 2021 2:01:59 PM jade.imtp.leap.LEAPIMTPManager initialize
INFO: Listening for intra-platform commands on address:
- jicp://137.79.225.104:1099

May 28, 2021 2:02:00 PM jade.core.BaseService init
INFO: Service jade.core.management.AgentManagement initialized
May 28, 2021 2:02:00 PM jade.core.BaseService init
INFO: Service jade.core.messaging.Messaging initialized
May 28, 2021 2:02:00 PM jade.core.BaseService init
INFO: Service jade.core.resource.ResourceManagement initialized
May 28, 2021 2:02:00 PM jade.core.BaseService init
INFO: Service jade.core.mobility.AgentMobility initialized
May 28, 2021 2:02:00 PM jade.core.BaseService init
INFO: Service jade.core.event.Notification initialized
May 28, 2021 2:02:00 PM jade.mtp.http.HTTPServer <init>
INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
May 28, 2021 2:02:00 PM jade.core.messaging.MessagingService boot
INFO: MTP addresses:
http://XYZ-064067.xyz.abc.gov:7778/acc
May 28, 2021 2:02:00 PM jade.core.AgentContainerImpl joinPlatform
INFO: --------------------------------------
Agent container Main-Container@137.79.225.104 is ready.
--------------------------------------------

Agent DFRegisterAgent registering service "unknown" of type "weather-forecast
Agent DFSearchAgent found the following weather-forecast services:
Service "unknown" provided by agent DFRegisterAgent@137.79.225.104:1099/JADE
Exception message: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 15724561
May 28, 2021 2:50:27 PM jade.core.Runtime beginContainer
INFO: ----------------------------------
    This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
    downloaded in Open Source, under LGPL restrictions,
    at http://jade.tilab.com/
----------------------------------------
May 28, 2021 2:50:27 PM jade.imtp.leap.LEAPIMTPManager initialize
INFO: Listening for intra-platform commands on address:
- jicp://137.79.225.104:1099
May 28, 2021 2:50:40 PM jade.core.Runtime beginContainer
INFO: ----------------------------------
    This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
    downloaded in Open Source, under LGPL restrictions,
    at http://jade.tilab.com/
----------------------------------------
May 28, 2021 2:50:40 PM jade.imtp.leap.LEAPIMTPManager initialize
INFO: Listening for intra-platform commands on address:
- jicp://137.79.225.104:1099
May 28, 2021 3:02:15 PM jade.core.Runtime beginContainer
INFO: ----------------------------------
    This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
    downloaded in Open Source, under LGPL restrictions,
    at http://jade.tilab.com/
----------------------------------------
May 28, 2021 3:02:15 PM jade.imtp.leap.LEAPIMTPManager initialize
INFO: Listening for intra-platform commands on address:
- jicp://137.79.225.104:1099
jade.core.IMTPException: jade.core.IMTPException occurred in remote container [Main container cannot reach newly starting node [Container-1, 179334, jicp://137.79.225.104:1099]: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 179334]
package com.example.yellowpages;
import jade.util.leap.*; 
import jade.core.Profile;
import jade.core.ProfileImpl;
import jade.wrapper.*;
/**
 * Hello world!
 */
public final class App {
    private App() {
    }

    /**
     * Says hello to the world.
     * @param args The arguments of the program.
     */
    public static void main(String[] args) {
        System.out.println( "Start test..." );
        Properties pp = new Properties();
        pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
        Profile p = new ProfileImpl(pp);
        jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
        try {
            ac.acceptNewAgent("DFRegisterAgent",new DFRegisterAgent()).start();
            
        } catch (StaleProxyException e) {
            throw new Error(e);
        }
        System.out.println( "Test is complete..." );
    }
}
    package com.example.yellowpages;
    import jade.util.leap.*; 
    import jade.core.Profile;
    import jade.core.ProfileImpl;
    import jade.wrapper.*;
    /**
     * Hello world!
     */
    public final class App {
        private App() {
        }
    
        /**
         * Says hello to the world.
         * @param args The arguments of the program.
         */
        public static void main(String[] args) {
            System.out.println( "Start test..." );
            Properties pp = new Properties();
            pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
            Profile p = new ProfileImpl(pp);
            jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
            try {
                ac.acceptNewAgent("DFSearchAgent",new DFSearchAgent()).start();
                ac.acceptNewAgent("DFSubscribeAgent",new DFSubscribeAgent()).start();
                
            } catch (StaleProxyException e) {
                throw new Error(e);
            }
            System.out.println( "Test is complete..." );
        
}
}
Agent container Main-Container@137.79.225.104 is ready.
--------------------------------------------
Test is complete...
Agent DFRegisterAgent registering service "unknown" of type "weather-forecast"
INFO: --------------------------------------
Agent container Main-Container@137.79.225.104 is ready.
--------------------------------------------
Agent DFSearchAgent searching for services of type "weather-forecast"
Test is complete...
Agent DFSearchAgent did not find any weather-forecast service
  • 从已经运行的主容器中删除DFSearchAgent&DfsRegisterAgent
  • 关闭旧容器并通过java
    jade.Boot-gui启动新的主容器

  • 通过命令行运行启动第二个外围设备容器:

    javajade.Boot-gui-container

  • 或在启动时提供代理

    java jade.Boot -gui -container provider:examples.yellowPages.DFRegisterAgent my-forecast
    
    控制台异常:

    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:01:59 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.management.AgentManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.messaging.Messaging initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.resource.ResourceManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.mobility.AgentMobility initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.event.Notification initialized
    May 28, 2021 2:02:00 PM jade.mtp.http.HTTPServer <init>
    INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
    May 28, 2021 2:02:00 PM jade.core.messaging.MessagingService boot
    INFO: MTP addresses:
    http://XYZ-064067.xyz.abc.gov:7778/acc
    May 28, 2021 2:02:00 PM jade.core.AgentContainerImpl joinPlatform
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast
    
    Agent DFSearchAgent found the following weather-forecast services:
    Service "unknown" provided by agent DFRegisterAgent@137.79.225.104:1099/JADE
    
    Exception message: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 15724561
    
    May 28, 2021 2:50:27 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:27 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:50:40 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:40 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 3:02:15 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 3:02:15 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    jade.core.IMTPException: jade.core.IMTPException occurred in remote container [Main container cannot reach newly starting node [Container-1, 179334, jicp://137.79.225.104:1099]: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 179334]
    
    package com.example.yellowpages;
    import jade.util.leap.*; 
    import jade.core.Profile;
    import jade.core.ProfileImpl;
    import jade.wrapper.*;
    /**
     * Hello world!
     */
    public final class App {
        private App() {
        }
    
        /**
         * Says hello to the world.
         * @param args The arguments of the program.
         */
        public static void main(String[] args) {
            System.out.println( "Start test..." );
            Properties pp = new Properties();
            pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
            Profile p = new ProfileImpl(pp);
            jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
            try {
                ac.acceptNewAgent("DFRegisterAgent",new DFRegisterAgent()).start();
                
            } catch (StaleProxyException e) {
                throw new Error(e);
            }
            System.out.println( "Test is complete..." );
        }
    }
    
        package com.example.yellowpages;
        import jade.util.leap.*; 
        import jade.core.Profile;
        import jade.core.ProfileImpl;
        import jade.wrapper.*;
        /**
         * Hello world!
         */
        public final class App {
            private App() {
            }
        
            /**
             * Says hello to the world.
             * @param args The arguments of the program.
             */
            public static void main(String[] args) {
                System.out.println( "Start test..." );
                Properties pp = new Properties();
                pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
                Profile p = new ProfileImpl(pp);
                jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
                try {
                    ac.acceptNewAgent("DFSearchAgent",new DFSearchAgent()).start();
                    ac.acceptNewAgent("DFSubscribeAgent",new DFSubscribeAgent()).start();
                    
                } catch (StaleProxyException e) {
                    throw new Error(e);
                }
                System.out.println( "Test is complete..." );
            
    }
    }
    
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Test is complete...
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast"
    
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Agent DFSearchAgent searching for services of type "weather-forecast"
    Test is complete...
    Agent DFSearchAgent did not find any weather-forecast service
    
    尝试两个步骤(使用两个主容器、同一台机器、GUI命令):

    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:01:59 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.management.AgentManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.messaging.Messaging initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.resource.ResourceManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.mobility.AgentMobility initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.event.Notification initialized
    May 28, 2021 2:02:00 PM jade.mtp.http.HTTPServer <init>
    INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
    May 28, 2021 2:02:00 PM jade.core.messaging.MessagingService boot
    INFO: MTP addresses:
    http://XYZ-064067.xyz.abc.gov:7778/acc
    May 28, 2021 2:02:00 PM jade.core.AgentContainerImpl joinPlatform
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast
    
    Agent DFSearchAgent found the following weather-forecast services:
    Service "unknown" provided by agent DFRegisterAgent@137.79.225.104:1099/JADE
    
    Exception message: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 15724561
    
    May 28, 2021 2:50:27 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:27 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:50:40 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:40 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 3:02:15 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 3:02:15 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    jade.core.IMTPException: jade.core.IMTPException occurred in remote container [Main container cannot reach newly starting node [Container-1, 179334, jicp://137.79.225.104:1099]: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 179334]
    
    package com.example.yellowpages;
    import jade.util.leap.*; 
    import jade.core.Profile;
    import jade.core.ProfileImpl;
    import jade.wrapper.*;
    /**
     * Hello world!
     */
    public final class App {
        private App() {
        }
    
        /**
         * Says hello to the world.
         * @param args The arguments of the program.
         */
        public static void main(String[] args) {
            System.out.println( "Start test..." );
            Properties pp = new Properties();
            pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
            Profile p = new ProfileImpl(pp);
            jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
            try {
                ac.acceptNewAgent("DFRegisterAgent",new DFRegisterAgent()).start();
                
            } catch (StaleProxyException e) {
                throw new Error(e);
            }
            System.out.println( "Test is complete..." );
        }
    }
    
        package com.example.yellowpages;
        import jade.util.leap.*; 
        import jade.core.Profile;
        import jade.core.ProfileImpl;
        import jade.wrapper.*;
        /**
         * Hello world!
         */
        public final class App {
            private App() {
            }
        
            /**
             * Says hello to the world.
             * @param args The arguments of the program.
             */
            public static void main(String[] args) {
                System.out.println( "Start test..." );
                Properties pp = new Properties();
                pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
                Profile p = new ProfileImpl(pp);
                jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
                try {
                    ac.acceptNewAgent("DFSearchAgent",new DFSearchAgent()).start();
                    ac.acceptNewAgent("DFSubscribeAgent",new DFSubscribeAgent()).start();
                    
                } catch (StaleProxyException e) {
                    throw new Error(e);
                }
                System.out.println( "Test is complete..." );
            
    }
    }
    
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Test is complete...
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast"
    
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Agent DFSearchAgent searching for services of type "weather-forecast"
    Test is complete...
    Agent DFSearchAgent did not find any weather-forecast service
    
    步骤:

    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:01:59 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.management.AgentManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.messaging.Messaging initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.resource.ResourceManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.mobility.AgentMobility initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.event.Notification initialized
    May 28, 2021 2:02:00 PM jade.mtp.http.HTTPServer <init>
    INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
    May 28, 2021 2:02:00 PM jade.core.messaging.MessagingService boot
    INFO: MTP addresses:
    http://XYZ-064067.xyz.abc.gov:7778/acc
    May 28, 2021 2:02:00 PM jade.core.AgentContainerImpl joinPlatform
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast
    
    Agent DFSearchAgent found the following weather-forecast services:
    Service "unknown" provided by agent DFRegisterAgent@137.79.225.104:1099/JADE
    
    Exception message: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 15724561
    
    May 28, 2021 2:50:27 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:27 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:50:40 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:40 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 3:02:15 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 3:02:15 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    jade.core.IMTPException: jade.core.IMTPException occurred in remote container [Main container cannot reach newly starting node [Container-1, 179334, jicp://137.79.225.104:1099]: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 179334]
    
    package com.example.yellowpages;
    import jade.util.leap.*; 
    import jade.core.Profile;
    import jade.core.ProfileImpl;
    import jade.wrapper.*;
    /**
     * Hello world!
     */
    public final class App {
        private App() {
        }
    
        /**
         * Says hello to the world.
         * @param args The arguments of the program.
         */
        public static void main(String[] args) {
            System.out.println( "Start test..." );
            Properties pp = new Properties();
            pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
            Profile p = new ProfileImpl(pp);
            jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
            try {
                ac.acceptNewAgent("DFRegisterAgent",new DFRegisterAgent()).start();
                
            } catch (StaleProxyException e) {
                throw new Error(e);
            }
            System.out.println( "Test is complete..." );
        }
    }
    
        package com.example.yellowpages;
        import jade.util.leap.*; 
        import jade.core.Profile;
        import jade.core.ProfileImpl;
        import jade.wrapper.*;
        /**
         * Hello world!
         */
        public final class App {
            private App() {
            }
        
            /**
             * Says hello to the world.
             * @param args The arguments of the program.
             */
            public static void main(String[] args) {
                System.out.println( "Start test..." );
                Properties pp = new Properties();
                pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
                Profile p = new ProfileImpl(pp);
                jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
                try {
                    ac.acceptNewAgent("DFSearchAgent",new DFSearchAgent()).start();
                    ac.acceptNewAgent("DFSubscribeAgent",new DFSubscribeAgent()).start();
                    
                } catch (StaleProxyException e) {
                    throw new Error(e);
                }
                System.out.println( "Test is complete..." );
            
    }
    }
    
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Test is complete...
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast"
    
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Agent DFSearchAgent searching for services of type "weather-forecast"
    Test is complete...
    Agent DFSearchAgent did not find any weather-forecast service
    
  • 使用两个不同的shell/命令窗口,运行
  • 在shell#1
    javajade.Boot-gui中运行

    第一控制台输出的片段:

    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:01:59 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.management.AgentManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.messaging.Messaging initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.resource.ResourceManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.mobility.AgentMobility initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.event.Notification initialized
    May 28, 2021 2:02:00 PM jade.mtp.http.HTTPServer <init>
    INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
    May 28, 2021 2:02:00 PM jade.core.messaging.MessagingService boot
    INFO: MTP addresses:
    http://XYZ-064067.xyz.abc.gov:7778/acc
    May 28, 2021 2:02:00 PM jade.core.AgentContainerImpl joinPlatform
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast
    
    Agent DFSearchAgent found the following weather-forecast services:
    Service "unknown" provided by agent DFRegisterAgent@137.79.225.104:1099/JADE
    
    Exception message: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 15724561
    
    May 28, 2021 2:50:27 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:27 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:50:40 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:40 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 3:02:15 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 3:02:15 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    jade.core.IMTPException: jade.core.IMTPException occurred in remote container [Main container cannot reach newly starting node [Container-1, 179334, jicp://137.79.225.104:1099]: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 179334]
    
    package com.example.yellowpages;
    import jade.util.leap.*; 
    import jade.core.Profile;
    import jade.core.ProfileImpl;
    import jade.wrapper.*;
    /**
     * Hello world!
     */
    public final class App {
        private App() {
        }
    
        /**
         * Says hello to the world.
         * @param args The arguments of the program.
         */
        public static void main(String[] args) {
            System.out.println( "Start test..." );
            Properties pp = new Properties();
            pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
            Profile p = new ProfileImpl(pp);
            jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
            try {
                ac.acceptNewAgent("DFRegisterAgent",new DFRegisterAgent()).start();
                
            } catch (StaleProxyException e) {
                throw new Error(e);
            }
            System.out.println( "Test is complete..." );
        }
    }
    
        package com.example.yellowpages;
        import jade.util.leap.*; 
        import jade.core.Profile;
        import jade.core.ProfileImpl;
        import jade.wrapper.*;
        /**
         * Hello world!
         */
        public final class App {
            private App() {
            }
        
            /**
             * Says hello to the world.
             * @param args The arguments of the program.
             */
            public static void main(String[] args) {
                System.out.println( "Start test..." );
                Properties pp = new Properties();
                pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
                Profile p = new ProfileImpl(pp);
                jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
                try {
                    ac.acceptNewAgent("DFSearchAgent",new DFSearchAgent()).start();
                    ac.acceptNewAgent("DFSubscribeAgent",new DFSubscribeAgent()).start();
                    
                } catch (StaleProxyException e) {
                    throw new Error(e);
                }
                System.out.println( "Test is complete..." );
            
    }
    }
    
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Test is complete...
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast"
    
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Agent DFSearchAgent searching for services of type "weather-forecast"
    Test is complete...
    Agent DFSearchAgent did not find any weather-forecast service
    
    在shell#2
    javajade.Boot-gui中运行

    2st控制台输出的片段:

    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:01:59 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.management.AgentManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.messaging.Messaging initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.resource.ResourceManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.mobility.AgentMobility initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.event.Notification initialized
    May 28, 2021 2:02:00 PM jade.mtp.http.HTTPServer <init>
    INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
    May 28, 2021 2:02:00 PM jade.core.messaging.MessagingService boot
    INFO: MTP addresses:
    http://XYZ-064067.xyz.abc.gov:7778/acc
    May 28, 2021 2:02:00 PM jade.core.AgentContainerImpl joinPlatform
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast
    
    Agent DFSearchAgent found the following weather-forecast services:
    Service "unknown" provided by agent DFRegisterAgent@137.79.225.104:1099/JADE
    
    Exception message: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 15724561
    
    May 28, 2021 2:50:27 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:27 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:50:40 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:40 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 3:02:15 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 3:02:15 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    jade.core.IMTPException: jade.core.IMTPException occurred in remote container [Main container cannot reach newly starting node [Container-1, 179334, jicp://137.79.225.104:1099]: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 179334]
    
    package com.example.yellowpages;
    import jade.util.leap.*; 
    import jade.core.Profile;
    import jade.core.ProfileImpl;
    import jade.wrapper.*;
    /**
     * Hello world!
     */
    public final class App {
        private App() {
        }
    
        /**
         * Says hello to the world.
         * @param args The arguments of the program.
         */
        public static void main(String[] args) {
            System.out.println( "Start test..." );
            Properties pp = new Properties();
            pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
            Profile p = new ProfileImpl(pp);
            jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
            try {
                ac.acceptNewAgent("DFRegisterAgent",new DFRegisterAgent()).start();
                
            } catch (StaleProxyException e) {
                throw new Error(e);
            }
            System.out.println( "Test is complete..." );
        }
    }
    
        package com.example.yellowpages;
        import jade.util.leap.*; 
        import jade.core.Profile;
        import jade.core.ProfileImpl;
        import jade.wrapper.*;
        /**
         * Hello world!
         */
        public final class App {
            private App() {
            }
        
            /**
             * Says hello to the world.
             * @param args The arguments of the program.
             */
            public static void main(String[] args) {
                System.out.println( "Start test..." );
                Properties pp = new Properties();
                pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
                Profile p = new ProfileImpl(pp);
                jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
                try {
                    ac.acceptNewAgent("DFSearchAgent",new DFSearchAgent()).start();
                    ac.acceptNewAgent("DFSubscribeAgent",new DFSubscribeAgent()).start();
                    
                } catch (StaleProxyException e) {
                    throw new Error(e);
                }
                System.out.println( "Test is complete..." );
            
    }
    }
    
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Test is complete...
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast"
    
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Agent DFSearchAgent searching for services of type "weather-forecast"
    Test is complete...
    Agent DFSearchAgent did not find any weather-forecast service
    
    发布了两个GUI,共有两个主容器

  • 使用GUI首先添加DFRegisterAgent,然后注册DFSearchAgent
  • 第一控制台:

    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:01:59 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.management.AgentManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.messaging.Messaging initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.resource.ResourceManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.mobility.AgentMobility initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.event.Notification initialized
    May 28, 2021 2:02:00 PM jade.mtp.http.HTTPServer <init>
    INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
    May 28, 2021 2:02:00 PM jade.core.messaging.MessagingService boot
    INFO: MTP addresses:
    http://XYZ-064067.xyz.abc.gov:7778/acc
    May 28, 2021 2:02:00 PM jade.core.AgentContainerImpl joinPlatform
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast
    
    Agent DFSearchAgent found the following weather-forecast services:
    Service "unknown" provided by agent DFRegisterAgent@137.79.225.104:1099/JADE
    
    Exception message: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 15724561
    
    May 28, 2021 2:50:27 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:27 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:50:40 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:40 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 3:02:15 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 3:02:15 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    jade.core.IMTPException: jade.core.IMTPException occurred in remote container [Main container cannot reach newly starting node [Container-1, 179334, jicp://137.79.225.104:1099]: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 179334]
    
    package com.example.yellowpages;
    import jade.util.leap.*; 
    import jade.core.Profile;
    import jade.core.ProfileImpl;
    import jade.wrapper.*;
    /**
     * Hello world!
     */
    public final class App {
        private App() {
        }
    
        /**
         * Says hello to the world.
         * @param args The arguments of the program.
         */
        public static void main(String[] args) {
            System.out.println( "Start test..." );
            Properties pp = new Properties();
            pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
            Profile p = new ProfileImpl(pp);
            jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
            try {
                ac.acceptNewAgent("DFRegisterAgent",new DFRegisterAgent()).start();
                
            } catch (StaleProxyException e) {
                throw new Error(e);
            }
            System.out.println( "Test is complete..." );
        }
    }
    
        package com.example.yellowpages;
        import jade.util.leap.*; 
        import jade.core.Profile;
        import jade.core.ProfileImpl;
        import jade.wrapper.*;
        /**
         * Hello world!
         */
        public final class App {
            private App() {
            }
        
            /**
             * Says hello to the world.
             * @param args The arguments of the program.
             */
            public static void main(String[] args) {
                System.out.println( "Start test..." );
                Properties pp = new Properties();
                pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
                Profile p = new ProfileImpl(pp);
                jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
                try {
                    ac.acceptNewAgent("DFSearchAgent",new DFSearchAgent()).start();
                    ac.acceptNewAgent("DFSubscribeAgent",new DFSubscribeAgent()).start();
                    
                } catch (StaleProxyException e) {
                    throw new Error(e);
                }
                System.out.println( "Test is complete..." );
            
    }
    }
    
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Test is complete...
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast"
    
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Agent DFSearchAgent searching for services of type "weather-forecast"
    Test is complete...
    Agent DFSearchAgent did not find any weather-forecast service
    
    代理DFRegisterAgent注册服务“未知”,类型为“天气预报”

    第二控制台:

    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:01:59 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.management.AgentManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.messaging.Messaging initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.resource.ResourceManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.mobility.AgentMobility initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.event.Notification initialized
    May 28, 2021 2:02:00 PM jade.mtp.http.HTTPServer <init>
    INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
    May 28, 2021 2:02:00 PM jade.core.messaging.MessagingService boot
    INFO: MTP addresses:
    http://XYZ-064067.xyz.abc.gov:7778/acc
    May 28, 2021 2:02:00 PM jade.core.AgentContainerImpl joinPlatform
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast
    
    Agent DFSearchAgent found the following weather-forecast services:
    Service "unknown" provided by agent DFRegisterAgent@137.79.225.104:1099/JADE
    
    Exception message: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 15724561
    
    May 28, 2021 2:50:27 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:27 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:50:40 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:40 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 3:02:15 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 3:02:15 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    jade.core.IMTPException: jade.core.IMTPException occurred in remote container [Main container cannot reach newly starting node [Container-1, 179334, jicp://137.79.225.104:1099]: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 179334]
    
    package com.example.yellowpages;
    import jade.util.leap.*; 
    import jade.core.Profile;
    import jade.core.ProfileImpl;
    import jade.wrapper.*;
    /**
     * Hello world!
     */
    public final class App {
        private App() {
        }
    
        /**
         * Says hello to the world.
         * @param args The arguments of the program.
         */
        public static void main(String[] args) {
            System.out.println( "Start test..." );
            Properties pp = new Properties();
            pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
            Profile p = new ProfileImpl(pp);
            jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
            try {
                ac.acceptNewAgent("DFRegisterAgent",new DFRegisterAgent()).start();
                
            } catch (StaleProxyException e) {
                throw new Error(e);
            }
            System.out.println( "Test is complete..." );
        }
    }
    
        package com.example.yellowpages;
        import jade.util.leap.*; 
        import jade.core.Profile;
        import jade.core.ProfileImpl;
        import jade.wrapper.*;
        /**
         * Hello world!
         */
        public final class App {
            private App() {
            }
        
            /**
             * Says hello to the world.
             * @param args The arguments of the program.
             */
            public static void main(String[] args) {
                System.out.println( "Start test..." );
                Properties pp = new Properties();
                pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
                Profile p = new ProfileImpl(pp);
                jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
                try {
                    ac.acceptNewAgent("DFSearchAgent",new DFSearchAgent()).start();
                    ac.acceptNewAgent("DFSubscribeAgent",new DFSubscribeAgent()).start();
                    
                } catch (StaleProxyException e) {
                    throw new Error(e);
                }
                System.out.println( "Test is complete..." );
            
    }
    }
    
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Test is complete...
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast"
    
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Agent DFSearchAgent searching for services of type "weather-forecast"
    Test is complete...
    Agent DFSearchAgent did not find any weather-forecast service
    
    代理DFSearchAgent搜索“天气预报”类型的服务 DFSearchAgent代理找不到任何天气预报服务

    问题:虽然没有任何例外,但搜索代理找不到注册的代理

    尝试3个步骤(使用1个主容器和1个外围容器、同一台机器、shell命令):

    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:01:59 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.management.AgentManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.messaging.Messaging initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.resource.ResourceManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.mobility.AgentMobility initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.event.Notification initialized
    May 28, 2021 2:02:00 PM jade.mtp.http.HTTPServer <init>
    INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
    May 28, 2021 2:02:00 PM jade.core.messaging.MessagingService boot
    INFO: MTP addresses:
    http://XYZ-064067.xyz.abc.gov:7778/acc
    May 28, 2021 2:02:00 PM jade.core.AgentContainerImpl joinPlatform
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast
    
    Agent DFSearchAgent found the following weather-forecast services:
    Service "unknown" provided by agent DFRegisterAgent@137.79.225.104:1099/JADE
    
    Exception message: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 15724561
    
    May 28, 2021 2:50:27 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:27 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:50:40 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:40 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 3:02:15 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 3:02:15 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    jade.core.IMTPException: jade.core.IMTPException occurred in remote container [Main container cannot reach newly starting node [Container-1, 179334, jicp://137.79.225.104:1099]: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 179334]
    
    package com.example.yellowpages;
    import jade.util.leap.*; 
    import jade.core.Profile;
    import jade.core.ProfileImpl;
    import jade.wrapper.*;
    /**
     * Hello world!
     */
    public final class App {
        private App() {
        }
    
        /**
         * Says hello to the world.
         * @param args The arguments of the program.
         */
        public static void main(String[] args) {
            System.out.println( "Start test..." );
            Properties pp = new Properties();
            pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
            Profile p = new ProfileImpl(pp);
            jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
            try {
                ac.acceptNewAgent("DFRegisterAgent",new DFRegisterAgent()).start();
                
            } catch (StaleProxyException e) {
                throw new Error(e);
            }
            System.out.println( "Test is complete..." );
        }
    }
    
        package com.example.yellowpages;
        import jade.util.leap.*; 
        import jade.core.Profile;
        import jade.core.ProfileImpl;
        import jade.wrapper.*;
        /**
         * Hello world!
         */
        public final class App {
            private App() {
            }
        
            /**
             * Says hello to the world.
             * @param args The arguments of the program.
             */
            public static void main(String[] args) {
                System.out.println( "Start test..." );
                Properties pp = new Properties();
                pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
                Profile p = new ProfileImpl(pp);
                jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
                try {
                    ac.acceptNewAgent("DFSearchAgent",new DFSearchAgent()).start();
                    ac.acceptNewAgent("DFSubscribeAgent",new DFSubscribeAgent()).start();
                    
                } catch (StaleProxyException e) {
                    throw new Error(e);
                }
                System.out.println( "Test is complete..." );
            
    }
    }
    
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Test is complete...
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast"
    
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Agent DFSearchAgent searching for services of type "weather-forecast"
    Test is complete...
    Agent DFSearchAgent did not find any weather-forecast service
    
    步骤:

    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:01:59 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.management.AgentManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.messaging.Messaging initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.resource.ResourceManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.mobility.AgentMobility initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.event.Notification initialized
    May 28, 2021 2:02:00 PM jade.mtp.http.HTTPServer <init>
    INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
    May 28, 2021 2:02:00 PM jade.core.messaging.MessagingService boot
    INFO: MTP addresses:
    http://XYZ-064067.xyz.abc.gov:7778/acc
    May 28, 2021 2:02:00 PM jade.core.AgentContainerImpl joinPlatform
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast
    
    Agent DFSearchAgent found the following weather-forecast services:
    Service "unknown" provided by agent DFRegisterAgent@137.79.225.104:1099/JADE
    
    Exception message: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 15724561
    
    May 28, 2021 2:50:27 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:27 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:50:40 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:40 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 3:02:15 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 3:02:15 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    jade.core.IMTPException: jade.core.IMTPException occurred in remote container [Main container cannot reach newly starting node [Container-1, 179334, jicp://137.79.225.104:1099]: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 179334]
    
    package com.example.yellowpages;
    import jade.util.leap.*; 
    import jade.core.Profile;
    import jade.core.ProfileImpl;
    import jade.wrapper.*;
    /**
     * Hello world!
     */
    public final class App {
        private App() {
        }
    
        /**
         * Says hello to the world.
         * @param args The arguments of the program.
         */
        public static void main(String[] args) {
            System.out.println( "Start test..." );
            Properties pp = new Properties();
            pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
            Profile p = new ProfileImpl(pp);
            jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
            try {
                ac.acceptNewAgent("DFRegisterAgent",new DFRegisterAgent()).start();
                
            } catch (StaleProxyException e) {
                throw new Error(e);
            }
            System.out.println( "Test is complete..." );
        }
    }
    
        package com.example.yellowpages;
        import jade.util.leap.*; 
        import jade.core.Profile;
        import jade.core.ProfileImpl;
        import jade.wrapper.*;
        /**
         * Hello world!
         */
        public final class App {
            private App() {
            }
        
            /**
             * Says hello to the world.
             * @param args The arguments of the program.
             */
            public static void main(String[] args) {
                System.out.println( "Start test..." );
                Properties pp = new Properties();
                pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
                Profile p = new ProfileImpl(pp);
                jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
                try {
                    ac.acceptNewAgent("DFSearchAgent",new DFSearchAgent()).start();
                    ac.acceptNewAgent("DFSubscribeAgent",new DFSubscribeAgent()).start();
                    
                } catch (StaleProxyException e) {
                    throw new Error(e);
                }
                System.out.println( "Test is complete..." );
            
    }
    }
    
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Test is complete...
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast"
    
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Agent DFSearchAgent searching for services of type "weather-forecast"
    Test is complete...
    Agent DFSearchAgent did not find any weather-forecast service
    
  • 启动第一个主容器

    javajade.Boot-gui

  • 控制台输出:

    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:01:59 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.management.AgentManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.messaging.Messaging initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.resource.ResourceManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.mobility.AgentMobility initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.event.Notification initialized
    May 28, 2021 2:02:00 PM jade.mtp.http.HTTPServer <init>
    INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
    May 28, 2021 2:02:00 PM jade.core.messaging.MessagingService boot
    INFO: MTP addresses:
    http://XYZ-064067.xyz.abc.gov:7778/acc
    May 28, 2021 2:02:00 PM jade.core.AgentContainerImpl joinPlatform
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast
    
    Agent DFSearchAgent found the following weather-forecast services:
    Service "unknown" provided by agent DFRegisterAgent@137.79.225.104:1099/JADE
    
    Exception message: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 15724561
    
    May 28, 2021 2:50:27 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:27 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:50:40 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:40 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 3:02:15 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 3:02:15 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    jade.core.IMTPException: jade.core.IMTPException occurred in remote container [Main container cannot reach newly starting node [Container-1, 179334, jicp://137.79.225.104:1099]: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 179334]
    
    package com.example.yellowpages;
    import jade.util.leap.*; 
    import jade.core.Profile;
    import jade.core.ProfileImpl;
    import jade.wrapper.*;
    /**
     * Hello world!
     */
    public final class App {
        private App() {
        }
    
        /**
         * Says hello to the world.
         * @param args The arguments of the program.
         */
        public static void main(String[] args) {
            System.out.println( "Start test..." );
            Properties pp = new Properties();
            pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
            Profile p = new ProfileImpl(pp);
            jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
            try {
                ac.acceptNewAgent("DFRegisterAgent",new DFRegisterAgent()).start();
                
            } catch (StaleProxyException e) {
                throw new Error(e);
            }
            System.out.println( "Test is complete..." );
        }
    }
    
        package com.example.yellowpages;
        import jade.util.leap.*; 
        import jade.core.Profile;
        import jade.core.ProfileImpl;
        import jade.wrapper.*;
        /**
         * Hello world!
         */
        public final class App {
            private App() {
            }
        
            /**
             * Says hello to the world.
             * @param args The arguments of the program.
             */
            public static void main(String[] args) {
                System.out.println( "Start test..." );
                Properties pp = new Properties();
                pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
                Profile p = new ProfileImpl(pp);
                jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
                try {
                    ac.acceptNewAgent("DFSearchAgent",new DFSearchAgent()).start();
                    ac.acceptNewAgent("DFSubscribeAgent",new DFSubscribeAgent()).start();
                    
                } catch (StaleProxyException e) {
                    throw new Error(e);
                }
                System.out.println( "Test is complete..." );
            
    }
    }
    
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Test is complete...
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast"
    
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Agent DFSearchAgent searching for services of type "weather-forecast"
    Test is complete...
    Agent DFSearchAgent did not find any weather-forecast service
    
  • 在新外壳中,尝试启动第二个外围容器

    javajade.Boot-gui-container

  • 控制台输出:

    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:01:59 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.management.AgentManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.messaging.Messaging initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.resource.ResourceManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.mobility.AgentMobility initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.event.Notification initialized
    May 28, 2021 2:02:00 PM jade.mtp.http.HTTPServer <init>
    INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
    May 28, 2021 2:02:00 PM jade.core.messaging.MessagingService boot
    INFO: MTP addresses:
    http://XYZ-064067.xyz.abc.gov:7778/acc
    May 28, 2021 2:02:00 PM jade.core.AgentContainerImpl joinPlatform
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast
    
    Agent DFSearchAgent found the following weather-forecast services:
    Service "unknown" provided by agent DFRegisterAgent@137.79.225.104:1099/JADE
    
    Exception message: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 15724561
    
    May 28, 2021 2:50:27 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:27 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:50:40 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:40 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 3:02:15 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 3:02:15 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    jade.core.IMTPException: jade.core.IMTPException occurred in remote container [Main container cannot reach newly starting node [Container-1, 179334, jicp://137.79.225.104:1099]: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 179334]
    
    package com.example.yellowpages;
    import jade.util.leap.*; 
    import jade.core.Profile;
    import jade.core.ProfileImpl;
    import jade.wrapper.*;
    /**
     * Hello world!
     */
    public final class App {
        private App() {
        }
    
        /**
         * Says hello to the world.
         * @param args The arguments of the program.
         */
        public static void main(String[] args) {
            System.out.println( "Start test..." );
            Properties pp = new Properties();
            pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
            Profile p = new ProfileImpl(pp);
            jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
            try {
                ac.acceptNewAgent("DFRegisterAgent",new DFRegisterAgent()).start();
                
            } catch (StaleProxyException e) {
                throw new Error(e);
            }
            System.out.println( "Test is complete..." );
        }
    }
    
        package com.example.yellowpages;
        import jade.util.leap.*; 
        import jade.core.Profile;
        import jade.core.ProfileImpl;
        import jade.wrapper.*;
        /**
         * Hello world!
         */
        public final class App {
            private App() {
            }
        
            /**
             * Says hello to the world.
             * @param args The arguments of the program.
             */
            public static void main(String[] args) {
                System.out.println( "Start test..." );
                Properties pp = new Properties();
                pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
                Profile p = new ProfileImpl(pp);
                jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
                try {
                    ac.acceptNewAgent("DFSearchAgent",new DFSearchAgent()).start();
                    ac.acceptNewAgent("DFSubscribeAgent",new DFSubscribeAgent()).start();
                    
                } catch (StaleProxyException e) {
                    throw new Error(e);
                }
                System.out.println( "Test is complete..." );
            
    }
    }
    
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Test is complete...
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast"
    
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Agent DFSearchAgent searching for services of type "weather-forecast"
    Test is complete...
    Agent DFSearchAgent did not find any weather-forecast service
    
    尝试4(通过代码):

    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:01:59 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.management.AgentManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.messaging.Messaging initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.resource.ResourceManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.mobility.AgentMobility initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.event.Notification initialized
    May 28, 2021 2:02:00 PM jade.mtp.http.HTTPServer <init>
    INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
    May 28, 2021 2:02:00 PM jade.core.messaging.MessagingService boot
    INFO: MTP addresses:
    http://XYZ-064067.xyz.abc.gov:7778/acc
    May 28, 2021 2:02:00 PM jade.core.AgentContainerImpl joinPlatform
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast
    
    Agent DFSearchAgent found the following weather-forecast services:
    Service "unknown" provided by agent DFRegisterAgent@137.79.225.104:1099/JADE
    
    Exception message: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 15724561
    
    May 28, 2021 2:50:27 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:27 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:50:40 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:40 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 3:02:15 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 3:02:15 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    jade.core.IMTPException: jade.core.IMTPException occurred in remote container [Main container cannot reach newly starting node [Container-1, 179334, jicp://137.79.225.104:1099]: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 179334]
    
    package com.example.yellowpages;
    import jade.util.leap.*; 
    import jade.core.Profile;
    import jade.core.ProfileImpl;
    import jade.wrapper.*;
    /**
     * Hello world!
     */
    public final class App {
        private App() {
        }
    
        /**
         * Says hello to the world.
         * @param args The arguments of the program.
         */
        public static void main(String[] args) {
            System.out.println( "Start test..." );
            Properties pp = new Properties();
            pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
            Profile p = new ProfileImpl(pp);
            jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
            try {
                ac.acceptNewAgent("DFRegisterAgent",new DFRegisterAgent()).start();
                
            } catch (StaleProxyException e) {
                throw new Error(e);
            }
            System.out.println( "Test is complete..." );
        }
    }
    
        package com.example.yellowpages;
        import jade.util.leap.*; 
        import jade.core.Profile;
        import jade.core.ProfileImpl;
        import jade.wrapper.*;
        /**
         * Hello world!
         */
        public final class App {
            private App() {
            }
        
            /**
             * Says hello to the world.
             * @param args The arguments of the program.
             */
            public static void main(String[] args) {
                System.out.println( "Start test..." );
                Properties pp = new Properties();
                pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
                Profile p = new ProfileImpl(pp);
                jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
                try {
                    ac.acceptNewAgent("DFSearchAgent",new DFSearchAgent()).start();
                    ac.acceptNewAgent("DFSubscribeAgent",new DFSubscribeAgent()).start();
                    
                } catch (StaleProxyException e) {
                    throw new Error(e);
                }
                System.out.println( "Test is complete..." );
            
    }
    }
    
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Test is complete...
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast"
    
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Agent DFSearchAgent searching for services of type "weather-forecast"
    Test is complete...
    Agent DFSearchAgent did not find any weather-forecast service
    
    我还尝试通过设置Java项目和实例化DFRegisterAgent和register(1 MainContainer中的DFRegisterAgent)来执行相同的步骤,并在2 MainContainer中实例化DFSearchAgent和register DFSearchAgent

    注册DFRegisterAgent:

    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:01:59 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.management.AgentManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.messaging.Messaging initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.resource.ResourceManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.mobility.AgentMobility initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.event.Notification initialized
    May 28, 2021 2:02:00 PM jade.mtp.http.HTTPServer <init>
    INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
    May 28, 2021 2:02:00 PM jade.core.messaging.MessagingService boot
    INFO: MTP addresses:
    http://XYZ-064067.xyz.abc.gov:7778/acc
    May 28, 2021 2:02:00 PM jade.core.AgentContainerImpl joinPlatform
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast
    
    Agent DFSearchAgent found the following weather-forecast services:
    Service "unknown" provided by agent DFRegisterAgent@137.79.225.104:1099/JADE
    
    Exception message: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 15724561
    
    May 28, 2021 2:50:27 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:27 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:50:40 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:40 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 3:02:15 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 3:02:15 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    jade.core.IMTPException: jade.core.IMTPException occurred in remote container [Main container cannot reach newly starting node [Container-1, 179334, jicp://137.79.225.104:1099]: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 179334]
    
    package com.example.yellowpages;
    import jade.util.leap.*; 
    import jade.core.Profile;
    import jade.core.ProfileImpl;
    import jade.wrapper.*;
    /**
     * Hello world!
     */
    public final class App {
        private App() {
        }
    
        /**
         * Says hello to the world.
         * @param args The arguments of the program.
         */
        public static void main(String[] args) {
            System.out.println( "Start test..." );
            Properties pp = new Properties();
            pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
            Profile p = new ProfileImpl(pp);
            jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
            try {
                ac.acceptNewAgent("DFRegisterAgent",new DFRegisterAgent()).start();
                
            } catch (StaleProxyException e) {
                throw new Error(e);
            }
            System.out.println( "Test is complete..." );
        }
    }
    
        package com.example.yellowpages;
        import jade.util.leap.*; 
        import jade.core.Profile;
        import jade.core.ProfileImpl;
        import jade.wrapper.*;
        /**
         * Hello world!
         */
        public final class App {
            private App() {
            }
        
            /**
             * Says hello to the world.
             * @param args The arguments of the program.
             */
            public static void main(String[] args) {
                System.out.println( "Start test..." );
                Properties pp = new Properties();
                pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
                Profile p = new ProfileImpl(pp);
                jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
                try {
                    ac.acceptNewAgent("DFSearchAgent",new DFSearchAgent()).start();
                    ac.acceptNewAgent("DFSubscribeAgent",new DFSubscribeAgent()).start();
                    
                } catch (StaleProxyException e) {
                    throw new Error(e);
                }
                System.out.println( "Test is complete..." );
            
    }
    }
    
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Test is complete...
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast"
    
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Agent DFSearchAgent searching for services of type "weather-forecast"
    Test is complete...
    Agent DFSearchAgent did not find any weather-forecast service
    
    注册DFSearchAgent:

    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:01:59 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.management.AgentManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.messaging.Messaging initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.resource.ResourceManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.mobility.AgentMobility initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.event.Notification initialized
    May 28, 2021 2:02:00 PM jade.mtp.http.HTTPServer <init>
    INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
    May 28, 2021 2:02:00 PM jade.core.messaging.MessagingService boot
    INFO: MTP addresses:
    http://XYZ-064067.xyz.abc.gov:7778/acc
    May 28, 2021 2:02:00 PM jade.core.AgentContainerImpl joinPlatform
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast
    
    Agent DFSearchAgent found the following weather-forecast services:
    Service "unknown" provided by agent DFRegisterAgent@137.79.225.104:1099/JADE
    
    Exception message: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 15724561
    
    May 28, 2021 2:50:27 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:27 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:50:40 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:40 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 3:02:15 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 3:02:15 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    jade.core.IMTPException: jade.core.IMTPException occurred in remote container [Main container cannot reach newly starting node [Container-1, 179334, jicp://137.79.225.104:1099]: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 179334]
    
    package com.example.yellowpages;
    import jade.util.leap.*; 
    import jade.core.Profile;
    import jade.core.ProfileImpl;
    import jade.wrapper.*;
    /**
     * Hello world!
     */
    public final class App {
        private App() {
        }
    
        /**
         * Says hello to the world.
         * @param args The arguments of the program.
         */
        public static void main(String[] args) {
            System.out.println( "Start test..." );
            Properties pp = new Properties();
            pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
            Profile p = new ProfileImpl(pp);
            jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
            try {
                ac.acceptNewAgent("DFRegisterAgent",new DFRegisterAgent()).start();
                
            } catch (StaleProxyException e) {
                throw new Error(e);
            }
            System.out.println( "Test is complete..." );
        }
    }
    
        package com.example.yellowpages;
        import jade.util.leap.*; 
        import jade.core.Profile;
        import jade.core.ProfileImpl;
        import jade.wrapper.*;
        /**
         * Hello world!
         */
        public final class App {
            private App() {
            }
        
            /**
             * Says hello to the world.
             * @param args The arguments of the program.
             */
            public static void main(String[] args) {
                System.out.println( "Start test..." );
                Properties pp = new Properties();
                pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
                Profile p = new ProfileImpl(pp);
                jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
                try {
                    ac.acceptNewAgent("DFSearchAgent",new DFSearchAgent()).start();
                    ac.acceptNewAgent("DFSubscribeAgent",new DFSubscribeAgent()).start();
                    
                } catch (StaleProxyException e) {
                    throw new Error(e);
                }
                System.out.println( "Test is complete..." );
            
    }
    }
    
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Test is complete...
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast"
    
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Agent DFSearchAgent searching for services of type "weather-forecast"
    Test is complete...
    Agent DFSearchAgent did not find any weather-forecast service
    
    我在两个单独的shell窗口中运行了两个程序(首先运行DFRegisterAgent,然后运行DFSearchAgent),使用:

    java-cp target/demo-1.jar com.example.yellowpages.App

    第一控制台输出片段:

    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:01:59 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.management.AgentManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.messaging.Messaging initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.resource.ResourceManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.mobility.AgentMobility initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.event.Notification initialized
    May 28, 2021 2:02:00 PM jade.mtp.http.HTTPServer <init>
    INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
    May 28, 2021 2:02:00 PM jade.core.messaging.MessagingService boot
    INFO: MTP addresses:
    http://XYZ-064067.xyz.abc.gov:7778/acc
    May 28, 2021 2:02:00 PM jade.core.AgentContainerImpl joinPlatform
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast
    
    Agent DFSearchAgent found the following weather-forecast services:
    Service "unknown" provided by agent DFRegisterAgent@137.79.225.104:1099/JADE
    
    Exception message: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 15724561
    
    May 28, 2021 2:50:27 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:27 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:50:40 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:40 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 3:02:15 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 3:02:15 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    jade.core.IMTPException: jade.core.IMTPException occurred in remote container [Main container cannot reach newly starting node [Container-1, 179334, jicp://137.79.225.104:1099]: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 179334]
    
    package com.example.yellowpages;
    import jade.util.leap.*; 
    import jade.core.Profile;
    import jade.core.ProfileImpl;
    import jade.wrapper.*;
    /**
     * Hello world!
     */
    public final class App {
        private App() {
        }
    
        /**
         * Says hello to the world.
         * @param args The arguments of the program.
         */
        public static void main(String[] args) {
            System.out.println( "Start test..." );
            Properties pp = new Properties();
            pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
            Profile p = new ProfileImpl(pp);
            jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
            try {
                ac.acceptNewAgent("DFRegisterAgent",new DFRegisterAgent()).start();
                
            } catch (StaleProxyException e) {
                throw new Error(e);
            }
            System.out.println( "Test is complete..." );
        }
    }
    
        package com.example.yellowpages;
        import jade.util.leap.*; 
        import jade.core.Profile;
        import jade.core.ProfileImpl;
        import jade.wrapper.*;
        /**
         * Hello world!
         */
        public final class App {
            private App() {
            }
        
            /**
             * Says hello to the world.
             * @param args The arguments of the program.
             */
            public static void main(String[] args) {
                System.out.println( "Start test..." );
                Properties pp = new Properties();
                pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
                Profile p = new ProfileImpl(pp);
                jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
                try {
                    ac.acceptNewAgent("DFSearchAgent",new DFSearchAgent()).start();
                    ac.acceptNewAgent("DFSubscribeAgent",new DFSubscribeAgent()).start();
                    
                } catch (StaleProxyException e) {
                    throw new Error(e);
                }
                System.out.println( "Test is complete..." );
            
    }
    }
    
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Test is complete...
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast"
    
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Agent DFSearchAgent searching for services of type "weather-forecast"
    Test is complete...
    Agent DFSearchAgent did not find any weather-forecast service
    
    第二控制台输出片段:

    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:01:59 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.management.AgentManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.messaging.Messaging initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.resource.ResourceManagement initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.mobility.AgentMobility initialized
    May 28, 2021 2:02:00 PM jade.core.BaseService init
    INFO: Service jade.core.event.Notification initialized
    May 28, 2021 2:02:00 PM jade.mtp.http.HTTPServer <init>
    INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
    May 28, 2021 2:02:00 PM jade.core.messaging.MessagingService boot
    INFO: MTP addresses:
    http://XYZ-064067.xyz.abc.gov:7778/acc
    May 28, 2021 2:02:00 PM jade.core.AgentContainerImpl joinPlatform
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast
    
    Agent DFSearchAgent found the following weather-forecast services:
    Service "unknown" provided by agent DFRegisterAgent@137.79.225.104:1099/JADE
    
    Exception message: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 15724561
    
    May 28, 2021 2:50:27 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:27 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 2:50:40 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 2:50:40 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    May 28, 2021 3:02:15 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.5.0 - revision 6825 of 23-05-2017 10:06:04
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    May 28, 2021 3:02:15 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://137.79.225.104:1099
    
    jade.core.IMTPException: jade.core.IMTPException occurred in remote container [Main container cannot reach newly starting node [Container-1, 179334, jicp://137.79.225.104:1099]: Dispatcher error - Caused by:  DispatcherException in remote site. No skeleton for object-id 179334]
    
    package com.example.yellowpages;
    import jade.util.leap.*; 
    import jade.core.Profile;
    import jade.core.ProfileImpl;
    import jade.wrapper.*;
    /**
     * Hello world!
     */
    public final class App {
        private App() {
        }
    
        /**
         * Says hello to the world.
         * @param args The arguments of the program.
         */
        public static void main(String[] args) {
            System.out.println( "Start test..." );
            Properties pp = new Properties();
            pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
            Profile p = new ProfileImpl(pp);
            jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
            try {
                ac.acceptNewAgent("DFRegisterAgent",new DFRegisterAgent()).start();
                
            } catch (StaleProxyException e) {
                throw new Error(e);
            }
            System.out.println( "Test is complete..." );
        }
    }
    
        package com.example.yellowpages;
        import jade.util.leap.*; 
        import jade.core.Profile;
        import jade.core.ProfileImpl;
        import jade.wrapper.*;
        /**
         * Hello world!
         */
        public final class App {
            private App() {
            }
        
            /**
             * Says hello to the world.
             * @param args The arguments of the program.
             */
            public static void main(String[] args) {
                System.out.println( "Start test..." );
                Properties pp = new Properties();
                pp.setProperty(Profile.GUI, Boolean.TRUE.toString());
                Profile p = new ProfileImpl(pp);
                jade.wrapper.AgentContainer ac = jade.core.Runtime.instance().createMainContainer(p);
                try {
                    ac.acceptNewAgent("DFSearchAgent",new DFSearchAgent()).start();
                    ac.acceptNewAgent("DFSubscribeAgent",new DFSubscribeAgent()).start();
                    
                } catch (StaleProxyException e) {
                    throw new Error(e);
                }
                System.out.println( "Test is complete..." );
            
    }
    }
    
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Test is complete...
    Agent DFRegisterAgent registering service "unknown" of type "weather-forecast"
    
    INFO: --------------------------------------
    Agent container Main-Container@137.79.225.104 is ready.
    --------------------------------------------
    Agent DFSearchAgent searching for services of type "weather-forecast"
    Test is complete...
    Agent DFSearchAgent did not find any weather-forecast service
    
    查看GUI,两个代理都已注册

    当代理在单独的容器中注册时,代理无法看到彼此&我无法启动外围容器作为解决方法

    如何修复搜索代理以查找注册代理?


    非常感谢。

    当您启动外围设备容器时,如果主容器尚未激活,则会发生您报告的错误。 在启动外设容器之前,请确保您的main已启动并正在运行,且search agent位于顶部

    再见


    Giovanni

    不,实际上,在启动外围设备之前,主容器在所有情况下都已启动并运行,请仔细阅读帖子。