[ 
https://issues.apache.org/jira/browse/VELOCITY-719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Georg Kallidis updated VELOCITY-719:
------------------------------------

    Comment: was deleted

(was: may be this is related. The definition in TR.properties of the velocity 
log is

services.VelocityService.runtime.log=/log/velocity.log

If using as VelocityService the default class 
org.apache.turbine.services.velocity.TurbineVelocityService 

you find in the method createVelocityProperties(..)  (which is called when 
initializing) a condition: 

if (!key.endsWith(RESOURCE_LOADER_PATH) {... continue } 

and only after pathes are resolved relative to the web-app. 

If you consider this, then e.g defining runtime.log as above you end up (in may 
case) with a log in C:/log/velocity.log.

)
    
> Unwritable velocity.log appears to cause Velocity initialization to fail, 
> leaving velocity dead and useless. 
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: VELOCITY-719
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-719
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.6.2
>            Reporter: Cott Lang
>
> When we upgraded to 1.6.2 from 1.5.0, we began experiencing failures:
> Caused by: java.lang.NullPointerException
>  at 
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1400)
>  at 
> org.apache.velocity.runtime.RuntimeSingleton.getTemplate(RuntimeSingleton.java:326)
>  at org.apache.velocity.app.Velocity.mergeTemplate(Velocity.java:352)
> We eventually traced this back to Log4JChute attempting to create 
> velocity.log in an unwritable $CWD.
> I realize you may or may not consider this a bug, as you may wish to have the 
> system fail if it can't log.  However, I couldn't even find any output 
> indicating the initial failure to create velocity.log causing Velocity to 
> fail to initialize. :)
> On a related note, is it possible to change the runtime.log default to BLANK 
> so that velocity defaults to using a pre-existing log4j config if it exists?
> Although it's certainly an established tradition at this point, It seems a 
> little backward to default to creating it's own log4j configuration - and a 
> google search on velocity.log produces a very large number of people dealing 
> with the problem of Velocity trying to create a velocity.log somewhere that 
> doesn't work. :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.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