org.apache.commons.discovery.DiscoveryException: Class org.apache.commons.logging.impl.SLF4JLogFacto

kunti pawar June 15, 2018

I am getting error as below:

Caused by: org.apache.commons.discovery.DiscoveryException: Class org.apache.commons.logging.impl.SLF4JLogFactory does not implement org.apache.commons.logging.LogFactory

1 answer

1 accepted

1 vote
Answer accepted
Mark Markov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 15, 2018

Hello @kunti pawar can you provide code expamle of you logger declaration?

If you want to use slf4j it should be like this:


import org.slf4j.Logger;
import org.slf4j.LoggerFactory; 

final Logger log = LoggerFactory.getLogger("my logger");
kunti pawar June 15, 2018

 

I am using below code:-

 

import org.apache.log4j.Logger
import com.polarion.alm.ws.client.WebServiceFactory;
import com.polarion.alm.ws.client.session.SessionWebService;
import com.polarion.alm.ws.client.tracker.TrackerWebService;
import com.polarion.alm.ws.client.types.tracker.WorkItem;


def myLog = Logger.getLogger("com.onresolve.jira.groovy")
myLog.info("Hello kunti from Jira")

Mark Markov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 15, 2018

Hello @kunti pawar

Does replace log4j with slf4j help you?

kunti pawar June 17, 2018

thanks its help me

Suggest an answer

Log in or Sign up to answer