I want to create a cluster of nodes using the sbt console but I can't seem to get my classpath to read my config file which specifies the libraries that are to be used. I reference to
http://doc.akka.io/docs/akka/2.1.2/cluster/cluster-usage-scala.html, I have defined src/main/resources/application.conf as follows:
- akka {
- actor {
- provider = "akka.cluster.ClusterActorRefProvider"
- }
- remote {
- transport = "akka.remote.netty.NettyRemoteTransport"
- log-remote-lifecycle-events = off
- netty {
- hostname = "127.0.0.1"
- port = 0
- }
- }
-
- cluster {
- seed-nodes = [
- "akka://Cluste...@127.0.0.1:2551",
- "akka://Cluste...@127.0.0.1:2552"]
-
- auto-down = on
- }
- }
and I have specified in my .bashrc file the exact location where the JVM should find the libraries as follows:
CLASSPATH=$CLASSPATH:/usr/share/java
export CLASSPATH
- run-main sample.cluster.simple.SimpleClusterApp 2551
but whenevrer i run the cluster using the command
- run-main sample.cluster.simple.SimpleClusterApp 2551
I get the following error:
[error] (run-main) akka.ConfigurationException: ActorSystem [akka://ClusterSystem] needs to have a 'ClusterActorRefProvider' enabled in the configuration, currently uses [akka.actor.LocalActorRefProvider]
akka.ConfigurationException: ActorSystem [akka://ClusterSystem] needs to have a 'ClusterActorRefProvider' enabled in the configuration, currently uses [akka.actor.LocalActorRefProvider]
at akka.cluster.Cluster.<init>(Cluster.scala:66)
at akka.cluster.Cluster$.createExtension(Cluster.scala:41)
at akka.cluster.Cluster$.createExtension(Cluster.scala:36)
at akka.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:657)
at akka.actor.ExtensionId$class.apply(Extension.scala:36)
at akka.cluster.Cluster$.apply(Cluster.scala:36)
at sample.cluster.simple.SimpleClusterApp$.main(clustering.scala:19)
at sample.cluster.simple.SimpleClusterApp.main(clustering.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
[trace] Stack trace suppressed: run last compile:run for the full output.
I don't know if i'm missing something, Please help.:-( Thanks
Lee
------