kamon-io / sbt-aspectj-runner

sbt plugin for running aspectj weaver
Other
34 stars 16 forks source link

Akka Typed support #25

Open IcyEagle opened 6 years ago

IcyEagle commented 6 years ago

I wonder if it's possible to use the weaver with typed ActorSystem as well as typed actors.

Check for sample project here.

I get NPE in runtime.

java.lang.NullPointerException
at akka.kamon.instrumentation.DispatcherInstrumentation.afterCreateExecutorService(DispatcherInstrumentation.scala:141)
at akka.dispatch.ForkJoinExecutorConfigurator$ForkJoinExecutorServiceFactory.createExecutorService(ForkJoinExecutorConfigurator.scala:72)
at akka.typed.internal.DispatcherConfigurator.<init>(DispatchersImpl.scala:191)
at akka.typed.internal.DispatchersImpl.configuratorFrom(DispatchersImpl.scala:129)
at akka.typed.internal.DispatchersImpl.lookupConfigurator(DispatchersImpl.scala:86)
at akka.typed.internal.DispatchersImpl.lookup(DispatchersImpl.scala:64)
at akka.typed.internal.DispatchersImpl.defaultGlobalDispatcher(DispatchersImpl.scala:46)
at akka.typed.internal.DispatchersImpl.lookup(DispatchersImpl.scala:22)
at akka.typed.internal.ActorSystemImpl.<init>(ActorSystemImpl.scala:189)
at akka.typed.ActorSystem$.apply(ActorSystem.scala:175)
at com.sample.Sample$.delayedEndpoint$com$sample$Sample$1(Main.scala:4)
at com.sample.Sample$delayedInit$body.apply(Main.scala:3)
at scala.Function0.apply$mcV$sp(Function0.scala:34)
at scala.Function0.apply$mcV$sp$(Function0.scala:34)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App.$anonfun$main$1$adapted(App.scala:76)
at scala.collection.immutable.List.foreach(List.scala:389)
at scala.App.main(App.scala:76)
at scala.App.main$(App.scala:74)
at com.sample.Sample$.main(Main.scala:3)
at com.sample.Sample.main(Main.scala)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at kamon.aspectj.sbt.SbtAspectJRunner$RunWithAspectJ.invokeMain(SbtAspectJRunner.scala:124)
at kamon.aspectj.sbt.SbtAspectJRunner$RunWithAspectJ.run0(SbtAspectJRunner.scala:108)
at kamon.aspectj.sbt.SbtAspectJRunner$RunWithAspectJ.execute$1(SbtAspectJRunner.scala:98)
at kamon.aspectj.sbt.SbtAspectJRunner$RunWithAspectJ.$anonfun$run$2(SbtAspectJRunner.scala:101)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at sbt.util.InterfaceUtil$$anon$1.get(InterfaceUtil.scala:10)
at sbt.TrapExit$App.run(TrapExit.scala:252)
at java.base/java.lang.Thread.run(Thread.java:844)