Cassandra write-side and Postgres read-side

I’m unable to get Cassandra write at the same time as Postgres read ride. The connection seems to start but ultimately leads to SQLFeatureNotSupportedException. Here are the diffs going from a working sample project with H2 to Postgres. Port 5431 is intentional.

Also created a ticket on the lagom-recipe

Removing username and pass from persistence.xml helped. But I’m still unable to persist new entries into the DB.

22:46:13.825 [error] org.hibernate.engine.jdbc.spi.SqlExceptionHelper [] - ERROR: column "sequence_offset" is of type bigint but expression is of type bytea
  Hint: You will need to rewrite or cast the expression.
  Position: 50
  Location: File: parse_target.c, Routine: transformAssignedExpr, Line: 591
  Server SQLState: 42804
...
Caused by: org.postgresql.util.PSQLException: ERROR: column "sequence_offset" is of type bigint but expression is of type bytea
  Hint: You will need to rewrite or cast the expression.
  Position: 50
  Location: File: parse_target.c, Routine: transformAssignedExpr, Line: 591
  Server SQLState: 42804

I’m having the same problem . Were you able to work it around ?

setting lagom.persistence.jdbc.create-tables.auto = false

and sequence_offset bytea in the read_side_offsets table worked for me

2 Likes

Thanks @rodrigolima. With that, I’m also able to get things working: https://github.com/marvinmarnold/lagom-recipes/commit/3e67f0c08f860b2819116e7ba355318d6052e72e