perfmon-agent icon indicating copy to clipboard operation
perfmon-agent copied to clipboard

Missing SLF4J Dependency Causing Runtime Error

Open Moh-Snoussi opened this issue 2 years ago • 3 comments
trafficstars

Description

First of all, thank you for your work on this project.

I encountered an error when running ./startAgent.sh,The error was caused by a missing SLF4J dependency:

ERROR: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

Perfmon-Server-Agent version: 2.2.3 Operating System: Ubuntu 20.04.6 LTS Java version: openjdk 11.0.20 2023-07-18

I was able to resolve the issue by manually downloading the SLF4J API JAR file from the Central Repository and placing it in the lib directory of the project. However, this information was not mentioned in the project's documentation. It would be immensely helpful to update the documentation or to include all necessary dependencies.

Moh-Snoussi avatar Aug 13 '23 14:08 Moh-Snoussi

@Moh-Snoussi Feel free to create a PR with your view of documentation improvement

undera avatar Aug 13 '23 21:08 undera

@Moh-Snoussi Hi, I am trying to use this plugin in Jmeter for resource monitoring. For that I am trying to start this Agent but it is not recognizing SLF4J. It shows this error : SLF4J: No SLF4J providers were found. SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.

I have performed these steps :

  1. Downloaded slf4j-api-2.0.9.jar from https://repo1.maven.org/maven2/org/slf4j/slf4j-api/2.0.9/
  2. Pasted this file in lib folder of ServerAgent.

Specs : Server-Agent Version : 2.2.3 Operating System : Windows Java version : java version "1.8.0_401" Java(TM) SE Runtime Environment (build 1.8.0_401-b10) Java HotSpot(TM) 64-Bit Server VM (build 25.401-b10, mixed mode)

Do you know of any other step that I am missing ? Is there any pre-requisite or something that needs to be done in order to use SLF4J ?

mayankyadavy29 avatar Feb 22 '24 07:02 mayankyadavy29

@mayankyadavy29 please try slf4j-api-2.0.0.jar into the the lib of the ServerAgent folder.

Moh-Snoussi avatar Feb 22 '24 16:02 Moh-Snoussi