You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Henning Schmiedehausen (JIRA)" <de...@velocity.apache.org> on 2007/03/08 01:04:40 UTC
[jira] Closed: (VELOCITY-360) Logger error with multiple Velocity
engines
[ https://issues.apache.org/jira/browse/VELOCITY-360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henning Schmiedehausen closed VELOCITY-360.
-------------------------------------------
> Logger error with multiple Velocity engines
> -------------------------------------------
>
> Key: VELOCITY-360
> URL: https://issues.apache.org/jira/browse/VELOCITY-360
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.4
> Environment: Operating System: Windows 2000
> Platform: PC
> Reporter: Andrea Vaccaro
> Fix For: 1.5
>
>
> If you instance and init multiple engines, under some circumstances that are not
> yet clear, there is an error on the log4j logger.
> For example the following code:
> public static void main(String[] args) throws Exception
> {
> VelocityEngine[] engines = new VelocityEngine[4];
>
> for (int i = 0; i < engines.length; i++)
> {
> VelocityEngine engine = new VelocityEngine();
> engine.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH,
> "C:\\temp");
> engine.init();
> }
> }
> will generate 141 lines of the following error:
> log4j:ERROR Attempted to append to closed appender named [null].
> Debugging Velocity source code we noticed that all the engines add an appender
> to the same shared logger and sometime a null appender is added.
> We are currently using Velocity 1.4 and Log4J 1.2.9.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org