From 6db007a7ff44c58b939e426d717b1ee239c11f4e Mon Sep 17 00:00:00 2001 From: Juan Hernandez Date: Thu, 1 Feb 2024 13:43:46 +0100 Subject: [PATCH] Upgrade to Weld 3 Currently the tool fails to start the CDI container with the following error message: ``` [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:java (generate-code) on project metamodel-tests: An exception occured while executing the Java class. WELD-001524: Unable to load proxy class for bean Implicit Bean [javax.enterprise.inject.Instance] with qualifiers [@Default] with class interface javax.enterprise.inject.Instance using classloader java.net.URLClassLoader@2570b316: Could not initialize class org.jboss.classfilewriter.ClassFile: Exception java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @5e407e1b [in thread "weld-worker-7"] -> [Help 1] ``` I believe the reason for that is that the version of Weld that we use doesn't work well with Java 11 or later. This patch updates to Weld 3 to address that issue. Signed-off-by: Juan Hernandez --- doctool/pom.xml | 2 +- pom.xml | 4 ++-- tool/pom.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doctool/pom.xml b/doctool/pom.xml index 3330db1..c922a5a 100644 --- a/doctool/pom.xml +++ b/doctool/pom.xml @@ -82,7 +82,7 @@ org.jboss.weld.se - weld-se + weld-se-core org.slf4j diff --git a/pom.xml b/pom.xml index 8f7661f..94ebf9d 100644 --- a/pom.xml +++ b/pom.xml @@ -66,7 +66,7 @@ 4.13.1 2.0-M3 1.7.7 - 2.3.5.Final + 3.1.9.Final @@ -166,7 +166,7 @@ org.jboss.weld.se - weld-se + weld-se-core ${weld-se.version} diff --git a/tool/pom.xml b/tool/pom.xml index 2dba4ad..b38c860 100644 --- a/tool/pom.xml +++ b/tool/pom.xml @@ -76,7 +76,7 @@ org.jboss.weld.se - weld-se + weld-se-core org.slf4j