Currently CAS (5.x) does not play well with Galera db cluster when using
In Galera, each table must hold a PK to support deletes (
Therefore, it is mandatory to set the MariaDB option
"innodb_force_primary_key=1“, to ensure all tables hold a primary key.
As the CAS Entity IDs are annotated with @GeneratedValue(strategy =
GenerationType.AUTO), Hibernate (5.x) picks the table generator instead of
identity, so tries to create the hibernate_sequence table in DDL.
As the hibernate_sequence table does not have a PK, creation fails in
Galera with: java.sql.SQLSyntaxErrorException: This table type requires a
Also, performance is quite bad in MySQL, as the table generator uses an
additional, separate transaction to fetch a sequence value.
There are several approaches to workaround this issue:
- Set generator=„native“ in @GeneratedValue
- Change strategy to „SEQUENCE“ by default and provide a JPA XML mapping
that overwrites the Java based annotation mapping (see
- Create the hibernate_sequence table manually and provide a ID PK column
- Mark Galera as unsupported in CAS docs.
You received this message because you are subscribed to the Google Groups "CAS
To unsubscribe from this group and stop receiving emails from it, send an email
Visit this group at https://groups.google.com/a/apereo.org/group/cas-dev/.