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 8603959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:26:57+00:00 2026-06-12T02:26:57+00:00

I am trying to use Akka future with play framework to connect to a

  • 0

I am trying to use Akka future with play framework to connect to a remote akka system
. After running the system the akka future gives me a warning that one argument is left.

the code are below :

this is the [lay controller code:
p

ackage controllers;

import com.typesafe.config.ConfigFactory;

import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;
import play.*;
import play.mvc.*;

import views.html.*;

public class Application extends Controller {



  public static Result index() throws InterruptedException { 

      System.out.println(" Local Node Called0");


      ActorSystem csystem = ActorSystem.create("Application", ConfigFactory.load().getConfig("LocalNode"));
      ActorRef localNode = csystem.actorOf(new Props(LocalNode.class));

        System.out.println(" Local Node Called1");
        localNode.tell("Hello");
        System.out.println(" Local Node Called2");

        Thread.sleep(5000);
        csystem.shutdown();
        return ok(index.render("I am OK"));
  }           
}

this is the play framework local actor node

package controllers;

import akka.actor.;
import akka.dispatch.Await;
import akka.dispatch.Future;
import akka.event.Logging;
import akka.event.LoggingAdapter;
import akka.util.Duration;
import akka.util.Timeout;
import akka.pattern.
;

public class LocalNode extends UntypedActor {

    LoggingAdapter log = Logging.getLogger(getContext().system(), this);
    Timeout timeout = new Timeout(Duration.parse("20 seconds"));

    ActorRef masterActor;

    public void preStart()
    {
        /* Get reference to Master Node*/
         masterActor = 

    getContext().actorFor("akka://MasterNode@127.0.0.1:2552/user/masterActor");
    }

    @Override
    public void onReceive(Object message) throws Exception {
        System.out.println(" Future called  ");

         Future<Object> future = Patterns.ask(masterActor , message.toString(), timeout);

            String result = (String) Await.result(future, timeout.duration());

            log.info("Messagefrom Server", result.toString());  
    }
   }

this is the remote akka system master nide

package Rubine_Cluster;

import com.typesafe.config.ConfigFactory;

import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;
import akka.actor.UntypedActor;
import akka.kernel.Bootable;

/**
 * Hello world!
 *
 */
public class MasterNode implements Bootable
{
     final ActorSystem system;

      public MasterNode() {
        system = ActorSystem.create("MasterNode", ConfigFactory.load()
            .getConfig("masterNode"));
        ActorRef masterActor = system.actorOf(new Props(MasterActor.class),"masterActor");
        System.out.println(" Master Node is called ");
      }

      public void startup() {

      }

          public void shutdown() {
            system.shutdown();
          }
}  

this is the akka remote system MasterActor

package Rubine_Cluster;

import akka.actor.*;


public class MasterActor extends UntypedActor {

    @Override
    public void onReceive(Object message) throws Exception {


         if (message instanceof String) {
                // Get reference to the message sender and reply back
                getSender().tell(message + " got something");       
    }
  }  
}

this is the message from the play framewrok

[INFO] [09/30/2012 16:47:25.669] [Application-akka.actor.default-dispatcher-1] [
akka://Application/user/$a] Messagefrom Server WARNING arguments left: 1

help is needed cos I am suppose to meet the assignment deadline

thanks to all

  • 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-12T02:26:58+00:00Added an answer on June 12, 2026 at 2:26 am

    Try to give a name to your actor in Play:

    ActorRef localNode = csystem.actorOf(new Props(LocalNode.class), "localNode");
    

    And also note that if you need to access the Akka system from Play, it is better to use:

    ActorSystem csystem = Akka.system();
    

    instead of:

    ActorSystem csystem = ActorSystem.create("Application", ConfigFactory.load().getConfig("LocalNode"));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying use mod_rewrite to rewrite URLs from the following: http://www.site.com/one-two-file.php to http://www.site.com/one/two/file.php The
I'm trying use Lift and CalendarMonthView widget to build a appointment system. CalendarMonthView works
I am trying use MySql and Entity Framework, using Connector/Net 6.1 with this as
I'm trying use eco for client-side templating. I have multiple .eco templates that I'd
I am trying use a from a multi-dimensional array that I create in another
I have a regex that I'm trying use to validate against strings. Trying to
I have a 3rd party DLL that I am trying to use in a
I am fairly new Akka world and was trying to use akka-spring integration. I
I am trying use the jQuery table sorter plugin for a table that is
I am trying use the mysql connector in c++ in ubuntu. It appears that

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.