Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8311219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:44:19+00:00 2026-06-08T19:44:19+00:00

My environment is eclipse, play, akka, and scala. I am getting an error when

  • 0

My environment is eclipse, play, akka, and scala. I am getting an error when trying to create a remote master akka actor.

I am not sure why I am getting this error:

[InvalidActorNameException: actor name hello is not unique!]

When the user submits their form, calculate is called:

options => {
     this.calculate(options.numWorkers.toInt, options.numElements.toInt,          options.numMessages.toInt) 
     //Redirect(routes.Application.)
     Ok(html.form(this.optionsForm))
}

Here is the code where I create the actor

val master = RemoteSystem.system.actorOf(Props[Master], "hello")

I also only create one instance of this actor and have tried many other names such as master, Master, and master1983274612987346198356.

Master is defined as:

class Master extends Actor {

    var pi: Double = _
    var nrOfResults: Int = _
    var start: Long = _

    def receive = {
        case calculate(numWorkers, numElements, numMessages) =>{
            for (i <- 0 until numWorkers) {
                val worker = RemoteSystem.system.actorOf(Props[Worker], "Worker")
                for(j <- 0 until numMessages) 
                {
                    worker ! Work(0, numElements)      
                }
            }
        }
        case PiResult(start, numTerms, acc) => println("Pi Result: " + acc)
    }

    override def preStart() {
        start = System.currentTimeMillis
    }

    override def postStop() {
        println(
"\n\tCalculation time: \t%s millis".format(System.currentTimeMillis - start))
    }
}

And the actor system is:

object RemoteSystem {
    val system = ActorSystem(
"RemoteCreation", ConfigFactory.load.getConfig("remotecreation"))
}

Where remotecreation is defined as:

remotecreation{
    include "common"

    akka {
        actor{
            deployment{
                /Worker{
                    remote="akka://Pi@10.0.100.254:2552"
                }
            }
        }
    remote.netty.port = 2554
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T19:44:21+00:00Added an answer on June 8, 2026 at 7:44 pm

    It seems in the following code that you are creating many workers with the same name “Worker”:

    for (i <- 0 until numWorkers) {
          val worker = RemoteSystem.system.actorOf(Props[Worker], "Worker")
          for(j <- 0 until numMessages) 
          {
             worker ! Work(0, numElements)      
          }
    }
    

    You need to move the actor creation code (see this doc):

    class Master extends Actor {
        val worker = RemoteSystem.system.actorOf(Props[Worker], "Worker")
        ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to get my Arduino/Eclipse environment setup. For some reason I
I am trying to build a simple custom editor in the Eclipse environment. To
We will be using eclipse(Helios or Indigo) for multiuser environment for development. For this
I recently installed/updated eclipse environment. When I try to compile the code I'm getting
I am trying to set up a C/C++ development environment on Eclipse (Indigo) running
I'm developing Scala code using Eclipse, often when I run tests I get this
When I create an AVD in the Android Eclipse environment, if I choose under
I was trying to materialize apache Camel project in my eclipse environment. I'm using
I am a Linux n00b trying to setup my development environment in Eclipse. I
Cntrl+B( or clean-> build) will build complete java project under eclipse environment. Is this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.