Help!! Akka in Karaf error

37 views
Skip to first unread message

grvkmr

unread,
Feb 28, 2016, 2:56:07 AM2/28/16
to Akka User List
Hello

I'm trying to create a rather simple Java Akka application (think hello world) that I can deploy as a bundle within Karaf. Using the documentation provided here, I have followed the necessary steps to set up the org.osgi.framework.bootdelegation property. The class extends the ActorSystemActivator and all it does is create an ActorSystem. After trying with installing individual bundles (akka.actor, akka.osgi, akka.config, etc.), imported by my application, which didn't work, I am including all the required JARs within my application bundle using the shade plugin. I am not using any configuration file (aside from the compiled reference.conf). At this point, when the bundle tries to create the actor system, I see the following error

 java.lang.ClassNotFoundException: akka.actor.LightArrayRevolverScheduler
        at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:340)
        at akka.actor.ReflectiveDynamicAccess$$anonfun$getClassFor$1.apply(DynamicAccess.scala:67)
        at akka.actor.ReflectiveDynamicAccess$$anonfun$getClassFor$1.apply(DynamicAccess.scala:66)
        at scala.util.Try$.apply(Try.scala:191)
        at akka.actor.ReflectiveDynamicAccess.getClassFor(DynamicAccess.scala:66)
        at akka.actor.ReflectiveDynamicAccess.createInstanceFor(DynamicAccess.scala:84)
        at akka.actor.ActorSystemImpl.createScheduler(ActorSystem.scala:677)
        at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:576)
        at akka.actor.ActorSystem$.apply(ActorSystem.scala:142)
        at akka.actor.ActorSystem$.apply(ActorSystem.scala:119)
        at akka.actor.ActorSystem$.create(ActorSystem.scala:67)
        at akka.actor.ActorSystem.create(ActorSystem.scala)
        at com.sample.osgi.akka.tester.SimpleActivator.start(SimpleActivator.java:33)
        at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
        at org.apache.felix.framework.Felix.activateBundle(Felix.java:2226)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2144)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)
        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
        at java.lang.Thread.run(Thread.java:745)  

The class akka.actor.LightArrayRevolverScheduler is present in the final JAR (through shade). Any pointers to sort this out will be greatly appreciated!

Thanks!
Reply all
Reply to author
Forward
0 new messages