Throw more explicit exception when journal plugin is missing from classpath.
When a configured journal plugin is missing from the classpath, the following exception is thrown:
11:23:37.614 [kiarchive-akka.actor.default-dispatcher-19] ERROR akka.actor.OneForOneStrategy - actor name [snapshot-store] is not unique!
akka.actor.ActorInitializationException: exception during creation
at akka.actor.ActorInitializationException$.apply(Actor.scala:164) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.ActorCell.create(ActorCell.scala:596) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:456) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:263) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.dispatch.Mailbox.run(Mailbox.scala:219) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) ~[na:1.7.0_09-icedtea]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) ~[na:1.7.0_09-icedtea]
at java.lang.Thread.run(Thread.java:722) ~[na:1.7.0_09-icedtea]
Caused by: akka.actor.InvalidActorNameException: actor name [snapshot-store] is not unique!
at akka.actor.dungeon.ChildrenContainer$NormalChildrenContainer.reserve(ChildrenContainer.scala:130) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.dungeon.Children$class.reserveChild(Children.scala:77) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.ActorCell.reserveChild(ActorCell.scala:369) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.dungeon.Children$class.makeChild(Children.scala:202) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.dungeon.Children$class.attachChild(Children.scala:42) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.ActorCell.attachChild(ActorCell.scala:369) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.ActorSystemImpl.systemActorOf(ActorSystem.scala:550) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.persistence.Persistence.createPlugin(Persistence.scala:148) ~[com.typesafe.akka.akka-persistence-experimental_2.10-2.3.0.jar:na]
at akka.persistence.Persistence.<init>(Persistence.scala:87) ~[com.typesafe.akka.akka-persistence-experimental_2.10-2.3.0.jar:na]
at akka.persistence.Persistence$.createExtension(Persistence.scala:73) ~[com.typesafe.akka.akka-persistence-experimental_2.10-2.3.0.jar:na]
at akka.persistence.Persistence$.createExtension(Persistence.scala:67) ~[com.typesafe.akka.akka-persistence-experimental_2.10-2.3.0.jar:na]
at akka.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:698) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.ExtensionId$class.apply(Extension.scala:79) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.persistence.Persistence$.apply(Persistence.scala:67) ~[com.typesafe.akka.akka-persistence-experimental_2.10-2.3.0.jar:na]
at akka.persistence.snapshot.SnapshotStore$class.$init$(SnapshotStore.scala:21) ~[com.typesafe.akka.akka-persistence-experimental_2.10-2.3.0.jar:na]
at akka.persistence.snapshot.local.LocalSnapshotStore.<init>(LocalSnapshotStore.scala:26) ~[com.typesafe.akka.akka-persistence-experimental_2.10-2.3.0.jar:na]
at sun.reflect.GeneratedConstructorAccessor2.newInstance(Unknown Source) ~[na:na]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.7.0_09-icedtea]
at java.lang.reflect.Constructor.newInstance(Constructor.java:525) ~[na:1.7.0_09-icedtea]
at java.lang.Class.newInstance0(Class.java:372) ~[na:1.7.0_09-icedtea]
at java.lang.Class.newInstance(Class.java:325) ~[na:1.7.0_09-icedtea]
at akka.util.Reflect$.instantiate(Reflect.scala:45) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.NoArgsReflectConstructor.produce(Props.scala:358) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.Props.newActor(Props.scala:249) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.ActorCell.newActor(ActorCell.scala:552) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.ActorCell.create(ActorCell.scala:578) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
... 7 common frames omitted
This does not really tell, what the cause of the exception is. Maybe a more explicit exception should be thrown.
11:23:37.614 [kiarchive-akka.actor.default-dispatcher-19] ERROR akka.actor.OneForOneStrategy - actor name [snapshot-store] is not unique!
akka.actor.ActorInitializationException: exception during creation
at akka.actor.ActorInitializationException$.apply(Actor.scala:164) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.ActorCell.create(ActorCell.scala:596) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:456) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:263) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.dispatch.Mailbox.run(Mailbox.scala:219) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) ~[na:1.7.0_09-icedtea]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) ~[na:1.7.0_09-icedtea]
at java.lang.Thread.run(Thread.java:722) ~[na:1.7.0_09-icedtea]
Caused by: akka.actor.InvalidActorNameException: actor name [snapshot-store] is not unique!
at akka.actor.dungeon.ChildrenContainer$NormalChildrenContainer.reserve(ChildrenContainer.scala:130) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.dungeon.Children$class.reserveChild(Children.scala:77) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.ActorCell.reserveChild(ActorCell.scala:369) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.dungeon.Children$class.makeChild(Children.scala:202) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.dungeon.Children$class.attachChild(Children.scala:42) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.ActorCell.attachChild(ActorCell.scala:369) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.ActorSystemImpl.systemActorOf(ActorSystem.scala:550) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.persistence.Persistence.createPlugin(Persistence.scala:148) ~[com.typesafe.akka.akka-persistence-experimental_2.10-2.3.0.jar:na]
at akka.persistence.Persistence.<init>(Persistence.scala:87) ~[com.typesafe.akka.akka-persistence-experimental_2.10-2.3.0.jar:na]
at akka.persistence.Persistence$.createExtension(Persistence.scala:73) ~[com.typesafe.akka.akka-persistence-experimental_2.10-2.3.0.jar:na]
at akka.persistence.Persistence$.createExtension(Persistence.scala:67) ~[com.typesafe.akka.akka-persistence-experimental_2.10-2.3.0.jar:na]
at akka.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:698) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.ExtensionId$class.apply(Extension.scala:79) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.persistence.Persistence$.apply(Persistence.scala:67) ~[com.typesafe.akka.akka-persistence-experimental_2.10-2.3.0.jar:na]
at akka.persistence.snapshot.SnapshotStore$class.$init$(SnapshotStore.scala:21) ~[com.typesafe.akka.akka-persistence-experimental_2.10-2.3.0.jar:na]
at akka.persistence.snapshot.local.LocalSnapshotStore.<init>(LocalSnapshotStore.scala:26) ~[com.typesafe.akka.akka-persistence-experimental_2.10-2.3.0.jar:na]
at sun.reflect.GeneratedConstructorAccessor2.newInstance(Unknown Source) ~[na:na]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.7.0_09-icedtea]
at java.lang.reflect.Constructor.newInstance(Constructor.java:525) ~[na:1.7.0_09-icedtea]
at java.lang.Class.newInstance0(Class.java:372) ~[na:1.7.0_09-icedtea]
at java.lang.Class.newInstance(Class.java:325) ~[na:1.7.0_09-icedtea]
at akka.util.Reflect$.instantiate(Reflect.scala:45) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.NoArgsReflectConstructor.produce(Props.scala:358) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.Props.newActor(Props.scala:249) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.ActorCell.newActor(ActorCell.scala:552) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
at akka.actor.ActorCell.create(ActorCell.scala:578) ~[com.typesafe.akka.akka-actor_2.10-2.3.0.jar:na]
... 7 common frames omitted
This does not really tell, what the cause of the exception is. Maybe a more explicit exception should be thrown.
Leave a comment
on 2014-03-18 08:47 *
By Patrik Nordwall
thanks
on 2014-03-24 09:19 *
By Patrik Nordwall
Assigned to set to Patrik Nordwall
Status changed from New to Accepted
on 2014-03-24 09:39 *
By Patrik Nordwall
Assigned to changed from Patrik Nordwall to -none-
Status changed from Accepted to New
It is already logged. The problem is that when an extension partly fails the next attempt will typically generate another failure, such as this "actor name [snapshot-store] is not unique". I suggest that an extension should only be given one chance to initialize, and after that it should fail-fast with a good error message. That should be possible to implement in ActorSystemImpl.
Putting this back in the queue. WDYT @rkuhn?
Putting this back in the queue. WDYT @rkuhn?