One Akka actor has been added to my application that works with Spring and OSGI .
I am trying to use the Actor from Spring @Component bean as follows:
private final ActorSystem system = ActorSystem.create("actor-system"); private ActorRef managerActorRef = system.actorOf(Props.create(ManagerActor.class), "ldapManagerActor");
When I run the application, it throws an exception ( No configuration setting found for key 'akka' ):
Instantiation of bean failed; nested exception is org.springframework. beans.BeanInstantiationException: Could not instantiate bean class [com.myconpany....ByBean]: Constructor threw exception; nested exception is com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'akka'
I look at this : doc. And it seems that the root of my problem is related to the class loader , which I have to pass to / for akka-system and application.conf file that describes this.
But I could not find suitable stets for this to work.
Can anyone help?
My attempts:
Current this article .
When I put:
<bean id="actorSystem" class="akka.actor.ActorSystem" factory-method="create" scope="singleton"></bean>
I have a similar error:
Could not autowire field: private akka.actor.ActorSystem com.typesafe.config.ConfigException$Missing: No configuration setting fou nd for key 'akka'
source share