public VelocitySQLTemplateProcessor() { this.renderingUtils = new SQLTemplateRenderingUtils(); this.velocityRuntime = new RuntimeInstance(); // set null logger velocityRuntime.addProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM, new NullLogChute()); velocityRuntime.addProperty( RuntimeConstants.RESOURCE_MANAGER_CLASS, SQLTemplateResourceManager.class.getName()); velocityRuntime.addProperty("userdirective", BindDirective.class.getName()); velocityRuntime.addProperty("userdirective", BindEqualDirective.class.getName()); velocityRuntime.addProperty("userdirective", BindNotEqualDirective.class.getName()); velocityRuntime.addProperty("userdirective", BindObjectEqualDirective.class.getName()); velocityRuntime.addProperty("userdirective", BindObjectNotEqualDirective.class.getName()); velocityRuntime.addProperty("userdirective", ResultDirective.class.getName()); velocityRuntime.addProperty("userdirective", ChainDirective.class.getName()); velocityRuntime.addProperty("userdirective", ChunkDirective.class.getName()); try { velocityRuntime.init(); } catch (Exception ex) { throw new CayenneRuntimeException("Error setting up Velocity RuntimeInstance.", ex); } }