I'm having issues upgrading to JPA 2.2. I'm using eclipselink and changed the version in my pom:
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.7.0</version>
</dependency>
I also updated the persistence.xml to point to the correct version of the xsd:
<?xml version="1.0" encoding="UTF-8" ?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd"
version="2.2">
<persistence-unit name="foo" transaction-type="RESOURCE_LOCAL">
<class>my.entity</class>
<properties>
<property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver" />
<property name="javax.persistence.jdbc.url" value="jdbc:derby:foo/data;create=true" />
<property name="javax.persistence.jdbc.user" value="user" />
<property name="javax.persistence.jdbc.password" value="pwd" />
<property name="eclipselink.ddl-generation" value="create-or-extend-tables" />
<property name="eclipselink.ddl-generation.output-mode" value="database" />
</properties>
</persistence-unit>
</persistence>
The issue is that I'm getting the following error message:
The persistence.xml file does not have supported content for this JPA platform.
I've looked through the eclipselink documentation and nothing is jumping out at me.
Any ideas?
Jakarta Persistence 3.1 Version 3.1 was released in 2022.
jpa-2.1. Java Persistence API (JPA) 2.1 for WebSphere Application Server is built on the EclipseLink open source project. EclipseLink is the reference implementation for all versions of the JPA specification. The provider of JPA for this product is org. eclipse.
JPA 3.0 brings no new features. It only changes the prefix of all API classes' package names, the prefix of some configuration properties, and the schema namespaces for all XML-based configuration files. The goal of these changes was to replace the word “java” to avoid legal issues.
I ran into the same error message after upgrading from JPA 2.0 to 2.1; I got rid of it by also upgrading the JPA Platform in the Eclipse Project JPA settings to EclipseLink 2.5.x.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With