Closed sturmm closed 5 years ago
@RoadRunner120485 The following commits fix this issue and provide a test:
https://github.com/vlingo/vlingo-symbio-jdbc/commit/c0ab355eb16943c68574af6dc4123a8b52680073 https://github.com/vlingo/vlingo-symbio-jdbc/commit/2b0d189be16d769dcad464e96a888cd7624056a1 https://github.com/vlingo/vlingo-symbio-jdbc/commit/526a51e3afa2fb1d11ef4e694128860dced0f60c#diff-8f0f5a073c811558f1c9e17dd60be2bfR131
Please ignore the file deletions as we have some test database scripts not being cleaned up.
Note that it is difficult to test the incorrect database definition. Could you please point to where the documentation is wrong? This will be fixed next.
Please test and close if you agree.
@RoadRunner120485 One other comment. Actually there are two method signatures for each of appendWith()
and appendAllWith()
. One method signature provides no means to persist a snapshot and the other does. Technically you should always pass a valid snapshot
parameter when using the snapshot-capable methods. Passing a null
is now handled with a graceful failure, so the issue of passing null
is fixed.
@kmruiz Could you please update the following documentation so that it has the current/valid table definitions for Postgres? Per @RoadRunner120485 the table definition(s) are outdated. It would be good to have table definitions for both events and snapshots in the docs.
https://docs.vlingo.io/vlingo-symbio/developing-event-sourced-models
Documentation up-to-date now (didn't realise the schema changed, sorry for the inconvenience!).
Thanks for your help!
Works now. Thank you.
I tried to implement an example with vlingo eventsourcing and took the table definition from the documentation first (which is outdatet). With that old schema I got
NullPointerException
s from the exception handlers inPostgresJournalActor
which had hidden real the error message e.g. 'table vlingo_symbio_journal not found'.This is one of the exception handlers from the
appendWith
method:I assume that the
snapshot
parameter could benull
?! In this caseOptional.of(...)
needs to be replaced withOptional.ofNullable(...)
asOptional.of(...)
in java works different than in scala and throws NPE if null is passed as parameter.