0
votes

I have started working with Actors, and was following a simple example as mention in the Getting Started Guide.

Specs: Scala Version: 2.9.2

Akka Version: 2.0

I ran the example and it ran well. Then I changed by sbt build script to:

name := "PracAkka"

scalaVersion := "2.9.2"

resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"

libraryDependencies += "com.typesafe.akka" % "akka-actor_2.10" % "2.1.2"

i.e. I started using Akka 2.1.2. There were small changes and as per the migration guide, I made the respective changes. But still I am getting the below error:

class file needed by Props is missing. reference type ClassTag of package reflect refers to nonexisting symbol.

What do I need to change?

2

2 Answers

1
votes

The documentation is quite clear I'd say: http://doc.akka.io/docs/akka/2.1.2/project/migration-guide-2.0.x-2.1.x.html

(I.e. Akka 2.1.x is for Scala 2.10)

1
votes

From the sbt documentation

If you use groupID %% artifactID % revision rather than groupID % artifactID % revision (the difference is the double %% after the groupID), sbt will add your project's Scala version to the artifact name. This is just a shortcut. You could write this without the %%:

libraryDependencies += "org.scala-tools" % "scala-stm_2.9.1" % "0.3"

Assuming the scalaVersion for your build is 2.9.1, the following is identical:

libraryDependencies += "org.scala-tools" %% "scala-stm" % "0.3"

The idea is that many dependencies are compiled for multiple Scala versions, and you'd like to get the one that matches your project.

Your script seems to be getting Akka for scala 2.10 in "akka-actor_2.10" try renaming to your scala version.