You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Nathan Bubna (JIRA)" <ji...@apache.org> on 2006/03/06 03:43:31 UTC

[jira] Resolved: (VELOCITY-360) Logger error with multiple Velocity engines

     [ http://issues.apache.org/jira/browse/VELOCITY-360?page=all ]
     
Nathan Bubna resolved VELOCITY-360:
-----------------------------------

    Fix Version: 1.5
     Resolution: Duplicate
      Assign To:     (was: Velocity-Dev List)

This is a duplicate of VELOCITY-193, which has been fixed.

> Logger error with multiple Velocity engines
> -------------------------------------------
>
>          Key: VELOCITY-360
>          URL: http://issues.apache.org/jira/browse/VELOCITY-360
>      Project: Velocity
>         Type: Bug
>   Components: Source
>     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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org