ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alejandro Fernandez <>
Subject Compile error due to older jar
Date Wed, 14 Jun 2017 18:42:34 GMT
Hi all, if you run into this issue compiling ambari, please remove older sl4j jars from your
maven repo.
java.lang.NoClassDefFoundError: org/slf4j/event/LoggingEvent

Logback-classic version 1.1.4 and later require slf4j-api version 1.7.15 or later.

With an earlier slf4j-api.jar in the classpath, attempting introspection of a Logger instance
returned by logback version 1.1.4 or later will result in a NoClassDefFoundError similar to
that shown below.

Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/event/LoggingEvent
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(
        at java.lang.Class.privateGetPublicMethods(
        at java.lang.Class.getMethods(
        at java.beans.Introspector.getPublicDeclaredMethods(
        at java.beans.Introspector.getTargetMethodInfo(
        at java.beans.Introspector.getBeanInfo(
        at java.beans.Introspector.getBeanInfo(

Placing slf4j-api.jar version 1.7.15 or later in the classpath should solve the issue.

Note that this problem only occurs with logback version 1.1.4 and later, other bindings such
as slf4j-log4j, slf4j-jdk14 and slf4j-simple are unaffected.


From: Tim Thorpe <<>>
Date: Tuesday, June 13, 2017 at 3:15 PM
To: Jaimin Jetly <<>>
Cc: Alejandro Fernandez <<>>
Subject: Re: Please fix and recommit ambari tasks (AMBARI-20122 and AMBARI-21202)

Hi Jaimin,

I have been trying to get a cluster working with the latest trunk code and it is failing to
start ambari-server.  I end up getting this in the log:

Exception in thread "main" java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.format(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;
        at org.apache.ambari.server.controller.ControllerModule.getPersistenceProperties(
        at org.apache.ambari.server.controller.ControllerModule.buildJpaPersistModule(
        at org.apache.ambari.server.controller.ControllerModule.configure(

Not sure if this is due to the changes Alejandro put in.

I ended up reverting some of the jars to the previous version:
-rw-r--r--  1 root root    4952 Jun 13 12:29 jul-to-slf4j-1.7.2.jar
-rw-r--r--  1 root root   26083 Jun 13 12:26 slf4j-api-1.7.2.jar
-rw-r--r--  1 root root    8819 Jun 13 12:26 slf4j-log4j12-1.7.2.jar

It still failed after reverting those jars, then I removed these:
-rw-r--r--  1 root root    8815 Jun 13 11:01 slf4j-jdk14-1.5.6.jar
-rw-r--r--  1 root root    5201 Jun 13 11:01 slf4j-nop-1.5.3.jar

After that ambari-server was able to start successfully.

I haven't played around to figure out whether reverting the jars was necessary or not.
Tim Thorpe
IBM Information Management - Ottawa Lab

From:        Jaimin Jetly <<>>
To:        "<>" <<>>
Date:        06/12/2017 07:02 PM
Subject:        Please fix and recommit ambari tasks

Hi Tim,

I had to revert following two commits as it was blocking folks from deploying clusters with
selective services:

commit 0b6d0dcef10ec60c83ad055567b487104573ae62
Author: Tim Thorpe <<>>
Date:   Thu Jun 8 08:51:30 2017 -0700

   AMBARI-20122 - Stack advisor needs to recommend dependency forslaves and masters

commit 7dc91c5a8e75966f642a4890ed7a5750687b5928
Author: Tim Thorpe <<>>
Date:   Thu Jun 8 08:49:32 2017 -0700

   AMBARI-21202 - YARN service advisor has spelling error in yarn-site

I have reopened the respective Jiras. Please recommit them with the scenario of deploying
selective services fixed.

-- Thanks
‚Äč    Jaimin

View raw message