Cassandra write-side and Postgres read-side


(Marvin) #1

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


(Marvin) #2

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

(Rodrigo lima) #3

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


(Rodrigo lima) #4

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

and sequence_offset bytea in the read_side_offsets table worked for me


(Marvin) #5

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