You are currently reviewing an older revision of this page.

KB-1030 "velocity.log (Permission denied)" error thrown during JBoss startup

Symptoms

When starting JBoss, the following errors will appear in the application server log:

15:17:42,365 INFO  [stdout] (ServerService Thread Pool -- 81) 2015-10-07 15:17:42,357 [ServerService Thread Pool -- 81] ERROR com.appiancorp.common.config.ConfigObject - An error occurred while trying to initialize the config object com.appiancorp.common.crypto.KeyStoreConfig
15:17:42,365 INFO  [stdout] (ServerService Thread Pool -- 81) org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'velocityEngine' defined in class path resource [com/appiancorp/security/auth/saml/SamlBindingSpringConfig.class]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.apache.velocity.app.VelocityEngine com.appiancorp.security.auth.saml.SamlBindingSpringConfig.velocityEngine()] threw exception; nested exception is org.apache.velocity.exception.VelocityException: Error initializing log: Failed to initialize an instance of org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration.
...
15:17:42,400 INFO  [stdout] (ServerService Thread Pool -- 81) Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.apache.velocity.app.VelocityEngine com.appiancorp.security.auth.saml.SamlBindingSpringConfig.velocityEngine()] threw exception; nested exception is org.apache.velocity.exception.VelocityException: Error initializing log: Failed to initialize an instance of org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration.
...
15:17:42,402 INFO  [stdout] (ServerService Thread Pool -- 81) Caused by: org.apache.velocity.exception.VelocityException: Error initializing log: Failed to initialize an instance of org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration.
...
15:17:42,416 INFO  [stdout] (ServerService Thread Pool -- 81) Caused by: org.apache.velocity.exception.VelocityException: Failed to initialize an instance of org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration.
...
15:17:42,416 INFO  [stdout] (ServerService Thread Pool -- 81) Caused by: java.lang.RuntimeException: Error configuring Log4JLogChute : 
...
15:17:42,422 INFO  [stdout] (ServerService Thread Pool -- 81) Caused by: java.io.FileNotFoundException: velocity.log (Permission denied)

As a result of these errors, JBoss will fail to start up.

Cause

The user running the JBoss process does not have permission to read or write to the velocity.log file. This log is located in the <JBOSS_HOME>/bin directory.

The velocity.log file corresponds to the Velocity engine, a Java-based template engine used to generate SQL, XML, and other output that many web applications can use.

A class that calls the Velocity engine in JBoss was added with Appian 7.10 and is required for startup.

To ensure that any issues with the Velocity engine are appropriately recorded in the velocity.log file, JBoss will attempt to write to this file. If the user running the JBoss process does not have both read and write access over this log file, JBoss will return the above error and fail to start up.

Action

Grant the JBoss user permission to both read and write the velocity.log file located in <JBOSS_HOME>/bin.

Affected Versions

This article applies to Appian 7.10 and later with JBoss EAP as an application server.

Last Reviewed: February 2017