1

I'm new to Scala and Akka and I was just trying to do one of the sample tutorial projects in Eclipse (Luna) with Scala IDE (4.1.0) and JDK8.

  • If I create a simple Hello World Scala app that just does a println for example, it builds and I can right click and run Scala application with no issue.
  • Then I try the Akka equivalent where it creates a greeting and greets someone with Hello and I get this strange compile error:

    Description Resource    Path    Location    Type  
    missing or invalid dependency detected while loading class file 'ActorSystem.class'. Could not access term typesafe in package com, because it (or its dependencies) are missing. Check your build definition for missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.) A full rebuild may help if 'ActorSystem.class' was compiled against an incompatible version of com.    akkatest2       Unknown Scala Problem
    

I have added akka-actor (2.11) jar to the build path under properties as instructed by one of these akka walk throughs I found online and the project already had Scala Library Container included when I first went in because the project was created as a Scala Project in Eclipse.

I'm thinking if I was just missing another akka jar since there were a bunch of other ones, it would complain about some akka.* package. Looks like it's looking for com.typesafe and failing so I'm not sure what else I'm missing.

Peter Neyens
  • 9,770
  • 27
  • 33
Frequentcrasher
  • 271
  • 1
  • 4
  • 8
  • 3
    I'd recommend using a build tool to make these easier on you. SBT is a great commandline tool that, along with the sbteclipse plugin, can make your Scala work in Scala IDE much smoother as far as dependencies go. – turbo_laser Sep 24 '15 at 15:50
  • You can use typesafe [activator](http://www.typesafe.com/community/core-tools/activator-and-sbt) to create the skeleton/working project for your hello world. There are lots of examples with akka. And as @rosshsr suggest, always your sbt to manage dependencies. – Diego Alvarez Sep 25 '15 at 05:25
  • Don't set akka up yourself, this is like setting up string yourself, you need to use maven, sbt or gradle to get all the jars which your project needs. – Derrops Sep 25 '15 at 08:37
  • doesn't the akka actor jar come with scala? I see it in the scala library – Andrew Norman Jan 05 '16 at 23:50
  • Would you guys look at what you're writing? Are developers supposed to just get tools to do their understanding for them? I am having the same problem, and I don't get the impression this is a JAR dependency issue, but perhaps a configuration issue where Scala / Akka is doing something behind the scene we don't understand. – Thomas Adkins Jun 07 '16 at 17:37
  • One critical thing is that the message refers to a package beginning with **com**, the next part being **typesafe**. There are no typesafe packages in the akka distribution; there are only XML files with this package reference. – Thomas Adkins Jun 07 '16 at 18:28

3 Answers3

1

Faced same problem. Add typesafe config jar to the classpath and all akka dependencies. It will work fine.

grd
  • 45
  • 1
  • 6
  • I'm sorry? What is **typesafe config jar**, exactly? I downloaded the akka-master, and there are no jars with the word 'config' in them. Also, many of these are clearly named as examples or tests for akka. Surely, we wouldn't need these, would we? – Thomas Adkins Jun 07 '16 at 17:44
1

Include config-1.2.1.jar(on my system) file in the project. config-1.2.1.jar has com.typesafe.config classes

0

You should include all the jars in Akka Folder. Even some jars may not be needed in your current project , but dependencies make them necessary