I have recently started exploring Scala.
I have installed Eclips and I integrated Akka-Actors Libs in the Build-Path Project.
But whenever I try compiling the project, I got an erorr. I can't resolve such libraries.
import akka.routing.{Routing, CyclicIterator}
import Routing._
Any idea how to configure Akka to work perfectly with Eclips ?
AFAICT, there's no such class in Akka.
Router, yes - Routing, no.
I have the same problem, I have Added the akka-actor_2.10-2.3.0.jar and the config-1.0.2.jar libraries but the error persists.
In the webpage of akka (akka.io) they use both imports in a example proyect.
http://doc.akka.io/docs/akka/1.3/intro/getting-started-first-scala.html
package akka.tutorial.first.scala
import akka.actor.{Actor, PoisonPill}
import Actor._
import akka.routing.{Routing, CyclicIterator}
import Routing._
.....
.....
....
ANSWER: You should use spray and the spray's library, it has a routing method you can use aswell.
import spray.routing._
You have to download the spray-routing-1.2.0.jar if you want to use it (http://repo.spray.io/io/spray/spray-routing/)
Related
I am writing a toy Akka example to get some understanding of the concepts. I am having trouble importing the akka model into my project in intelij.
I am making the below import statement
import akka.actor.Actor
The error messgae reads
cannot resolve the symbol Akka
Is there an additional step to working with akka that I have missed ?
Why does the compiler not recognise the import ?
You have to add Akka dependency to your build.sbt
https://mvnrepository.com/artifact/com.typesafe.akka/akka-actor_2.11/2.5.18
Then you should reimport the dependency, using sbt tool in your ide as mentioned here: https://stackoverflow.com/a/20466144/2201566
I'm new to Jython and to Eclipse. I'm trying to use the JGraphX JAVA library. I've created a new PyDev project and package. I've right-clicked on the project properties in Eclipse, selected "PyDev - PYTHONPATH" and added jgraphx.jar. In the init.py file, I've tried:
import jgraphx as jgx
from jgraphx import *
Neither approach works. The code is underlined as an error in Eclipse. When I run, I get "ImportError: No module named jgraphx". What am I doing wrong?
Thank you,
-david
I'm not familiar with the JGraphX library.
To import a java class
you need to use from my.project.package import someclass
I use the maven to import Hbase source on eclipse.
But there has a error that is "The import org.apache.hadoop.hbase.tmpl cannot be resolved)".
I had find the tmpl package , but its "jamon".
How to find the tmpl package, and its "java"?
Can find the tmpl package on Hbase.bin.tar, and import the extend tmpl.jar
It will work.
I'm trying to import org.apache.commons.codec.binary.Base64.encodeBase64, but Eclipse keeps telling me this import cannot be resolved, even though I've added the apache commons codec jar file to both the lib file of my project and also as an Eclipse plugin. What could be causing this issue?
org.apache.commons.codec.binary.Base64.encodeBase64 is a method. You import Types, like org.apache.commons.codec.binary.Base64.
I was trying to run the SSSP giraph program from Eclipse. But I couldnt get the following packages imported
import org.apache.giraph.graph.BasicVertex;
import org.apache.giraph.graph.BspUtils;
import org.apache.giraph.graph.GiraphJob;
import org.apache.giraph.graph.EdgeListVertex;
import org.apache.giraph.graph.VertexReader;
import org.apache.giraph.graph.VertexWriter;
import org.apache.giraph.lib.TextVertexInputFormat;
import org.apache.giraph.lib.TextVertexInputFormat.TextVertexReader;
import org.apache.giraph.lib.TextVertexOutputFormat;
import org.apache.giraph.lib.TextVertexOutputFormat.TextVertexWriter;
I have followed the instruction in the giraph site to build Giraph and Hadoop.
Which jar should be imported to get the above packages?
Are you running the code for the correct version of Giraph? I think the imports you mention are for versions before 1.0.0, if you include a jar for a newer version it won't find them.