Skip to content

Commit

Permalink
Upgrade to Weld 3
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jhernand authored and mwperina committed Feb 1, 2024
1 parent bb9cf92 commit 6db007a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion doctool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<!-- The tool runs in a CDI environment, implemented by Weld: -->
<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se</artifactId>
<artifactId>weld-se-core</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<junit.version>4.13.1</junit.version>
<qdox.version>2.0-M3</qdox.version>
<slf4j.version>1.7.7</slf4j.version>
<weld-se.version>2.3.5.Final</weld-se.version>
<weld-se.version>3.1.9.Final</weld-se.version>
</properties>

<modules>
Expand Down Expand Up @@ -166,7 +166,7 @@
<!-- The tool runs in a CDI environment, implemented by Weld: -->
<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se</artifactId>
<artifactId>weld-se-core</artifactId>
<version>${weld-se.version}</version>
<exclusions>
<exclusion>
Expand Down
2 changes: 1 addition & 1 deletion tool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<!-- The tool runs in a CDI environment, implemented by Weld: -->
<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se</artifactId>
<artifactId>weld-se-core</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
Expand Down

0 comments on commit 6db007a

Please sign in to comment.