Conflicting versions of slf4j (1.5.8 vs. 1.6.0) causing error when attempting to run the akka script

5,065 views
Skip to first unread message

smitty

unread,
Jan 22, 2012, 10:32:22 AM1/22/12
to Akka User List
Hello,

I am attempting to run the akka script for microkernel 1.2, but I'm
running into an slf4j version mismatch. I've read the stacktrace as
well as the link it contains to the slf4j site where it describes the
problem...I understand the why but I'm a bit unsure how to go about
resolving this issue.

I apologize if this is a re-post of a common problem, I ran multiple
searches but couldn't find the answer.

I've included the stack trace below.

Thank you!

==============================================================================
Running version 1.2
==============================================================================

Starting Akka...
SLF4J: The requested version 1.5.8 by your slf4j binding is not
compatible with [1.6]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for
further details.
Exception in thread "main" java.lang.NoSuchMethodError:
org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;
[Ljava/lang/Object;)Ljava/lang/String;
at org.slf4j.impl.Log4jLoggerAdapter.debug(Log4jLoggerAdapter.java:
267)
at org.eclipse.jetty.util.log.Slf4jLog.debug(Slf4jLog.java:70)
at org.eclipse.jetty.util.log.Log.initialized(Log.java:80)
at org.eclipse.jetty.util.log.Log.isDebugEnabled(Log.java:228)
at org.eclipse.jetty.xml.XmlParser.parse(XmlParser.java:202)
at
org.eclipse.jetty.xml.XmlConfiguration.<init>(XmlConfiguration.java:
144)
at akka.http.EmbeddedAppServer$class.onLoad(EmbeddedAppServer.scala:
43)
at akka.kernel.Kernel$$anon$1.akka$actor$BootableActorLoaderService$
$super$onLoad(Kernel.scala:31)
at akka.actor.BootableActorLoaderService
$class.onLoad(BootableActorLoaderService.scala:49)
at akka.kernel.Kernel$$anon$1.akka$remote$BootableRemoteActorService$
$super$onLoad(Kernel.scala:31)
at akka.remote.BootableRemoteActorService
$class.onLoad(BootableRemoteActorService.scala:28)
at akka.kernel.Kernel$$anon$1.akka$camel$CamelService$$super
$onLoad(Kernel.scala:31)
at akka.camel.CamelService$class.onLoad(CamelService.scala:39)
at akka.kernel.Kernel$$anon$1.onLoad(Kernel.scala:31)
at akka.util.AkkaLoader$$anonfun$boot$1.apply$mcV$sp(AkkaLoader.scala:
27)
at akka.util.Switch.liftedTree1$1(LockUtil.scala:126)
at akka.util.Switch.transcend(LockUtil.scala:125)
at akka.util.Switch.switchOn(LockUtil.scala:138)
at akka.util.AkkaLoader.boot(AkkaLoader.scala:24)
at akka.kernel.Kernel$.boot(Kernel.scala:31)
at akka.kernel.Main$.main(Kernel.scala:19)
at akka.kernel.Main.main(Kernel.scala)
[ERROR] [1/22/12 9:23 AM] [main] [Switch]
org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;
[Ljava/lang/Object;)Ljava/lang/String;
java.lang.NoSuchMethodError:
org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;
[Ljava/lang/Object;)Ljava/lang/String;
at org.slf4j.impl.Log4jLoggerAdapter.debug(Log4jLoggerAdapter.java:
267)
at org.eclipse.jetty.util.log.Slf4jLog.debug(Slf4jLog.java:70)
at org.eclipse.jetty.util.log.Log.initialized(Log.java:80)
at org.eclipse.jetty.util.log.Log.isDebugEnabled(Log.java:228)
at org.eclipse.jetty.xml.XmlParser.parse(XmlParser.java:202)
at
org.eclipse.jetty.xml.XmlConfiguration.<init>(XmlConfiguration.java:
144)
at akka.http.EmbeddedAppServer$class.onLoad(EmbeddedAppServer.scala:
43)
at akka.kernel.Kernel$$anon$1.akka$actor$BootableActorLoaderService$
$super$onLoad(Kernel.scala:31)
at akka.actor.BootableActorLoaderService
$class.onLoad(BootableActorLoaderService.scala:49)
at akka.kernel.Kernel$$anon$1.akka$remote$BootableRemoteActorService$
$super$onLoad(Kernel.scala:31)
at akka.remote.BootableRemoteActorService
$class.onLoad(BootableRemoteActorService.scala:28)
at akka.kernel.Kernel$$anon$1.akka$camel$CamelService$$super
$onLoad(Kernel.scala:31)
at akka.camel.CamelService$class.onLoad(CamelService.scala:39)
at akka.kernel.Kernel$$anon$1.onLoad(Kernel.scala:31)
at akka.util.AkkaLoader$$anonfun$boot$1.apply$mcV$sp(AkkaLoader.scala:
27)
at akka.util.Switch.liftedTree1$1(LockUtil.scala:126)
at akka.util.Switch.transcend(LockUtil.scala:125)
at akka.util.Switch.switchOn(LockUtil.scala:138)
at akka.util.AkkaLoader.boot(AkkaLoader.scala:24)
at akka.kernel.Kernel$.boot(Kernel.scala:31)
at akka.kernel.Main$.main(Kernel.scala:19)
at akka.kernel.Main.main(Kernel.scala)

√iktor Ҡlang

unread,
Jan 23, 2012, 7:33:18 AM1/23/12
to akka...@googlegroups.com
Hi Eric,

have you've tried to remove the 1.5.8 version?

Cheers,



--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.




--
Viktor Klang

Akka Tech Lead
Typesafe - The software stack for applications that scale

Twitter: @viktorklang

smitty

unread,
Jan 23, 2012, 7:58:43 PM1/23/12
to Akka User List
Yes, I was able to get past this error by moving the slf4j-
log4j12-1.5.8.jar out
of the lib/akka directory. I have a new slf4j error, but at least
akka
starts successfully!

The output is now:

Starting Akka...
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for
further details.
Akka started successfully

Thanks for your help!
> Typesafe <http://www.typesafe.com/> - The software stack for applications
> that scale
>
> Twitter: @viktorklang

√iktor Ҡlang

unread,
Jan 24, 2012, 1:11:47 AM1/24/12
to akka...@googlegroups.com

What slf4j implementation are you using?

/V

ngocdaothanh

unread,
Jan 23, 2012, 8:52:47 PM1/23/12
to Akka User List
The boot script has this line:
AKKA_CLASSPATH="$AKKA_HOME/lib/scala-library.jar:$AKKA_HOME/lib/akka/*:
$AKKA_HOME/config"

Try prepending slf4j-api-1.6.0.jar to the path, like this:
AKKA_CLASSPATH="$AKKA_HOME/lib/slf4j-api-1.6.0.jar:$AKKA_HOME/lib/
scala-library.jar:$AKKA_HOME/lib/akka/*:$AKKA_HOME/config"

I had similar error with Xitrum before:
https://github.com/ngocdaothanh/xitrum-quickstart/blob/master/bin/runner.sh

Ngoc

smitty

unread,
Jan 24, 2012, 7:22:07 PM1/24/12
to Akka User List
Actually, I fixed it by placing the slf4j-api-1.5.8.jar at the front
of $AKKA_CLASSPATH.
Seems so clear and obvious now after all that!

Glad to have the microkernel starting up smoothly now and many thanks
to both of you, Viktor and Ngoc for your help!!


On Jan 23, 7:52 pm, ngocdaothanh <ngocdaoth...@gmail.com> wrote:
> The boot script has this line:
> AKKA_CLASSPATH="$AKKA_HOME/lib/scala-library.jar:$AKKA_HOME/lib/akka/*:
> $AKKA_HOME/config"
>
> Try prepending slf4j-api-1.6.0.jar to the path, like this:
> AKKA_CLASSPATH="$AKKA_HOME/lib/slf4j-api-1.6.0.jar:$AKKA_HOME/lib/
> scala-library.jar:$AKKA_HOME/lib/akka/*:$AKKA_HOME/config"
>
> I had similar error with Xitrum before:https://github.com/ngocdaothanh/xitrum-quickstart/blob/master/bin/run...
Reply all
Reply to author
Forward
0 new messages