Closed flaxel closed 4 years ago
@flaxel Please describe the storage choices (Event Sourcing vs Stateful) and any other details used in the Starter. Your issue states that the root cause is the ActorFactory
but that's where the bug is manifest.
/cc @Florian-Schoenherr @danilo-ambrosio
Yes of course. π We want to use event sourcing. Therefore we used the following property template to generate the project with xoom gen
:
#Maven artifact version
version=1.0.0
#Maven project group id
group.id=com.whz
#Maven artifact version
artifact.id=<project_name>
#Base package name
package=com.whz.<project_name>
#Absolute path for the project parent folder
target.folder=<folder>
#vlingo xoom version
vlingo.xoom.server.version=1.3.4-SNAPSHOT
#Deployment Type (NONE, DOCKER, KUBERNETES)
deployment=DOCKER
#Docker Image name, required if deployment type is KUBERNETES or DOCKER
docker.image=<project_name>
#Published Docker Image, required if deployment type is KUBERNETES
k8s.image=xoom-application
#Kubernetes POD name, required if deployment type is KUBERNETES
k8s.pod.name=xoom-application
#Aggregate names (separated by semicolon)
aggregates=<aggregate_name>
#Domain Events (each events group should be preceded by Aggregate name and separated by semicolon)
events=<aggregate_name>, <event_name>
#Aggregate Rest Resources
rest.resources=<aggregate_name>
#Storage Type (STATE_STORE or JOURNAL)
storage.type=JOURNAL
#CQRS (true or false)
cqrs=true
#Projections Type (NONE, EVENT_BASED or OPERATION_BASED)
projections=EVENT_BASED
#Domain Model Database, required if CQRS is false (IN_MEMORY, POSTGRES, HSQLDB, MYSQL, YUGA_BYTE)
database=IN_MEMORY
#Command Model Database, required if CQRS is true or Storage Type is Journal (see database types above)
command.model.database=POSTGRES
#Query Model Database, required if CQRS is true or Storage Type is Journal (see database types above)
query.model.database=POSTGRES
#Use Xoom Annotations, when applicable
annotations=false
Guten Tag, Kommilitone! Now I'll keep it english.
This seems to stem from some recent changes in the API, we will fix this as soon as possible!
See this issue.
Btw, you should be able to use logger()
inside your FeedbackResource. (Maybe this is a nitpick π)
@flaxel @Florian-Schoenherr This was fixed by @danilo-ambrosio. Please review and test PR to confirm fix. I will merge following your ok.
https://github.com/vlingo/vlingo-xoom/commit/479d550cd3473dd015f347fae088765a91ad2adb
/cc @danilo-ambrosio
The solution is working perfectly. π Thank you very much! π I got only one little error and I guess it is a fast fix. If I want to get the defaultLogger
from a RessourceHandler I get a NPE. I guess the reason is that the stage
variable is never set therefore the value is null
. My suggested solution would be a new constructor, which has to be called in the FeedbackResource
, for example. Should I create a new issue for this task?
Thanks, @flaxel. I am closing this issue. Please create a new issue with your latest report, RE: ResourceHandler
does not provide defaultLogger
and include the following comment:
It's possible that extending ResourceHandler
is improperly generated because that is only supported by "configuration resources" (declared in vlingo-http.properties
). For dynamic resources handlers the Stage
must be passed in via constructor. With the Stage
the dynamic resources handlers can get to anything needed, including the Logger
.
/cc @danilo-ambrosio @Florian-Schoenherr
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:
docker-compose up
mvn exec:exec
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:
And this is the content of the definition if the error occurs: