does classpath order matter when running akka application

255 views
Skip to first unread message

Mohnish Kodnani

unread,
Jul 31, 2014, 10:18:08 PM7/31/14
to akka...@googlegroups.com
Hi,
I am using gradle to build an akka application.
All the dependencies are in the lib folder. There is a startup script which lies in the bin folder.
I am using akka-clustering which internally depends on akka-remote which depends on netty.
When I run the application I get the following error.
java.lang.NoSuchMethodError: org.jboss.netty.channel.socket.nio.NioWorkerPool.<init>(Ljava/util/concurrent/Executor;I)V
        at akka.remote.transport.netty.NettyTransport.<init>(NettyTransport.scala:283)
        at akka.remote.transport.netty.NettyTransport.<init>(NettyTransport.scala:240)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at akka.actor.ReflectiveDynamicAccess$$anonfun$createInstanceFor$2.apply(DynamicAccess.scala:78)
        at scala.util.Try$.apply(Try.scala:161)
        at akka.actor.ReflectiveDynamicAccess.createInstanceFor(DynamicAccess.scala:73)


Now, when I put netty-3.8.0.Final.jar before the akka-remote jar in the classpath this error goes away.

Does the ordering of jars matter in the classpath  ?

akka-actor version 2.3.2, akka-cluster : 2.3.3

-Mohnish

Martynas Mickevičius

unread,
Aug 1, 2014, 3:40:53 AM8/1/14
to akka...@googlegroups.com
Hi Mohnish,

can you try running latest akka 2.3.4 and have all akka artifacts of the same version?


--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.



--
Martynas Mickevičius
TypesafeReactive Apps on the JVM
Reply all
Reply to author
Forward
0 new messages