We have an existing REST API project in Spring Boot 3.2.6, Java 21, with JPA entities and Spring Data. The database is Postgresql 16.2.
The goal was to integrate Causeway in there to manage some “admin” entities with it.
I did that by adding the following Causeway dependencies (no idea if they are all required):
<dependency>
<groupId>org.apache.causeway.mavendeps</groupId>
<artifactId>causeway-mavendeps-webapp</artifactId>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.causeway.viewer</groupId>
<artifactId>causeway-viewer-wicket-viewer</artifactId>
</dependency>
<dependency>
<groupId>org.apache.causeway.viewer</groupId>
<artifactId>causeway-viewer-restfulobjects-jaxrsresteasy</artifactId>
</dependency>
<dependency>
<groupId>org.apache.causeway.security</groupId>
<artifactId>causeway-security-shiro</artifactId>
</dependency>
<dependency>
<groupId>org.apache.causeway.persistence</groupId>
<artifactId>causeway-persistence-jpa-eclipselink</artifactId>
</dependency>
<dependency>
<groupId>org.apache.causeway.viewer</groupId>
<artifactId>causeway-viewer-wicket-applib</artifactId>
</dependency>
<dependency>
<groupId>org.apache.causeway.testing</groupId>
<artifactId>causeway-testing-h2console-ui</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-instrument</artifactId>
</dependency>
<!-- Causeway security -->
<dependency>
<groupId>org.apache.causeway.security</groupId>
<artifactId>causeway-security-keycloak</artifactId>
</dependency>
<dependency>
<groupId>org.apache.causeway.security</groupId>
<artifactId>causeway-security-bypass</artifactId>
</dependency>
The Keycloak part is needed as we are using Keycloak and it does work perfectly with Causeway.
After doing that, my understanding is that the Hibernate
implementation of JPA
was replaced with an EclipseLink
implementation. I had to make some slight adjustments in my Entities and the project was launching correctly.
Our controllers are hit correctly when making requests, but EclipseLink is throwing exceptions for entities using UUID
properties:
An exception occurred while calling convertToEntityAttribute on converter class org.apache.causeway.persistence.jpa.integration.typeconverters.java.util.JavaUtilUuidConverter with value 43047078-e2ba-4e34-8fdd-1b33df84f816
The same thing happens with OffsetDateTime
properties.
My questions are:
- Can I switch back to the Hibernate implementation ?
- If not, how can I get rid of those exceptions ?
Thanks!