Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/entity-framework/4.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.lang.ClassNotFoundException_Java_Agent_Multi Agent - Fatal编程技术网

未加载内部操作错误:java.lang.ClassNotFoundException

未加载内部操作错误:java.lang.ClassNotFoundException,java,agent,multi-agent,Java,Agent,Multi Agent,我正在尝试运行一个使用一些内部操作的jason代码实现。解释器显示无法找到内部操作的“java”代码,如图所示: Server running on http://191.36.8.42:3272 [aslparser] [peleus.asl:29] warning: The internal action class for 'org.soton.peleus.act.plan(Goals)' was not loaded! Error: java.lang.ClassNotFoundExc

我正在尝试运行一个使用一些内部操作的jason代码实现。解释器显示无法找到内部操作的“java”代码,如图所示:

Server running on http://191.36.8.42:3272
[aslparser] [peleus.asl:29] warning: The internal action class for 'org.soton.peleus.act.plan(Goals)' was not loaded! Error:
java.lang.ClassNotFoundException: org.soton.peleus.act.plan
[aslparser] [peleus.asl:42] warning: The internal action class for 'org.soton.peleus.act.isTrue(H)' was not loaded! Error:
java.lang.ClassNotFoundException: org.soton.peleus.act.isTrue
[peleus] Could not finish intention: intention 1:  +des([on(b3,table),on(b2,b3),on(b1,b2)])[source(self)] <- ... org.soton.peleus.act.plan(Goals); !checkGoals(Goals); .print("Goals ",Goals," were satisfied") /
{Goals=[on(b3,table),on(b2,b3),on(b1,b2)]}Trigger: +des([on(b3,table),on(b2,b3),on(b1,b2)])[noenv,code(org.soton.peleus.act.plan([on(b3,table),on(b2,b3),on(b1,b2)])),code_line(29),code_src("peleus.asl"),error(action_failed),error_msg("no environment configured!"),source(self)]
[peleus] Adding belief clear(table)
部分代理代码(由Felipe Meneguzzi编写)如下所示:

//The next line is line 28
+des(Goals) : true
     <- org.soton.peleus.act.plan(Goals);
         !checkGoals(Goals);
         .print("Goals ",Goals," were satisfied").

+!checkGoals([]) : true <- true.

//The next line is line 40
+!checkGoals([H|T]) : true
    <- .print("Checking ", H);
        org.soton.peleus.act.isTrue(H);
        !checkGoals(T).

这完全取决于您如何执行应用程序

  • 如果您使用的是java,则应定义类路径以包含缺少的类
  • 如果您使用的是jason脚本(使用Ant),那么.mas2j文件也应该包括类路径

更多关于这方面的信息,请参阅。请注意,类路径是找到.class文件的位置,而不是.java源代码文件。此错误是因为缺少类,而不是源代码。

请不要将堆栈跟踪对象格式化为块引号,请使用代码格式以保留原始缩进。
//The next line is line 28
+des(Goals) : true
     <- org.soton.peleus.act.plan(Goals);
         !checkGoals(Goals);
         .print("Goals ",Goals," were satisfied").

+!checkGoals([]) : true <- true.

//The next line is line 40
+!checkGoals([H|T]) : true
    <- .print("Checking ", H);
        org.soton.peleus.act.isTrue(H);
        !checkGoals(T).
 Peleus\src\org\soton\peleus for java files
 Peleus\examples for mas2j and asl tested project