--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
Akka by default uses the Thread.currentThread.getContextClassloader (if any) if you don't specify your own.This is well-documented IMHO: http://doc.akka.io/docs/akka/2.0.1/general/configuration.html#A_Word_About_ClassLoaders
Cheers,- Bruce
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
I have heard that google is a badass search engine!site:http://doc.akka.io/docs/akka/2.0.1/ classloader
BTW, this is also broken in intellij console, so i ended up passing classloader expicitlyi.e.val classLoader = getClass.getClassLoader
val system = ActorSystem("MySystem", ConfigFactory.load(classLoader), classLoader)
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/gj46nWDxlMoJ.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
Roland Kuhn
Typesafe – The software stack for applications that scale.
twitter: @rolandkuhn
Thanks Alex,
Something seems fishy with sbt's context loader.
Should we introduce a config option to look aside or let sbt fix it?
Cheers,
V
Dear Viktor,
I understand your desire to mock people who can't use Google (I mock
them myself every day), but here's how the sequence of events looks:
1) I have a small, but working project (twitdo.com) written with Akka
1.2. I use it as my testbed for Scala development mostly. When Akka
2.0 has been released, I have been thoroughly impressed with
dataflows, automatic supervision and other cool features, so I wanted
to migrate my code to 2.0.
2) After the migration has been completed, sbt-web-plugin have failed
to restart the container, giving me nothing except ("Failed to start
the web application") message. This is not the problem of Akka, of
course, but rest assured — I will stalk the poor guy who develops sbt-
web-plugin until the logging problem will be fixed.
3) I tried to reproduce the problem in the console, and discovered the
"No configuration setting found for key 'akka.version'" error message.
OK, _now_ I got something to google, which I did.
4) I discovered the thread about sbt-assembly problems with
reference.conf merging. I knew that sbt-web-plugin first assembles
the .war, then tries to launch it with Jetty (it used to, now it works
differently), so I suspected this might be the same problem, which I
told you. You promptly responded by fixing sbt-assembly plugin, but it
didn't help.
5) I tried just to create a few actors in Scala console and see if
that will work. It didn't, but now I was sure that the problem happens
directly in Akka, not via some interference from my application code.
6) I checked the stack trace, went to Akka source, and only there I
have found out about the classloading code. So, only at this stage I
could google Akka documentation for 'classloader', and could test some
more hypotheses about why reading resources doesn't work properly in
Scala console and in Jetty 8.
OK, Akka is new, it's hard to make it work with sbt-web-plugin and
jetty-8, maybe there are not that many Akka users to check all
combinations and report them. But I expected things to be working at
least in Scala REPL. Everyone uses the REPL.
And this is not like "oh, you should just google 'classloader' in Akka
docs", right?
I just started the Scala REPL, it happens even outside SBT.
I thought whether there might be the way to detect that we are in the
REPL and just use ActorSystem.getClass.getClassLoader in that case?
> Do you mean that Akka does not work in REPL? Because I use that all theViktor, have you read my first message? :)
> time.
> If so, please post a sample project (minimized) that has the problem and
> we'll fix it.
I just started the REPL with the following command line:
$ scala -classpath akka-actor-2.0.1.jar
Then, I did this:
It doesn't work. Neither with Scala 2.9.2, nor 2.9.1. It gives me the
scala> val system1 = ActorSystem("first")
"com.typesafe.config.ConfigException$Missing: No configuration setting
found for key 'akka.version'".
Does it work for you?
Cheers,
Alexander Temerev.
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
-jason
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
To quote the famous and now googlable Akka documentation:
"...putting Akka on the boot class path will yield
NullPointerException from strange places: this is simply not
supported."
:)
I've got the exact same behaviour here.
Akka 2.0.2
Scala 2.9.1
Problem occurs in Intellij and Scala REPL.
This is my first day of AKKA.
I'd like to use 2.0.2 as I don't want to go through the pain of upgrading to Scala 2.1.0 if it can be avoided.
Is it possible or do I need to play the yak shaving/upgrade game?
Best Regards,
Bryan Hunt
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/Ut2rApJKdEQJ.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
Yes, have tried that trick, and I can load and actor context in the REPL.
Is there an equivalent trick I can perform when running the fsm-sample within Intellij?
Cheers,
Bryan
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/AGBa-h_Uro4J.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
Is there an equivalent trick I can perform when running the fsm-sample within Intellij?I have no idea, that's probably best answered by the IDEA folks.
Hi Viktor,
I don't want to appear flippant - but what environment does one typically need in order to run the Akka sample projects?
Getting the Akka equivalent of HelloWorld to boot would be a huge boost to my confidence and self esteem.
Right now I know they neither run in ScalaIDE (file-names don't match classes) or Intellij.
It sounds like some pretty fragile classloading, considering it's just trying to load a boot properties file.
Creates a new ActorSystem with the name "default", the specified Config, and specified ClassLoader
What's wrong with just loading from the classpath, or providing an option to override - à la log4j?
Asking the Intellij 'folks', why an Akka application won't run, is much like asking the Eclipse guys why a Jetty application won't boot.
Haven't had this sort of problem, since my J2EE days - while I'm at it, should I go looking for the glass hammer?
Cheers,
Bryan Hunt
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/_IQyHKdX2NEJ.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
Hi Viktor,
I already downloaded the docs and paid for them to be printed - last week.
So I've been reading through them the last 5 days or so, familiarizing myself with the system.
Now it's time to fire up a couple of Hello World type apps, so that's where I'm at.
Thanks for the Scala REPL tip, it works!
It seems from what you are saying it is not possible to run Akka in an IDE, only in SBT.
To my mind it seems a bit of a shame.
It's a big API to learn by rote, and my social life isn't exactly stellar to start with.
Bryan
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/TsPPgL1bs7gJ.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
Creates a new ActorSystem with the name "default", the specified Config, and specified ClassLoader
Creates a new ActorSystem with the name "default", and the specified Config, then obtains the current ClassLoader by first inspecting the current threads' getContextClassLoader, then tries to walk the stack to find the callers class loader, then falls back to the ClassLoader associated with the ActorSystem class.
Regards,
Bryan Hunt
>
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/g2z8tU4AVgUJ.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.