Reputation: 3819
I am trying the akka tutrials that remotely deploys the pi calculation. I am using the mvn project with eclipse juno. I have been able to install the maven pluggin for eclipse and successfully run the first pi claculation. Now I am trying the second pi tutorials which involves remote deployment of actors. But when I open the tutorials package in the eclipse IDE looks like some of the akka files are not been resolved by the system. I have defined the dependencies in the POM but still eclipse and maven complain. When I run the maven compile goal in the eclipse, the project gets compiled but when i try to run it it gives me error. Below are the sample code snippets.
import akka.actor.UntypedActor;
import akka.actor.ActorRef;
import akka.routing.CyclicIterator;
import akka.routing.InfiniteIterator;
import akka.routing.UntypedLoadBalancer;
eclipse complains that it cannot resolve the above importation
this is the POM.XML file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>Akka.Remote.Cluster</name>
<groupId>Akka-Remote_Cluster</groupId>
<artifactId>Akka.Remote.Cluster</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<url>http://akka.io</url>
<dependencies>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-actor</artifactId>
<version>2.0.3</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-remote</artifactId>
<version>2.0.3</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>typesafe</id>
<name>Typesafe Repository</name>
<url>http://repo.typesafe.com/typesafe/releases/</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
this is the error from eclipse
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
at Akka_Remote_Cluster.Akka.Remote.Cluster.Pi.main(Pi.java:16)
Any suggestion on what the problem is
Upvotes: 3
Views: 1248
Reputation: 28895
I've fixed a similar problem with deleting and redownloading the required Maven artifacts. The first download was somehow broken.
Upvotes: 1
Reputation: 7717
I think you need to manually import config-0.3.1.jar
from the akka distribution (inside libs)
Upvotes: 0