[logback-user] AbstractMethodError in LogbackMDCAdapter

ceki ceki at qos.ch
Fri Nov 4 11:54:52 CET 2011


Hi Hei,

If you look at MDCAdapter javadocs [1], you will see that the
getCopyOfContextMap method was introduced in slf4j version
1.5.1. Logback-classic version 0.9.9 targets an earlier SLF4J version,
i.e v1.5.0.  Try using logback version 0.9.10 or later and the problem
will go away.

[1] http://slf4j.org/api/org/slf4j/spi/MDCAdapter.html

-- 
Ceki
http://twitter.com/#!/ceki

On 04/11/2011 11:33 AM, Raccoonwao wrote:
> Hi all,
>
> I am using logback 0.9.9 with activemq 5.5.1. Right after startup, the
> application always encounters an AbstractMethodException in
> LogbackMDCAdapter, which is firstly triggered by PooledTaskRunner (line
> 45). A snippet is provided as:
>
>
> public static void main(String[] args) {
> MDCAdapter l = StaticMDCBinder.SINGLETON.getMDCA();
> Map m = l.getCopyOfContextMap(); // <-- got excpetion
> System.out.println("np error"); // never come to this line
> }
>
>
>
> Seems that the concrete class LogbackMDCAdapter implements MDCAdapter
> without implementing the defined method getCopyOfContextMap().
>
>
> Any clues?
>
> Thanks,
> Hei
>


More information about the Logback-user mailing list