I ran into some issues, and I thought I'd document them here.
So changed my persistence.xml and added:
Also:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.4.payara-p2): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: (conn=16) Table 'mmud.SEQUENCE' doesn't exist
Error Code: 1146
Call: UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + ? WHERE SEQ_NAME = ?
bind => [2 parameters bound]
Query: DataModifyQuery(name="SEQ_GEN_IDENTITY" sql="UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + ? WHERE SEQ_NAME = ?")
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333)
As the vendor name was not detected, eclipselink switched to a default implementation. The default implementation requires SEQUENCES for the IDENTITY definition.
It turns out the MariaDB implementation of Sequences is not compatible with the standard SQL way of creating sequences.
So I had to add the following property to the JDBC Connection pool:
References
- JIRA MariaDB : since 2.4.0 j-connector throws sequence errors via JPA/ eclipselink on @GeneratedValue(strategy = GenerationType.IDENTITY) columns
- https://jira.mariadb.org/browse/CONJ-702
- Java Persistence API (JPA) Extensions Reference for EclipseLink, Release 2.4 : target-database
- https://www.eclipse.org/eclipselink/documentation/2.4/jpa/extensions/p_target_database.htm
- Eclipse JIRA : Bug 462196 - Add support for MariaDB
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=462196