From c80e1918904e5abd2b67337c72490a926f4d36c6 Mon Sep 17 00:00:00 2001 From: Thomas Andraschko Date: Tue, 16 Jan 2024 13:06:32 +0100 Subject: [PATCH] Fixed dependency exclusions + enhanced logging (#1095) --- .../ReloadableEntityManagerFactory.java | 4 + pom.xml | 101 ++++++++++++++---- tomee/pom.xml | 38 ++++++- 3 files changed, 121 insertions(+), 22 deletions(-) diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ReloadableEntityManagerFactory.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ReloadableEntityManagerFactory.java index dbf809b3a88..f3701f6a921 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ReloadableEntityManagerFactory.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ReloadableEntityManagerFactory.java @@ -162,6 +162,10 @@ public EntityManager createEntityManager() { try { em = delegate().createEntityManager(); } catch (final LinkageError le) { + if (delegate == null) { + LOGGER.error("Could not initialize EntityManagerFactory delegate", le); + throw le; // it's already a OpenEJBRuntimeException + } em = delegate.createEntityManager(); } diff --git a/pom.xml b/pom.xml index 729c2bc8a52..3df5e305c48 100644 --- a/pom.xml +++ b/pom.xml @@ -224,7 +224,7 @@ 4.0.1 - 6.3.1.Final + 6.4.1.Final 7.0.5.Final @@ -1455,6 +1455,10 @@ org.apache.activemq activemq-broker + + jakarta.jms + jakarta.jms-api + @@ -1483,8 +1487,12 @@ ${version.geronimo.components} - org.apache.geronimo.specs - * + jakarta.resource + jakarta.resource-api + + + jakarta.validation + jakarta.validation-api org.objectweb.howl @@ -1498,8 +1506,12 @@ ${version.geronimo.components} - org.apache.geronimo.specs - * + jakarta.resource + jakarta.resource-api + + + jakarta.transaction + jakarta.transaction-api org.objectweb.howl @@ -1532,6 +1544,24 @@ org.apache.openjpa openjpa ${version.openjpa} + + + jakarta.jms + jakarta.jms-api + + + jakarta.persistence + jakarta.persistence-api + + + jakarta.annotation + jakarta.annotation-api + + + jakarta.transaction + jakarta.transaction-api + + @@ -1780,6 +1810,14 @@ org.apache.xbean xbean-finder-shaded + + jakarta.enterprise + jakarta.enterprise.cdi-api + + + jakarta.inject + jakarta.inject-api + @@ -1793,8 +1831,8 @@ ${version.openwebbeans} - org.apache.geronimo.specs - * + jakarta.enterprise + jakarta.enterprise.cdi-api @@ -1803,24 +1841,29 @@ openwebbeans-ejb ${version.openwebbeans} - - org.apache.geronimo.specs - * - + org.apache.openwebbeans openwebbeans-ee ${version.openwebbeans} - + - org.apache.geronimo.specs - geronimo-el_2.2_spec + jakarta.el + jakarta.el-api - org.apache.geronimo.specs - * + jakarta.enterprise + jakarta.enterprise.cdi-api + + + jakarta.inject + jakarta.inject-api + + + jakarta.transaction + jakarta.transaction-api @@ -1833,12 +1876,30 @@ org.apache.xbean xbean-finder-shaded + + jakarta.enterprise + jakarta.enterprise.cdi-api + + + jakarta.inject + jakarta.inject-api + org.apache.openwebbeans openwebbeans-el22 ${version.openwebbeans} + + + jakarta.inject + jakarta.inject-api + + + jakarta.enterprise + jakarta.enterprise.cdi-api + + openwebbeans-ee-common @@ -1846,12 +1907,12 @@ ${version.openwebbeans} - org.apache.geronimo.specs - geronimo-atinject_1.0_spec + jakarta.enterprise + jakarta.enterprise.cdi-api - org.apache.geronimo.specs - * + jakarta.inject + jakarta.inject-api diff --git a/tomee/pom.xml b/tomee/pom.xml index 24456665731..6ce1ef27b64 100644 --- a/tomee/pom.xml +++ b/tomee/pom.xml @@ -222,6 +222,18 @@ org.apache.geronimo.specs * + + org.apache.tomcat + * + + + jakarta.enterprise + jakarta.enterprise.cdi-api + + + jakarta.inject + jakarta.inject-api + @@ -231,16 +243,32 @@ org.apache.geronimo.specs - geronimo-jcdi_1.0_spec + * - org.apache.geronimo.specs + org.apache.tomcat * commons-beanutils commons-beanutils + + jakarta.validation + jakarta.validation-api + + + jakarta.annotation + jakarta.annotation-api + + + jakarta.enterprise + jakarta.enterprise.cdi-api + + + jakarta.inject + jakarta.inject-api + @@ -308,6 +336,12 @@ org.glassfish jakarta.faces ${version.mojarra} + + + jakarta.annotation + jakarta.annotation-api + + ${project.groupId}