Many thanks. 

Yes there were two exceptions, I had ignored the earlier one thinking it was
unimportant - but I see now it was causing Velocity to not initialise - but
then the code execution continued then getting NullPointer much later on
....

The first exception was just a permission denied when trying to write to the
velocity.log :-

21 Aug 2007 10:16:27 [main] ERROR
net.sf.navigator.displayer.VelocityMenuDisplayer  - Error initializing
Velocity: Unable to configure AvalonLogSystem :
java.io.FileNotFoundException: /usr/share/tomcat55/velocity.log (Permission
denied) 


For some reason the log is being written to /usr/var/tomcat55   
top directory rather than the /logs subdirectory.  

I see in Struts Menu velocity init there is, then it looks for a
velocity.properties on themclasspath  :- 

  // default to servletlogger, which logs to the servlet engines log
       
velocityEngine.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS,
                             ServletLogger.class.getName());

I will try setting up a velocity.properties with

runtime.log=logs/velocity.log

maybe that is what is needed ?




Nathan Bubna wrote:
> 
> it certainly looks like some exception is thrown either prior to or
> during the call to init(props).  can you find this Exception in your
> logs?
> 

-- 
View this message in context: 
http://www.nabble.com/getTemplate%28%29-Nullpointer-but-Velocity-is-initialised---HELP-tf4299522.html#a12257949
Sent from the Velocity - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to