vlingo / xoom-actors

The VLINGO XOOM platform SDK for the type-safe Actor Model, delivering Reactive concurrency, high scalability, high-throughput, and resiliency using Java and other JVM languages.
https://vlingo.io
Mozilla Public License 2.0
229 stars 28 forks source link

Actor instantiation failed because: No constructor matches the given number of parameters. #82

Closed flaxel closed 4 years ago

flaxel commented 4 years ago

Describe the bug We created a project with the vlingo-xoom-starter. Our project is an implementation for the vlingo-stock-trader. We adapt the generated project a little bit and we get an exception that the actor cannot be initialized because the constructors did not match the given number of parameters. The root cause is in the ActorFactory line 68-88.

To Reproduce Steps to reproduce the behavior:

  1. Go to the branch init_feedback_project of the stocktrader project
  2. Setup the postgres database: docker-compose up
  3. Execute the program with: mvn exec:exec
  4. See stacktrace

Expected behavior The project is started and I can send the health request to the feedback project.

Stacktrace This is the Stracktrace if I execute the program:

Exception in thread "main" java.lang.NullPointerException
    at io.vlingo.actors.Stage.actorFor(Stage.java:485)
    at io.vlingo.actors.Stage.actorFor(Stage.java:106)
    at io.vlingo.actors.Stage.actorFor(Stage.java:95)
    at io.vlingo.actors.World.actorFor(World.java:126)
    at io.vlingo.xoom.storage.DefaultJournalActorBuilder.build(DefaultJournalActorBuilder.java:22)
    at io.vlingo.xoom.storage.StoreActorBuilder.from(StoreActorBuilder.java:44)
    at com.whz.feedback.infrastructure.persistence.CommandModelJournalProvider.using(CommandModelJournalProvider.java:48)
    at com.whz.feedback.infrastructure.Bootstrap.<init>(Bootstrap.java:47)
    at com.whz.feedback.infrastructure.Bootstrap.main(Bootstrap.java:89)
15:24:23.957 [pool-2-thread-6] ERROR io.vlingo.actors.Logger - Actor instantiation failed because: No constructor matches the given number of parameters.
java.lang.IllegalArgumentException: No constructor matches the given number of parameters.
    at io.vlingo.actors.ActorFactory.actorFor(ActorFactory.java:88) ~[vlingo-actors-1.3.4-20201016.200922-51.jar:na]
    at io.vlingo.actors.Stage.createRawActor(Stage.java:761) ~[vlingo-actors-1.3.4-20201016.200922-51.jar:na]
    at io.vlingo.actors.Stage.actorProtocolFor(Stage.java:526) ~[vlingo-actors-1.3.4-20201016.200922-51.jar:na]
    at io.vlingo.actors.Stage.actorFor(Stage.java:484) ~[vlingo-actors-1.3.4-20201016.200922-51.jar:na]
    at io.vlingo.actors.Stage.actorFor(Stage.java:106) ~[vlingo-actors-1.3.4-20201016.200922-51.jar:na]
    at io.vlingo.actors.Stage.actorFor(Stage.java:95) ~[vlingo-actors-1.3.4-20201016.200922-51.jar:na]
    at io.vlingo.actors.World.actorFor(World.java:126) ~[vlingo-actors-1.3.4-20201016.200922-51.jar:na]
    at io.vlingo.xoom.storage.DefaultJournalActorBuilder.build(DefaultJournalActorBuilder.java:22) ~[vlingo-xoom-1.3.4-20201016.201022-62.jar:na]
    at io.vlingo.xoom.storage.StoreActorBuilder.from(StoreActorBuilder.java:44) ~[vlingo-xoom-1.3.4-20201016.201022-62.jar:na]
    at com.whz.feedback.infrastructure.persistence.CommandModelJournalProvider.using(CommandModelJournalProvider.java:48) ~[classes/:na]
    at com.whz.feedback.infrastructure.Bootstrap.<init>(Bootstrap.java:47) ~[classes/:na]
    at com.whz.feedback.infrastructure.Bootstrap.main(Bootstrap.java:89) ~[classes/:na]
15:24:23.959 [pool-2-thread-6] ERROR io.vlingo.actors.Logger - vlingo/actors: FAILED: Actor instantiation failed because: No constructor matches the given number of parameters.
java.lang.IllegalArgumentException: Actor instantiation failed because: No constructor matches the given number of parameters.
    at io.vlingo.actors.Stage.createRawActor(Stage.java:764) ~[vlingo-actors-1.3.4-20201016.200922-51.jar:na]
    at io.vlingo.actors.Stage.actorProtocolFor(Stage.java:526) ~[vlingo-actors-1.3.4-20201016.200922-51.jar:na]
    at io.vlingo.actors.Stage.actorFor(Stage.java:484) ~[vlingo-actors-1.3.4-20201016.200922-51.jar:na]
    at io.vlingo.actors.Stage.actorFor(Stage.java:106) ~[vlingo-actors-1.3.4-20201016.200922-51.jar:na]
    at io.vlingo.actors.Stage.actorFor(Stage.java:95) ~[vlingo-actors-1.3.4-20201016.200922-51.jar:na]
    at io.vlingo.actors.World.actorFor(World.java:126) ~[vlingo-actors-1.3.4-20201016.200922-51.jar:na]
    at io.vlingo.xoom.storage.DefaultJournalActorBuilder.build(DefaultJournalActorBuilder.java:22) ~[vlingo-xoom-1.3.4-20201016.201022-62.jar:na]
    at io.vlingo.xoom.storage.StoreActorBuilder.from(StoreActorBuilder.java:44) ~[vlingo-xoom-1.3.4-20201016.201022-62.jar:na]
    at com.whz.feedback.infrastructure.persistence.CommandModelJournalProvider.using(CommandModelJournalProvider.java:48) ~[classes/:na]
    at com.whz.feedback.infrastructure.Bootstrap.<init>(Bootstrap.java:47) ~[classes/:na]
    at com.whz.feedback.infrastructure.Bootstrap.main(Bootstrap.java:89) ~[classes/:na]
Caused by: java.lang.IllegalArgumentException: No constructor matches the given number of parameters.
    at io.vlingo.actors.ActorFactory.actorFor(ActorFactory.java:88) ~[vlingo-actors-1.3.4-20201016.200922-51.jar:na]
    at io.vlingo.actors.Stage.createRawActor(Stage.java:761) ~[vlingo-actors-1.3.4-20201016.200922-51.jar:na]
    ... 10 common frames omitted

And this is the content of the definition if the error occurs:

Bildschirmfoto 2020-10-20 um 15 50 55
VaughnVernon commented 4 years ago

@flaxel Thanks. This is apparently a XOOM Starter code generation bug. Would you mind moving it under that repository and assign it to @Florian-Schoenherr.

flaxel commented 4 years ago

Thank you for your quick answer. 😄 I created the bug, but I have not the permission to assign this issue to Florian-Schoenherr. Can you add him or can I get the permission?