AbstractMethodError on TypedActor
I am getting an AbstractMethodError on typedactors when interfaces inherit methods. Hopefully this snippet clarifies it:
FullTrait has methods "method1", "method2" and "method3". The implementation has all 3 methods.
However method1 gives "AbstractMethodError".
I believe AspectWerkz is not weaving in the aspect for the inherited methods of the interface.
Either Akka needs to be changed and pass the main interface and all its base interfaces to aspectwerkz, or aspectwerkz needs to be fixed to look at the base interfaces.
package com.ubuild
import akka.actor.TypedActor;
trait BaseTrait {
def method1(); // this one is not redefined in FullTrait
def method2(); // this one is redefined in FullTrait
}
trait FullTrait extends BaseTrait {
def method2();
def method3();
}
class MyTypedActor extends TypedActor with FullTrait {
override def method1() = println("hello from method1");
override def method2() = println("hello from method2");
override def method3() = println("hello from method3");
}
object Main2 {
def main(args: Array[String]) {
val actor = TypedActor.newInstance(classOf[FullTrait], classOf[MyTypedActor], 1000L);
actor.method1(); // this gives AbstractMethodException
actor.method2(); // this works fine
actor.method3(); // this works fine
TypedActor.stop(actor);
}
}
FullTrait has methods "method1", "method2" and "method3". The implementation has all 3 methods.
However method1 gives "AbstractMethodError".
I believe AspectWerkz is not weaving in the aspect for the inherited methods of the interface.
Either Akka needs to be changed and pass the main interface and all its base interfaces to aspectwerkz, or aspectwerkz needs to be fixed to look at the base interfaces.
Leave a comment
on 2011-04-30 11:50 *
By viktorklang
TypedActor will be rewritten for 2.0
on 2011-05-20 07:21 *
By viktorklang
Assigned to set to viktorklang
Status changed from New to Fixed
Fixed in the new TypedActor impl in master.
Updating tickets (#818, #821, #823, #836, #842, #854, #856, #865, #866, #867, #868, #869, #871, #872, #873, #877, #878, #879, #885, #888, #889, #890, #894, #910, #911, #917, #923, #924, #925, #926, #927, #928, #930, #931, #932, #933, #934, #936, #937, #952, #955, #957, #958, #959, #960, #961, #964, #965, #966)