- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
AbstractMethodError instantiating an Actor after adding scala.continuations plugin
Wed, 2009-02-18, 00:13
hi,
after adding the scala.continuations compiler-plugin to my scala
project in eclipse, i get a strange runtime error, everytime i try to
create an actor:
java.lang.AbstractMethodError: de.sciss.tint.sc.Scheduler.scala$actors
$Actor$$onTimeout_$eq(Lscala/Option;)V
at scala.actors.Actor$class.$init$(Actor.scala:704)
at de.sciss.tint.sc.Scheduler.(Routine.scala:21)
at de.sciss.tint.eclipse.views.TestView.createPartControl
(TestView.scala:43)
at org.eclipse.ui.internal.ViewReference.createPartHelper
(ViewReference.java:371)
[...]
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
where the Scheduler is just
class Scheduler extends Actor {
var verbose = false
private val queue = new PriorityQueue[Scheduled]
def act { println( "ACT!" )}
}
i'm really loosing my nerves with this combinations of halfbaked
projects (eclipse plugin, continuations compiler plugin, who knows
what else). is scala really in a state ready for production? or do
you need to be a six years+ expert to write even small sized
applications. i don't get it, i'm spending 98% of my time with scala
with configuration and compiler problems.
any hint as to fix the above problem is highly welcome. the problem
is even there when i remove the compiler plug-ins and rebuild...
thanks a lot for help!
ciao, -sciss-
Wed, 2009-02-18, 00:37
#2
Re: AbstractMethodError instantiating an Actor after adding sca
Am 18.02.2009 um 00:20 schrieb Sciss:
> it's unbelievable... i now have this code in view:
>
> def createPartControl( parent: Composite ) : Unit = {
>
> actor {
> println( "1111" )
> }
>
> val test = new Actor {
> def act() = {
> println( "2222" )
> }
> }
>
> println( "3333" )
>
> }
>
> the "1111" prints, no problems, so "actor" works. But the "new
> Actor" fails with the same exception
>
> java.lang.AbstractMethodError: de.sciss.tint.sc.Scheduler.scala
> $actors$Actor$$onTimeout_$eq(Lscala/Option;)V
> at scala.actors.Actor$class.$init$(Actor.scala:704)
(i mean of course)
java.lang.AbstractMethodError
at scala.actors.Actor$class.$init$(Actor.scala:704)
at de.sciss.tint.eclipse.views.TestView$$anon$1.
(TestView.scala:49)
at de.sciss.tint.eclipse.views.TestView.createPartControl
(TestView.scala:49)
Wed, 2009-02-18, 00:47
#3
Re: AbstractMethodError instantiating an Actor after adding sca
Sciss wrote:
> java.lang.AbstractMethodError
> at scala.actors.Actor$class.$init$(Actor.scala:704)
> at
> de.sciss.tint.eclipse.views.TestView$$anon$1.(TestView.scala:49)
> at
> de.sciss.tint.eclipse.views.TestView.createPartControl(TestView.scala:49)
In my experience, AbsractMethodError *always* indicates that component A
was compiled against B1, but is now running with B2 (i.e. a different
version) in its classpath. What happens when you do a "clean"? Does it
build OK from the command line?
Also, I wouldn't expect the Eclipse plugin to be perfectly happy with
compiler plugins.
Also, the compiler plugin you're using is bleeding-edge and unreleased. :)
-0xe1a
Wed, 2009-02-18, 00:57
#4
Re: AbstractMethodError instantiating an Actor after adding sca
yes!! in fact i had a little older scala-library.jar in my
classpath. i exchanged it for 2.7.3 final which is the one i use in
the eclipse-plugin.
i wonder how you can build eclipse plug-ins that you can run as
eclipse applications without having to add scala-library.jar again to
the projects libraries. can't the scala plug-in just include the
proper jars?
thanks a lot, so that problem is gone....
ciao, -sciss-
Am 18.02.2009 um 00:25 schrieb Alex Cruise:
> Sciss wrote:
>> java.lang.AbstractMethodError
>> at scala.actors.Actor$class.$init$(Actor.scala:704)
>> at de.sciss.tint.eclipse.views.TestView$$anon$1.
>> (TestView.scala:49)
>> at de.sciss.tint.eclipse.views.TestView.createPartControl
>> (TestView.scala:49)
> In my experience, AbsractMethodError *always* indicates that
> component A was compiled against B1, but is now running with B2
> (i.e. a different version) in its classpath. What happens when you
> do a "clean"? Does it build OK from the command line?
> Also, I wouldn't expect the Eclipse plugin to be perfectly happy
> with compiler plugins.
>
> Also, the compiler plugin you're using is bleeding-edge and
> unreleased. :)
>
> -0xe1a
>









it's unbelievable... i now have this code in view:
def createPartControl( parent: Composite ) : Unit = {
actor {
println( "1111" )
}
val test = new Actor {
def act() = {
println( "2222" )
}
}
println( "3333" )
}
the "1111" prints, no problems, so "actor" works. But the "new Actor"
fails with the same exception
java.lang.AbstractMethodError: de.sciss.tint.sc.Scheduler.scala$actors
$Actor$$onTimeout_$eq(Lscala/Option;)V
at scala.actors.Actor$class.$init$(Actor.scala:704)
and "3333" is not reached. now tell me the difference between the two
actions of creating actors....
maybe it's something very stupid?? i don't know...
thanks, -sciss-
Am 18.02.2009 um 00:12 schrieb Sciss:
> hi,
>
> after adding the scala.continuations compiler-plugin to my scala
> project in eclipse, i get a strange runtime error, everytime i try
> to create an actor:
>
> java.lang.AbstractMethodError: de.sciss.tint.sc.Scheduler.scala
> $actors$Actor$$onTimeout_$eq(Lscala/Option;)V
> at scala.actors.Actor$class.$init$(Actor.scala:704)
> at de.sciss.tint.sc.Scheduler.(Routine.scala:21)
> at de.sciss.tint.eclipse.views.TestView.createPartControl
> (TestView.scala:43)
> at org.eclipse.ui.internal.ViewReference.createPartHelper
> (ViewReference.java:371)
> [...]
> at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
>
> where the Scheduler is just
>
> class Scheduler extends Actor {
> var verbose = false
>
> private val queue = new PriorityQueue[Scheduled]
>
> def act { println( "ACT!" )}
> }
>
>
> i'm really loosing my nerves with this combinations of halfbaked
> projects (eclipse plugin, continuations compiler plugin, who knows
> what else). is scala really in a state ready for production? or do
> you need to be a six years+ expert to write even small sized
> applications. i don't get it, i'm spending 98% of my time with
> scala with configuration and compiler problems.
>
> any hint as to fix the above problem is highly welcome. the problem
> is even there when i remove the compiler plug-ins and rebuild...
>
>
> thanks a lot for help!
>
> ciao, -sciss-
>