Error in velocity and log4J

I think this line has the answer. Looks like there is an issue creating the velocity.log file. What does your configuration file look like?

Caused by: java.io.FileNotFoundException: velocity.log (Permission denied)

Velocity tries to put the logfile in the directory Tomcat was started from, and I believe that is actually /.

You can force Velocity to log to Tomcat's standard log by adding these lines to your velocity.properties:

runtime.log.logsystem.class=org.apache.velocity.runtime.log.SimpleLog4JLogSystem
runtime.log.logsystem.log4j.category=velocity
runtime.log.logsystem.log4j.logger=velocity

The velocity.properties should go into /WEB-INF/velocity.properties but you can override that in you servlet definition in web.xml.

If you're initialising Velocity by properties and not the velocity.properties:

VelocityEngine engine = new VelocityEngine();

Properties props = new Properties();
props.put("runtime.log.logsystem.class", "org.apache.velocity.runtime.log.SimpleLog4JLogSystem");
props.put("runtime.log.logsystem.log4j.category", "velocity");
props.put("runtime.log.logsystem.log4j.logger", "velocity");

engine.init(props);

Read more here:

http://velocity.apache.org/engine/devel/developer-guide.html#usinglog4jwithexistinglogger

and here:

http://minaret.biz/tips/tomcatLogging.html#velocity