This is an automated email from the ASF dual-hosted git repository.

rzo1 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomee.git


The following commit(s) were added to refs/heads/main by this push:
     new 5a3c5cc5e3 TOMEE-4657 - use the modular EclipseLink JPA artifact 
instead of the uber-jar
5a3c5cc5e3 is described below

commit 5a3c5cc5e3c1ba13df42a149cb6c2267bbb114bf
Author: Markus Jung <[email protected]>
AuthorDate: Tue Jul 21 10:27:14 2026 +0200

    TOMEE-4657 - use the modular EclipseLink JPA artifact instead of the 
uber-jar
    
    Plume shipped org.eclipse.persistence:eclipselink, a monolithic artifact 
that
    bundles MOXy alongside the JPA runtime and registers a
    jakarta.xml.bind.JAXBContextFactory service. MOXy therefore won the
    ServiceLoader lookup over the JAXB RI that Plume also ships, and MOXy cannot
    unmarshal through the SAX UnmarshallerHandler chain Apache BVal uses while
    parsing validation.xml and constraint-mapping descriptors. Every Bean
    Validation XML configuration path on a stock Plume server failed with a
    DOMException (NAMESPACE_ERR).
    
    Plume needs a JPA provider, not a JAXB one, so depend on the modular
    org.eclipse.persistence.jpa artifact. It brings the JPA runtime plus
    persistence.core and jpa.jpql, keeps the
    jakarta.persistence.spi.PersistenceProvider service, and leaves MOXy, SDO,
    JPA-RS and the Oracle platforms out of the distribution. jaxb-runtime is now
    the only JAXBContextFactory provider in Plume, so no system property pin is
    needed.
    
    Verified on a clean build of the Plume distribution:
    - Jakarta Persistence TCK 3.2.1: 2134 tests, 0 failures, 0 errors, plus the
      signature test, unchanged from the previous baseline.
    - Jakarta Validation TCK 3.1.1: 1049 tests, 0 failures, signature test 0
      failures, with no jakarta.xml.bind.JAXBContextFactory pin configured.
    
    Note that the change only shows up in a clean build: the plume work dir 
keeps
    previously staged jars, so an incremental build can still package the old
    uber-jar.
    
    boms/tomee-plume/pom.xml is regenerated by GenerateBoms during the build.
---
 boms/tomee-plume/pom.xml                  | 64 +++++++++++++++----------------
 container/openejb-jpa-integration/pom.xml |  2 +-
 pom.xml                                   |  7 +++-
 utils/openejb-core-eclipselink/pom.xml    | 23 +++++------
 4 files changed, 49 insertions(+), 47 deletions(-)

diff --git a/boms/tomee-plume/pom.xml b/boms/tomee-plume/pom.xml
index 4c6e25f64e..78d446aa6a 100644
--- a/boms/tomee-plume/pom.xml
+++ b/boms/tomee-plume/pom.xml
@@ -1038,7 +1038,17 @@
       </dependency>
       <dependency>
         <groupId>org.eclipse.persistence</groupId>
-        <artifactId>eclipselink</artifactId>
+        <artifactId>org.eclipse.persistence.core</artifactId>
+        <version>5.0.1</version>
+      </dependency>
+      <dependency>
+        <groupId>org.eclipse.persistence</groupId>
+        <artifactId>org.eclipse.persistence.jpa.jpql</artifactId>
+        <version>5.0.1</version>
+      </dependency>
+      <dependency>
+        <groupId>org.eclipse.persistence</groupId>
+        <artifactId>org.eclipse.persistence.jpa</artifactId>
         <version>5.0.1</version>
       </dependency>
       <dependency>
@@ -1166,11 +1176,6 @@
         <artifactId>opensaml-xmlsec-impl</artifactId>
         <version>5.1.3</version>
       </dependency>
-      <dependency>
-        <groupId>org.ow2.asm</groupId>
-        <artifactId>asm-analysis</artifactId>
-        <version>9.10</version>
-      </dependency>
       <dependency>
         <groupId>org.ow2.asm</groupId>
         <artifactId>asm-commons</artifactId>
@@ -1181,11 +1186,6 @@
         <artifactId>asm-tree</artifactId>
         <version>9.10</version>
       </dependency>
-      <dependency>
-        <groupId>org.ow2.asm</groupId>
-        <artifactId>asm-util</artifactId>
-        <version>9.10</version>
-      </dependency>
       <dependency>
         <groupId>org.ow2.asm</groupId>
         <artifactId>asm</artifactId>
@@ -3222,7 +3222,27 @@
     </dependency>
     <dependency>
       <groupId>org.eclipse.persistence</groupId>
-      <artifactId>eclipselink</artifactId>
+      <artifactId>org.eclipse.persistence.core</artifactId>
+      <exclusions>
+        <exclusion>
+          <artifactId>*</artifactId>
+          <groupId>*</groupId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.persistence</groupId>
+      <artifactId>org.eclipse.persistence.jpa.jpql</artifactId>
+      <exclusions>
+        <exclusion>
+          <artifactId>*</artifactId>
+          <groupId>*</groupId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.persistence</groupId>
+      <artifactId>org.eclipse.persistence.jpa</artifactId>
       <exclusions>
         <exclusion>
           <artifactId>*</artifactId>
@@ -3480,16 +3500,6 @@
         </exclusion>
       </exclusions>
     </dependency>
-    <dependency>
-      <groupId>org.ow2.asm</groupId>
-      <artifactId>asm-analysis</artifactId>
-      <exclusions>
-        <exclusion>
-          <artifactId>*</artifactId>
-          <groupId>*</groupId>
-        </exclusion>
-      </exclusions>
-    </dependency>
     <dependency>
       <groupId>org.ow2.asm</groupId>
       <artifactId>asm-commons</artifactId>
@@ -3510,16 +3520,6 @@
         </exclusion>
       </exclusions>
     </dependency>
-    <dependency>
-      <groupId>org.ow2.asm</groupId>
-      <artifactId>asm-util</artifactId>
-      <exclusions>
-        <exclusion>
-          <artifactId>*</artifactId>
-          <groupId>*</groupId>
-        </exclusion>
-      </exclusions>
-    </dependency>
     <dependency>
       <groupId>org.ow2.asm</groupId>
       <artifactId>asm</artifactId>
diff --git a/container/openejb-jpa-integration/pom.xml 
b/container/openejb-jpa-integration/pom.xml
index 28e433499a..1341dfa04d 100644
--- a/container/openejb-jpa-integration/pom.xml
+++ b/container/openejb-jpa-integration/pom.xml
@@ -63,7 +63,7 @@
     </dependency>
     <dependency>
       <groupId>org.eclipse.persistence</groupId>
-      <artifactId>eclipselink</artifactId>
+      <artifactId>org.eclipse.persistence.jpa</artifactId>
       <optional>true</optional>
     </dependency>
     <dependency>
diff --git a/pom.xml b/pom.xml
index 39245d1d95..f873398ef1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1861,9 +1861,14 @@
           </exclusion>
         </exclusions>
       </dependency>
+      <!--
+        Prefer the modular EclipseLink JPA artifact over the monolithic
+        org.eclipse.persistence:eclipselink uber-jar, which also bundles MOXy 
and its
+        jakarta.xml.bind.JAXBContextFactory service. See TOMEE-4657.
+      -->
       <dependency>
         <groupId>org.eclipse.persistence</groupId>
-        <artifactId>eclipselink</artifactId>
+        <artifactId>org.eclipse.persistence.jpa</artifactId>
         <version>${version.eclipselink}</version>
       </dependency>
       <dependency>
diff --git a/utils/openejb-core-eclipselink/pom.xml 
b/utils/openejb-core-eclipselink/pom.xml
index 7f27009c1d..e3b97ead48 100644
--- a/utils/openejb-core-eclipselink/pom.xml
+++ b/utils/openejb-core-eclipselink/pom.xml
@@ -43,15 +43,20 @@
         </exclusion>
       </exclusions>
     </dependency>
+    <!--
+      Use the modular EclipseLink JPA artifact rather than the monolithic
+      org.eclipse.persistence:eclipselink uber-jar. The uber-jar also bundles 
MOXy,
+      which registers a jakarta.xml.bind.JAXBContextFactory service and wins 
the
+      ServiceLoader lookup over the JAXB RI. MOXy cannot unmarshal through the 
SAX
+      UnmarshallerHandler chain Apache BVal uses, which breaks every Bean 
Validation
+      XML configuration path on Plume. Plume needs a JPA provider, not a JAXB 
one.
+      See TOMEE-4657.
+    -->
     <dependency>
       <groupId>org.eclipse.persistence</groupId>
-      <artifactId>eclipselink</artifactId>
+      <artifactId>org.eclipse.persistence.jpa</artifactId>
       <version>${version.eclipselink}</version>
       <exclusions>
-        <exclusion>
-          <groupId>org.eclipse.persistence</groupId>
-          <artifactId>jakarta.persistence</artifactId>
-        </exclusion>
         <exclusion>
           <groupId>org.eclipse.persistence</groupId>
           <artifactId>jakarta.persistence</artifactId>
@@ -68,14 +73,6 @@
           <groupId>org.eclipse.parsson</groupId>
           <artifactId>jakarta.json</artifactId>
         </exclusion>
-        <exclusion>
-          <groupId>com.sun.xml.bind</groupId>
-          <artifactId>jaxb-xjc</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>com.sun.xml.bind</groupId>
-          <artifactId>jaxb-core</artifactId>
-        </exclusion>
       </exclusions>
     </dependency>
   </dependencies>

Reply via email to