質問

when starting my Repast Simphony Model in Batch run I get this error message:

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

The answer here concerning log4j http://repast.sourceforge.net/docs/tutorial/SIM/Frequently%20Asked%20Questions.html#FrequentlyAskedQuestions-log4j doesn't help at all, since I got the problem ONLY when starting batch run. When starting the model normally everything is fine. And I also couldn't adapt any of the other log4j problems/answers here in stackoverflow, since that problem within Repast Simphony seems rather specific.

Anyone ran into this problem before and solved it? Or Maybe an idea, what this RLFA is?

Note: the error occurs when the model is fully initialized, during the first step.

Thanks for every help,

Andy


edit: in velocity.log I found this loggings, where it says that a VM_global_library.vm is missing - but does this help further?

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.
役に立ちましたか?

解決

The problem was that I forgot to define an Outputter in Repast Simphony.

他のヒント

From Repast FAQ:

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

3.4 log4j:WARN No appenders could be found for logger (MessageCen- ter. INTERNAL.repast.simphony.ui.RSUIPlugin)

Several people have reported errors when trying to start a Repast Simphony model such as log4j:WARN No appenders could be found for logger (MessageCenter. INTERNAL.repast.simphony.ui.RSApplication ). log4j:WARN Please initialize the log4j system properly. with some variability in the (MessageCenter....) part.

In almost all cases, this warning is NOT actually related to logging configuration errors, and more likely it is related to problems in the model.score file like incorrect paths, or missing agent class files.

When you start a Repast model and you get the log4j message in the Eclipse console, you can usually found more information from the Repast runtime error log. The error log is available when the icon in the lower right corner of the Repast runtime is flashing.

I tried to run a RepastSymphony model from the command line and also had an error message about log4j appenders. For me the solution was to include the project directory, where my MessageCenter.log4j.properties file is located, in the class path, e.g

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

instead of only

-cp ='./bin/.;./lib/*;
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top