Unable to start Nolio CARA Agent with java.lang.ClassNotFoundException: org.apache.log4j.Level after a reboot
search cancel

Unable to start Nolio CARA Agent with java.lang.ClassNotFoundException: org.apache.log4j.Level after a reboot

book

Article ID: 272268

calendar_today

Updated On:

Products

CA Release Automation - Release Operations Center (Nolio)

Issue/Introduction

The Nolio Release Automation agent on a Linux machine no longer starts after a reboot. 
The following ClassNotFoundException is shown in wrapper.log:

INFO   | jvm 6    | 2023/08/22 13:56:13.246 | Failed to instantiate SLF4J LoggerFactory
INFO   | jvm 6    | 2023/08/22 13:56:13.246 | Reported exception:
INFO   | jvm 6    | 2023/08/22 13:56:13.246 | java.lang.NoClassg/apache/log4j/Level
INFO   | jvm 6    | 2023/08/22 13:56:13.246 |     at org.sl/Level
INFO   | jvm 6    | 2023/08/22 13:56:13.246 |     at org.slf4j.LoggerFctory.java:128)
INFO   | jvm 6    | 2023/08/22 13:56:13.246 |     at org.slf4va:128)
INFO   | jvm 6    | 2023/08/22 13:56:13.246 |     at org.slf4j.LoggerFaialization(LoggerFactory.java:1gerFactory.java:107)
INFO   | jvm 6    | 2023/08/22 13:56:13.246 |     actory.getILoggerFactory(LoggtILoggerFactory(LoggerFactory.java:295)
INFO   | jvm 6    | 2023/08/22 13:56:13.246 |     at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)
INFO   | jvm 6    | 2023/08/22 13:56:13.246 |     at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)
INFO   | jvm 6    | 2023/08/22 13:56:13.246 |     at com.nolio.platform.agent.Deployer.<clinit>(Deployer.java:22)
INFO   | jvm 6    | 2023/08/22 13:56:13.246 |     at java.lang.Class.forName0(Native Method)
INFO   | jvm 6    | 2023/08/22 13:56:13.246 |     at java.lang.Class.forName(Class.java:264)
INFO   | jvm 6    | 2023/08/22 13:56:13.246 |     at org.tanukisoftware.wrapper.WrapperSimpleApp.<init>(WrapperSimpleApp.java:175)
INFO   | jvm 6    | 2023/08/22 13:56:13.246 |     at com.nolio.platform.deployer.AgentWrapper.<init>(AgentWrapper.java:94)
INFO   | jvm 6    | 2023/08/22 13:56:13.247 |     at com.nolio.platform.deployer.AgentWrapper.main(AgentWrapper.java:891)
INFO   | jvm 6    | 2023/08/22 13:56:13.247 | Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Level
INFO   | jvm 6    | 2023/08/22 13:56:13.247 |     at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
INFO   | jvm 6    | 2023/08/22 13:56:13.247 |     at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
INFO   | jvm 6    | 2023/08/22 13:56:13.247 |     at java.lang.ClassLoader.loadClass(ClassLoader.java:351)

Environment

Release : 6.7

Cause

Troubleshooting:
The error may be related to the log4j and slf4j-log4j jar:
https://stackoverflow.com/questions/10585656/java-lang-classnotfoundexception-org-apache-log4j-level

The following commands can be used to search for log4j and slf4j-log4j files 
find . -name log4j\* -print
find . -name slf4j-log4j\* -print

It appears the log4j jars had been deleted from the actionslib, lib and .install4j/user folders

Resolution

After copying the log4j-1.2.16.jar from the working agent to the actionslib and lib folder of the not working agent, the agent was starting.