ClassnotFound exception in IntelliJ: akka.actor.ActorSystem

879 views
Skip to first unread message

S. Zhou

unread,
Jun 19, 2014, 4:16:38 PM6/19/14
to akka...@googlegroups.com
I am new to Akka. We use SBT to compile Scala. After use gen-idea, I import the scala (which use akka) project. However, when I run the project inside Intellij, I got the following exceptions. Not sure how to fix it. BTW, I use akka 2.2.4

Caused by: java.lang.ClassNotFoundException: akka.actor.ActorSystem$
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Akka Team

unread,
Jun 20, 2014, 5:29:30 AM6/20/14
to Akka User List
This means that the IntelliJ project was not properly configured and is missing the akka-actor-2.2.4_2.10.jar artifact. Is the dependency defined in sbt?

-Endre


--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.



--
Akka Team
Typesafe - The software stack for applications that scale
Blog: letitcrash.com
Twitter: @akkateam

S. Zhou

unread,
Jun 20, 2014, 11:38:03 AM6/20/14
to akka...@googlegroups.com
Yes it is defined in sbt. We can run the application in sbt (a wired issue though: we can run the application using "restart" command but not "run" command). We generated the IntelliJ project files using "gen-idea" (in sbt shell). 

Björn Antonsson

unread,
Jun 23, 2014, 11:37:53 AM6/23/14
to akka...@googlegroups.com
Hi,

Have you had any luck with this? If there still is a problem, could you package up a minimal sbt project that fails, so that I could test it?

B/
-- 
Björn Antonsson
Typesafe – Reactive Apps on the JVM
twitter: @bantonsson

S. Zhou

unread,
Jun 25, 2014, 12:26:09 PM6/25/14
to akka...@googlegroups.com
Thanks Bjorn. Actually it is an open source project: https://github.com/ooyala/spark-jobserver
After I sync the source code, I run "gen-idea" in side sbt shell. There are two big issues when I imported the project into Intellij:
1. The issue I reported in this thread (class not found error)
2. IntelliJ seems not recognizing Scala syntax on using Akka actors.

(The code does compile and run if using sbt. It just does not compile or run in Intellij). The same issue happens on my co-workers as well. Is it a known issue?
Reply all
Reply to author
Forward
0 new messages