Nightmare with JARS: Akka cutting edge release and scala distribution

231 views
Skip to first unread message

G J

unread,
Mar 9, 2013, 10:54:35 AM3/9/13
to akka...@googlegroups.com
I decide to upgrade to scala 2.10 and the latest akka 2.1.1, and got the message:

Akka JAR version [2.1.0] does not match the provided config version [2.1.1]

  1. My akka application.conf specifies version = "2.1.1"
  2. My -classpath uses akka 2.1.1 through akka-actor_2.10-2.1.1.jar
  3. I invoke using scala -classpath <.:.> where the colon separated list has no pointer to akka 2.1.0
  4. System.properties revealed some funny things:
    • "java.class.path" is empty
    • "sun.boot.class.path" contains "/addon/scala-2.10.0/lib/akka-actors.jar"
    • The manifest file indicates that the above is akka 2.1.0

So that's where the 2.1.0 must be coming from.

Of course I could delete the akka-actor.jar from the scala 2.10.0 distribution, but that's a drag.

What's the right way to continually keep upgrading to the latest scala and akka releases?

Thanks.

Best Regards.

Evan chan

unread,
Mar 9, 2013, 11:44:19 AM3/9/13
to akka...@googlegroups.com, akka...@googlegroups.com
Could you just package akka and your app in a fat jar and use java to start everything?

-Evan
Carry your candle, run to the darkness
Seek out the helpless, deceived and poor
Hold out your candle for all to see it
Take your candle, and go light your world
 

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>>>>>>>> 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

√iktor Ҡlang

unread,
Mar 9, 2013, 12:23:57 PM3/9/13
to Akka User List
Scala 2.10 distribution has akka-actor_2.10-2.1.0.jar in it. You seem to have that on your classpath.

Cheers,

G J

unread,
Mar 9, 2013, 1:09:24 PM3/9/13
to akka...@googlegroups.com
I often run akka-based applications from the REPL, so the scala related JARs gets shoved in there.

Taking out akka from the scala distribution of course solves the problem. Maybe there's a better way, but...

If I may, I believe it is a mistake to bundle akka, swing, typesafe-config with the scala distribution. Scala is a programming language and a compiler, and the distribution should reflect just that. The old Bell Labs vs MIT argument. 

Best Regards.

Akka Team

unread,
Mar 10, 2013, 5:01:12 PM3/10/13
to akka...@googlegroups.com
Hi G J,

the purpose of the distribution is to offer complete set of libraries,
which includes actors (actually two right now where one is deprecated
and will be removed). I’d argue that the actor model is sufficiently
general to warrant supporting it on a “language distribution” level;
one example which is clearly over the line would be to bundle a web
framework as well.

Using the distribution means using those exact versions which were
packaged; for everything else you’d need a package manager, which
incidentally is what I almost always use. When I need a REPL I usually
type “console” at an SBT prompt, similar facilities exist in Maven and
quite possibly other tools.

Regards,

Roland
> --
>>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>>>>>>>>> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



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

G J

unread,
Mar 11, 2013, 9:20:35 AM3/11/13
to akka...@googlegroups.com
Roland, thanks for that explanation.

Using the console option of sbt seems like the right thing. I start up some production applications using the REPL, as I can selectively turn on flags and logging.


I must respectfully defer on the generality of the actor model being included in the scala distribution. GUIs are a perfect example. Today it is Swing. Tomorrow it is JavaFX. Five years from now it will be something else.

Putting an actor model - specifically Akka (that requires no special compiler support) is in the same camp. It frustrates the migration to a different actor interface - perhaps even from Typesafe itself; unless, you are prepared to argue that the Akka interface is at the same level of maturity as the collection library...

Having said that, I'm happy for Akka to be in the scala distribution.

Best Regards.

G J

unread,
Mar 11, 2013, 9:56:43 AM3/11/13
to akka...@googlegroups.com
yikes!  defer => differ.
Sorry.
Reply all
Reply to author
Forward
0 new messages