I'm using Scala to write an extension using v2.9.1.
I then tried to use Akka v1.2 Actors - akka.io - to manage various aspects of the extension, copying the jar into the extensions/__lib__/ folder. Coding and local testing went great but testing in SFS v2.0.0-RC3 yielded:
21 Nov 2011 21:21:51,456 WARN [com.smartfoxserver.v2.controllers.ExtensionController-1] v2.cont
rollers.ExtensionController -
java.lang.NoClassDefFoundError: scala/Serializable
I copied the scala-library.jar that came with the Akka distribution into the same __lib__ directory which caused the server to crash outright when handling a request. Upon looking into the /lib directory I see that there's already a scala-library.jar in there. After searching around here I see that you're already using Scala for some aspects of SFS. Would it be possible for you to move to v2.9.1 or can I copy the appropriate jar in? Or is the answer to include scala-lang.jar in my extension's jar?
Thanks for your assistance.
Using Scala?
One of the main problems with Scala is that it is super sensitive to version changes. It's known that as soon as you change version very easily other libraries will break With Akka it's a know problem, for instance.
If you add your own scala-lib.jar you will create a conflict with the already existing scala-lib that SFS2X uses (I believe it is 2.8.0)
This is not clear to me... what version of SFS2X was used for local testing?
If you add your own scala-lib.jar you will create a conflict with the already existing scala-lib that SFS2X uses (I believe it is 2.8.0)
Coding and local testing went great but testing in SFS v2.0.0-RC3 yielded:
This is not clear to me... what version of SFS2X was used for local testing?
Lapo wrote:This is not clear to me... what version of SFS2X was used for local testing?
Poor wording on my part. I was testing locally via unit tests and it worked well. The only testing done with SFS was on the server.
So... any interest in updating your Scala usage to v2.9.1? If not, how extensively are you using it in SFS? Perhaps I can try just replacing the version in lib with that from v2.9.1.
Yes, we'll eventually update to 2.9.x but it's not a priority right now, especially if it breaks the code again. I say "again"... because we initially worked on some Scala code with version 2.7.5, then moved to 2.8.x and the code had to be refactored.
The only thing I can suggest is recompiling Akka for 2.8 or finding a pre-compiled version for 2.8
The only thing I can suggest is recompiling Akka for 2.8 or finding a pre-compiled version for 2.8
Lapo wrote:I say "again"... because we initially worked on some Scala code with version 2.7.5, then moved to 2.8.x and the code had to be refactored.
I can certainly sympathize as Scala version transitions are often tough tasks. While I agree the v2.8.x transition was particularly painful the v2.9.x transition should be far less so. I was pleasantly surprised by the minimal amount of effort required.
Lapo wrote:The only thing I can suggest is recompiling Akka for 2.8 or finding a pre-compiled version for 2.8
Yeah, I was worried that was the primary option. Unfortunately, it's not likely to be possible. For now I'll revert to native Actors and the like and eagerly await your transition to v2.9.1.
Thanks for your help.
Lapo wrote:It seems that Akka will be part of the Scala lib sooner or later, is there a timeline for that? Or am I wrong?
I believe only the Akka Actor implementation is to be part of an upcoming Scala release. I presume that's part of the reason they're available outside of the core Akka distribution with no Akka dependencies.
I might be odd, but I'd like to make the counter request that you don't change scala major versions mid-stream. We're running 2.8.1 here now, as is a vast majority of the scala ecosystem that's currently in production.
I know 2.9.x is new and all things being equal, I would prefer to use it too, but its barely six months out and not everyone is caught up, sad to say.
I know 2.9.x is new and all things being equal, I would prefer to use it too, but its barely six months out and not everyone is caught up, sad to say.
tchen wrote:I might be odd, but I'd like to make the counter request that you don't change scala major versions mid-stream. We're running 2.8.1 here now, as is a vast majority of the scala ecosystem that's currently in production.
We're actually on the same page. I suggested as a fallback that a v2.8.1 upgrade would still be appreciated. According to [1] v2.8.0 is in the SFS v2 release since RC1 and v2.8.1 contains a multitude of fixes.
While v2.9.x would be ideal v2.8.1 would be wonderful all the same.
Lapo?
[1] viewtopic.php?t=9117
Did you try to simply replace the SFS2X/lib/scala-lib.jar file with the one provided in the Scala 2.9.1 distribution?
I did a quick test under a clean installation of SFS2X RC3 (under WinXP) and the server booted correctly.
If you haven't tried I'd suggest to do so, you should then be able to deploy your code.
I did a quick test under a clean installation of SFS2X RC3 (under WinXP) and the server booted correctly.
If you haven't tried I'd suggest to do so, you should then be able to deploy your code.
Who is online
Users browsing this forum: No registered users and 47 guests