scala - Could not execute this Akka actor based test code -


I am new to Scala Akka actor. Based on the example Aka tutorial on your website, I have coded similar examples, since the time they print messages with the start time. But the code is not executed in my Eclipse IDE Import Import. Actor Import Acne Actors Actor Imports Slaya. Selection. ListBuffer Import Acne Actors Form Import Acne Routing Round robin router import acne Actors Actor System Object Oka Oz App (Processes) has been discontinued PiMessage Case Class Work (Value: String) Expands PiMessage Case Class Print Comp (Value: String) PiMessage Expands the Case Object PiMessage Case Class ListObj ( Cont: Seq [String] Expands PiMessage Class Worker Expands Actor {DRF (Received) = {Case Task (Value: String) = & gt; println (value) sender! Print Comp (value)}} Class Master (Audience: Actoraf) enhances the actor {val nrOfWorkers = 10 var counter = 0 var lis = ListBuffer [string] () val worker rotor = reference. The factor (props [worker]] WithRouter (roundrobinator (NROoffWorker), name = "worker rotor") get def () = {// handle handle message start => Worker Rotor! Work ("Start Now" + System.currentTimeMillis ()) case printComp (value: string) => {Counter + = 1 lis.append (Counter + "Value") if (Counter> = 10) Listener! ListObj (lis.toSeq) // closes this actor and all his supervised children context.stop (self)}}} reaches the class listener {DRF receive () = {case catalog obje (cont: SEQ [string ]) = & gt; Println ("full" + cont) context.system.shutdown ()}} def process () {// Create a Akaka System Well System = ActorSystem ("PiSystem") // Create Result Listener, which will print and close the results Do System Values ​​Listener = System. ActorOf (Props [listener], name = "listener") // master val master = make system. Okar (props (new master (listener), name = "master") // Calculate Master Master! Issue}}

PROBLEM: I got an error message: "Error: main section aka obz could not be found or loaded" also does not compile is. When I run the project, I get that message.

Actually, I'm just successful in running my code after the dependency is resolved then the problem is your environment In the configuration I use Intell Idea IDE

Try it

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -