Folders missing execute permission causing Jira Server startup and class loading error
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Problem
Folders missing execute permission causes class loading errors in Jira. Execute permission allows operating system user to enter the directory and access to any of its files. When the permission does not exist, Jira can throw exceptions in Tomcat logs while starting like the following example. This exception will also fail Jira to write any log4j logs.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
08-Jul-2021 18:13:34.682 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.57
log4j:ERROR Could not instantiate class [com.atlassian.jira.logging.JiraHomeAppender].
java.lang.ClassNotFoundException: com.atlassian.jira.logging.JiraHomeAppender
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.log4j.helpers.Loader.loadClass(Loader.java:188)
at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:327)
at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:124)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:785)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
at org.apache.log4j.Logger.getLogger(Logger.java:104)
at com.atlassian.logging.log4j.juli.JuliToLog4jHandler.publish(JuliToLog4jHandler.java:51)
at java.util.logging.Logger.log(Logger.java:738)
at java.util.logging.Logger.doLog(Logger.java:765)
at java.util.logging.Logger.logp(Logger.java:931)
at org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:173)
at org.apache.juli.logging.DirectJDKLog.info(DirectJDKLog.java:116)
at org.apache.jasper.servlet.TldScanner.scanJars(TldScanner.java:264)
at org.apache.jasper.servlet.TldScanner.scan(TldScanner.java:104)
at org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:101)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5144)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
log4j:ERROR Could not instantiate appender named "filelog".
log4j:ERROR Could not instantiate class [com.atlassian.jira.logging.JiraHomeAppender].
If the execute permission on directories removed while Jira was already started, warnings may occur in atlassian-jira.log files.
1
Unable to run plugin code because of 'org.apache.velocity.exception.VelocityException - Could not find template 'jira.footer:standard-footer/templates/plugins/footer/license-link.vm' ensure it is in the classpath.'.
Diagnosis
In order to quickly identify folders that does not have execute permissions at owner level, execute the following commands.
1
2
find <Installation-Directory> -type d -not -perm /100
find <Home-Directory> -type d -not -perm /100
Cause
Any action that would change permission of files/directories like chmod command might cause this issue.
Solution
Execute the following command on folders with permission problem.
1
chmod -R u=rwx,g=rx,o=rx /path/to/folder
Was this helpful?