[ 
http://issues.apache.org/jira/browse/VELTOOLS-68?page=comments#action_12448972 
] 
            
Claude Brisson commented on VELTOOLS-68:
----------------------------------------

I don't know exactly why, but this patch breaks velocity 1.4 compatibility: 
Velocity 1.4 will search for Avalon and fail with:

java.lang.NoClassDefFoundError: org/apache/log/format/Formatter
        at 
org.apache.velocity.runtime.log.LogManager.createLogSystem(LogManager.java:162)
        at 
org.apache.velocity.runtime.RuntimeInstance.initializeLogger(RuntimeInstance.java:553)
        at 
org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:226)
        at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:80)
        at 
org.apache.velocity.tools.view.servlet.VelocityViewServlet.initVelocity(Unknown 
Source)
        at 
org.apache.velocity.tools.view.servlet.VelocityViewServlet.init(Unknown Source)
...

And it will throw this exception even when velocity.properties contains:

  # VelocityViewServlet uses the WebappLoader.
  resource.loader = webapp
  webapp.resource.loader.class = 
org.apache.velocity.tools.view.servlet.WebappLoader
  webapp.resource.loader.path = /
  webapp.resource.loader.extension = vtl

Everything works fine with velocity 1.5-dev.


> VelocityViewServlet has hard coded ServletLogger
> ------------------------------------------------
>
>                 Key: VELTOOLS-68
>                 URL: http://issues.apache.org/jira/browse/VELTOOLS-68
>             Project: VelocityTools
>          Issue Type: Bug
>          Components: VelocityView
>    Affects Versions: 1.3
>            Reporter: Henning Schmiedehausen
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: velocity-tools.patch
>
>
> VelocityViewServlet configures the Velocity engine to use the ServletLogger 
> (~line 323). Integration of the servlet into applications that use other 
> logging systems (e.g. log4j / commons-logging) is very hard because of that.
> - VVS should honor the logging setttings in velocity.properties (e.g. for 
> explicit jdk logging)
> - It should add the ServletLogger to the log engine search path and only use 
> it if no other logger was found (log4j / avalon etc.)
> - The ServletLogger class implements the deprecated LogSystem. VelocityTools 
> should provide a LogChute implementation of the SrevletLogger.

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to