rewrite-migrate-java
rewrite-migrate-java copied to clipboard
Application does not deploy on Payara 6 / EclipseLink after EE10 migration due to error in persistence.xml
We are using Payara 6.2025.2 (bundled with EclipseLink). After migration the application does not start with this exception:
java.io.IOException: org.xml.sax.SAXParseException; lineNumber: 201; columnNumber: 24; Deployment descriptor file META-INF/persistence.xml in archive [classes]. cvc-complex-type.2.4.d: Invalid content was found starting with element 'shared-cache-mode'. No child element is expected at this point.
Related PR https://github.com/openrewrite/rewrite-migrate-java/pull/361
Our persistence.xml after migration:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="3.0"
xmlns="https://jakarta.ee/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd">
<persistence-unit name="xxx" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>xxx</jta-data-source>
<class>xxx</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<validation-mode>NONE</validation-mode>
<properties>
<property name="eclipselink.weaving.changetracking" value="false"/>
<property name="jakarta.persistence.lock.timeout" value="1000"/>
</properties>
<shared-cache-mode>NONE</shared-cache-mode>
</persistence-unit>
</persistence>