1

在批量运行中启动我的 Repast Simphony 模型时,我收到以下错误消息:

log4j:WARN No appenders could be found for logger (RLFA.society3.run.1.1).
log4j:WARN Please initialize the log4j system properly.

关于 log4j http://repast.sourceforge.net/docs/tutorial/SIM/Frequently%20Asked%20Questions.html#FrequentlyAskedQuestions-log4j的答案根本没有帮助,因为我只有在开始批量运行时才遇到问题。正常启动模型时,一切都很好。而且我也无法在 stackoverflow 中调整任何其他 log4j 问题/答案,因为 Repast Simphony 中的问题似乎相当具体。

以前有人遇到过这个问题并解决了吗?或者也许是一个想法,这个 RLFA 是什么?

注意:在第一步中,模型完全初始化时会发生错误。

感谢您的每一个帮助,

安迪


编辑:在velocity.log中我发现了这个日志,它说VM_global_library.vm丢失了——但这有帮助吗?

2011-10-24 18:11:32,505 - SimpleLog4JLogSystem initialized using logfile 'velocity.log'
2011-10-24 18:11:32,506 - ************************************************************** 
2011-10-24 18:11:32,507 - Starting Jakarta Velocity v1.4
2011-10-24 18:11:32,507 - RuntimeInstance initializing.
2011-10-24 18:11:32,507 - Default Properties File: org\apache\velocity\runtime\defaults\velocity.properties
2011-10-24 18:11:32,507 - Trying to use logger class org.apache.velocity.runtime.log.SimpleLog4JLogSystem
2011-10-24 18:11:32,507 - Using logger class org.apache.velocity.runtime.log.SimpleLog4JLogSystem
2011-10-24 18:11:32,601 - Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl)
2011-10-24 18:11:32,616 - Resource Loader Instantiated: org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
2011-10-24 18:11:32,616 - ClasspathResourceLoader : initialization starting.
2011-10-24 18:11:32,616 - ClasspathResourceLoader : initialization complete.
2011-10-24 18:11:32,662 - ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl)
2011-10-24 18:11:32,662 - Default ResourceManager initialization complete.
2011-10-24 18:11:32,672 - Loaded System Directive: org.apache.velocity.runtime.directive.Literal
2011-10-24 18:11:32,681 - Loaded System Directive: org.apache.velocity.runtime.directive.Macro
2011-10-24 18:11:32,732 - Loaded System Directive: org.apache.velocity.runtime.directive.Parse
2011-10-24 18:11:32,743 - Loaded System Directive: org.apache.velocity.runtime.directive.Include
2011-10-24 18:11:32,754 - Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
2011-10-24 18:11:33,001 - Created: 20 parsers.
2011-10-24 18:11:33,131 - Velocimacro : initialization starting.
2011-10-24 18:11:33,132 - Velocimacro : adding VMs from VM library template : VM_global_library.vm
2011-10-24 18:11:33,182 - ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader.
2011-10-24 18:11:33,182 - Velocimacro : error using  VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'VM_global_library.vm'
2011-10-24 18:11:33,182 - Velocimacro :  VM library template macro registration complete.
2011-10-24 18:11:33,182 - Velocimacro : allowInline = true : VMs can be defined inline in templates
2011-10-24 18:11:33,182 - Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions
2011-10-24 18:11:33,182 - Velocimacro : allowInlineLocal = false : VMs defined inline will be  global in scope if allowed.
2011-10-24 18:11:33,183 - Velocimacro : messages on  : VM system will output logging messages
2011-10-24 18:11:33,183 - Velocimacro : autoload off  : VM system will not automatically reload global library macros
2011-10-24 18:11:33,183 - Velocimacro : initialization complete.
2011-10-24 18:11:33,183 - Velocity successfully started.
4

3 回答 3

0

问题是我忘记在 Repast Simphony 中定义一个输出器。

于 2011-11-07T16:31:09.373 回答
0

从就餐常见问题解答:

https://repast.github.io/docs/RepastSimphonyFAQ.pdf

3.4 log4j:WARN 找不到记录器的附加程序(MessageCenter.INTERNAL.repast.simpony.ui.RSUIPlugin)

有几个人在尝试启动 Repast Simphony 模型时报告了错误,例如 log4j:WARN No appenders could be found for logger (MessageCenter.INTERNAL.repast.simphony.ui.RSApplication)。log4j:WARN 请正确初始化 log4j 系统。(MessageCenter....) 部分有一些可变性。

在几乎所有情况下,此警告实际上与记录配置错误无关,更有可能与 model.score 文件中的问题有关,例如不正确的路径或缺少代理类文件。

当您启动 Repast 模型并在 Eclipse 控制台中收到 log4j 消息时,您通常可以从 Repast 运行时错误日志中找到更多信息。当 Repast 运行时右下角的图标闪烁时,错误日志可用。

于 2019-03-12T11:03:41.347 回答
0

我试图从命令行运行一个 RepastSymphony 模型,并且还有一条关于 log4j appenders 的错误消息。MessageCenter.log4j.properties对我来说,解决方案是在类路径中包含我的文件所在的项目目录,例如

-cp ='.;./bin/.;./lib/*;

而不仅仅是

-cp ='./bin/.;./lib/*;
于 2019-03-12T11:13:57.603 回答