Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.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 翡翠代理不';t添加到代理列表中_Java_Agents Jade - Fatal编程技术网

Java 翡翠代理不';t添加到代理列表中

Java 翡翠代理不';t添加到代理列表中,java,agents-jade,Java,Agents Jade,我想在JADE环境中运行一个简单的代理(Mac OSX El Capitan,JADE 4.4.0),这是我的代理代码: public class BookBuyerAgent extends Agent { protected void setup() { // Printout a welcome message System.out.println("Hello World! My name is "+getLocalName()); }

我想在JADE环境中运行一个简单的代理(Mac OSX El Capitan,JADE 4.4.0),这是我的代理代码:

public class BookBuyerAgent extends Agent {
    protected void setup() {
        // Printout a welcome message
        System.out.println("Hello World! My name is "+getLocalName());

    }
}
我在bash_概要文件中设置类路径如下:

export CLASSPATH=/Users/John/jade/lib/jade.jar:/Users/John/jade/lib/jadeExamples.jar:/Users/John/jade/lib/commons-codec/commons-codec-1.3.jar:/Users/John/jade/src/jade/:/Users/John/Desktop/
java  jade.Boot -gui -agents buyer:com.app.jade.BookBuyerAgent
我正在这样运行我的代理:

export CLASSPATH=/Users/John/jade/lib/jade.jar:/Users/John/jade/lib/jadeExamples.jar:/Users/John/jade/lib/commons-codec/commons-codec-1.3.jar:/Users/John/jade/src/jade/:/Users/John/Desktop/
java  jade.Boot -gui -agents buyer:com.app.jade.BookBuyerAgent
但我得到这个警告:

WARNING: Automatic main-detection mechanism initialization failed (Error setting up multicast socket - Caused by:  Can't assign requested address). Mechanism disabled!
然后出现以下错误:

SEVERE: Cannot create agent buyer: Class com.app.jade.BookBuyerAgent for agent ( agent-identifier :name buyer@192.168.1.4:1099/JADE ) not found - Caused by:  com.app.jade.BookBuyerAgent
之后,Jade GUI出现了,但我的代理并没有添加到代理列表中,而且它也不工作。我检查了所有东西,但不知道出了什么问题

这是我得到的全部信息:

Feb 27, 2016 4:14:59 PM jade.core.Runtime beginContainer
INFO: ----------------------------------
    This is JADE 4.4.0 - revision 6778 of 21-12-2015 12:24:43
    downloaded in Open Source, under LGPL restrictions,
    at http://jade.tilab.com/
----------------------------------------
Feb 27, 2016 4:14:59 PM jade.imtp.leap.LEAPIMTPManager initialize
INFO: Listening for intra-platform commands on address:
- jicp://192.168.1.4:1099

Feb 27, 2016 4:14:59 PM jade.core.AgentContainerImpl init
WARNING: Automatic main-detection mechanism initialization failed (Error setting up multicast socket - Caused by:  Can't assign requested address). Mechanism disabled!
Feb 27, 2016 4:15:01 PM jade.core.BaseService init
INFO: Service jade.core.management.AgentManagement initialized
Feb 27, 2016 4:15:01 PM jade.core.BaseService init
INFO: Service jade.core.messaging.Messaging initialized
Feb 27, 2016 4:15:01 PM jade.core.BaseService init
INFO: Service jade.core.resource.ResourceManagement initialized
Feb 27, 2016 4:15:01 PM jade.core.BaseService init
INFO: Service jade.core.mobility.AgentMobility initialized
Feb 27, 2016 4:15:01 PM jade.core.BaseService init
INFO: Service jade.core.event.Notification initialized
Feb 27, 2016 4:15:31 PM jade.mtp.http.HTTPServer <init>
INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
Feb 27, 2016 4:15:31 PM jade.core.messaging.MessagingService boot
INFO: MTP addresses:
http://192.168.1.4:7778/acc
Feb 27, 2016 4:15:31 PM jade.core.AgentContainerImpl startBootstrapAgents
SEVERE: Cannot create agent buyer: Class com.app.jade.BookBuyerAgent for agent ( agent-identifier :name buyer@192.168.1.4:1099/JADE ) not found - Caused by:  com.app.jade.BookBuyerAgent
Feb 27, 2016 4:15:31 PM jade.core.AgentContainerImpl joinPlatform
INFO: --------------------------------------
Agent container Main-Container@192.168.1.4 is ready.
2016年2月27日下午4:14:59 jade.core.Runtime beginContainer
信息:----------------------------------
这是JADE 4.4.0-2015年12月21日第6778版12:24:43
在LGPL限制下以开源方式下载,
在http://jade.tilab.com/
----------------------------------------
2016年2月27日下午4:14:59 jade.imtp.leap.leappimtpmanager初始化
信息:侦听地址上的平台内命令:
- jicp://192.168.1.4:1099
2016年2月27日下午4:14:59 jade.core.AgentContainerImpl init
警告:自动主检测机制初始化失败(设置多播套接字时出错-原因:无法分配请求的地址)。机械失灵!
2016年2月27日下午4:15:01 jade.core.BaseService init
信息:服务jade.core.management.AgentManagement已初始化
2016年2月27日下午4:15:01 jade.core.BaseService init
信息:服务jade.core.messaging.messaging已初始化
2016年2月27日下午4:15:01 jade.core.BaseService init
信息:服务jade.core.resource.ResourceManagement已初始化
2016年2月27日下午4:15:01 jade.core.BaseService init
信息:服务jade.core.mobility.AgentMobility已初始化
2016年2月27日下午4:15:01 jade.core.BaseService init
信息:服务jade.core.event.Notification已初始化
2016年2月27日下午4:15:31 jade.mtp.http.HTTPServer
信息:HTTP-MTP使用XML解析器com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
2016年2月27日下午4:15:31 jade.core.messaging.MessagingService启动
信息:MTP地址:
http://192.168.1.4:7778/acc
2016年2月27日下午4:15:31 jade.core.AgentContainerImpl StartBootTrapPages
严重:无法为代理创建代理买方:Class com.app.jade.BookBuyerAgent(代理标识符:名称buyer@192.168.1.4:1099/JADE)未找到-原因:com.app.JADE.BookBuyerAgent
2016年2月27日下午4:15:31 jade.core.AgentContainerImpl平台
信息:--------------------------------------
代理容器总管-Container@192.168.1.4准备好了。

我不确定自己是否理解了这个问题,但对于警告,我发现: 此警告表示自动主检测机制(即外围容器能够自动发现主容器运行位置的机制)已禁用,因为基础网络堆栈不支持IP多播(例如,当您在未连接到网络的Windows XP PC上工作时,情况总是如此)。 如果在启动外围容器时明确指定主容器的主机和端口(与默认容器不同),则可以忽略此警告

用于部署代理(假设已部署容器)

javajade.Boot-container-host localhost-agents买家:com.app.jade.BookBuyerAgent