Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0045594
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2020-12-16 16:002021-06-16 12:58
ReportershuehnerView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in VersionPR21Q3
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget VersionPR21Q3
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0045594: Junit tests based on BaseWeldTest fail since jdk16 build ea28 (as weld tries to access no longer accessible jdk internals)

DescriptionRunning ant run.all.tests with jdk16ea28 build (at least) test fail with

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 @389008d1

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 @389008d1
    at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
    at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
    at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
    at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
    at org.jboss.weld.util.bytecode.ClassFileUtils$1.run(ClassFileUtils.java:88)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
    at org.jboss.weld.util.bytecode.ClassFileUtils.makeClassLoaderMethodsAccessible(ClassFileUtils.java:64)
    at org.jboss.weld.bootstrap.WeldStartup.startContainer(WeldStartup.java:220)

Running same with build ea27 does still work.

That looks like consequence of this JDK changes included in ea28 build:
https://openjdk.java.net/jeps/396 [^]

Can be reproduced with:
 ant run.test -Dtest=org.openbravo.client.application.test.MenuTest
Which fails (error message can be seen in src/result-org.openbravo.client.application.test.MenuTest.xml

Problem can be temporarily avoided by using:
export ANT_OPTS="--illegal-access=permit"
or
export ANT_OPTS="--illegal-access=debug"

Which undoes the new default behavior as as that 396 dep.

Note:
Behavior change is currently not listed in ea28 release notes
Steps To ReproduceDownload jdk16ea28 build or higher:
https://jdk.java.net/16/ [^]
Set JAVA_HOME to it
use
ant run.test -Dtest=org.openbravo.client.application.test.MenuTest
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to design defect 0040840 closedplatform Illegal Access warning in weld-core-impl-3.1.1.Final.jar using JDK12+ 
depends on feature request 0045593 closedplatform Support JDK16 
blocks feature request 0045903 newTriage Platform Base Support JDK17 (LTS) 
blocks design defect 0047090 newTriage Platform Base Tracking issue: Library update 

-  Notes
(0124888)
shuehner (administrator)
2020-12-16 16:01

Note that starting tomcat (in CI for webservice tests) did not fail.

So behavior maybe triggered by change doing during src-test invocation via Weld and not in normal usage in tomcat (just a theory)
(0124889)
shuehner (administrator)
2020-12-16 16:26

Note that this to be triggered by the defaultbehavior change to deny in ea28 but the underlying problem we had already tracked in issue 40840 since early 2019.
(0126124)
shuehner (administrator)
2021-02-16 11:42
edited on: 2021-02-16 12:09

That is fixed upstream in (not yet released) versions:
Fix Version/s: 4.0.1.Final
Fix Version/s: 3.1.7.Final

Currently we have 3.1.1 plan is targered smallest update (like a bugfix) to move to 3.1.7 (when it is released)

For reference changelog links from 3.1.2..3.1.6 to se changes:
3.1.2: https://issues.redhat.com/secure/ReleaseNote.jspa?projectId=12310891&version=12341958 [^]
3.1.3: https://issues.redhat.com/secure/ReleaseNote.jspa?projectId=12310891&version=12342783 [^]
3.1.4: https://issues.redhat.com/secure/ReleaseNote.jspa?projectId=12310891&version=12343306 [^]
3.1.5: https://issues.redhat.com/secure/ReleaseNote.jspa?projectId=12310891&version=12345341 [^]
3.1.5.SP1: https://issues.redhat.com/secure/ReleaseNote.jspa?projectId=12310891&version=12347084 [^]
3.1.6: https://issues.redhat.com/secure/ReleaseNote.jspa?projectId=12310891&version=12346955 [^]
3.1.7: No changelog (not yet released)

Out of thos3:
[WELD-2598] - Move Weld to Jakarta EE GAVs (from 3.1.3)
- could cascade to update a double of dependencies
- However as written in the issue (0 api-changes/behavior changes here) just reorganizing to be provided by jakarta EE (but without the package renaming)

(0126264)
shuehner (administrator)
2021-02-22 12:57

Weld-Roadmap is showing: 2021-05-16 as planned release date for the 3.1.7:

https://issues.redhat.com/projects/WELD?selectedItem=com.atlassian.jira.jira-projects-plugin:release-page [^]
(0129200)
hgbot (developer)
2021-06-08 15:26

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/380 [^]
(0129218)
hgbot (developer)
2021-06-09 08:01

Merge Request created: https://gitlab.com/openbravo/tools/platform/dependencies/-/merge_requests/2 [^]
(0129556)
hgbot (developer)
2021-06-16 12:57

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/380 [^]
(0129557)
hgbot (developer)
2021-06-16 12:57

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: c6a8cad3820e6369073476f655ab07f0ab36ee1f
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 2021-06-16T12:51:51+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/c6a8cad3820e6369073476f655ab07f0ab36ee1f [^]

fixes ISSUE-45594: Illegal reflective access in Weld fails in JDK16+

Current weld version (3.1.1) has WELD-2662 [1] bug, which causes an
illegal access which prevents tests executions in JDK16+ due to an
stronger encapsulation implemented by JEP 396 [2].

It gets fixed by updating weld: 3.1.1 -> 3.1.7

Note the following transitive dependencies are not included:
  * weld-probe-core: it is a tool for developers
  * jboss-el-api: not required (inclued in src-test as a dependency for
    arquillian).
  * jboss-logging: included in core's lib/runtime as Hibernate
    dependency

[1] https://issues.redhat.com/browse/WELD-2662 [^]
[2] https://openjdk.java.net/jeps/396 [^]

---
A legal/EPL-2.0.txt
A modules/org.openbravo.base.weld/lib/runtime/jakarta.enterprise.cdi-api-2.0.2.jar
A modules/org.openbravo.base.weld/lib/runtime/jakarta.inject-api-1.0.jar
A modules/org.openbravo.base.weld/lib/runtime/jboss-annotations-api_1.3_spec-2.0.1.Final.jar
A modules/org.openbravo.base.weld/lib/runtime/jboss-interceptors-api_1.2_spec-2.0.0.Final.jar
A modules/org.openbravo.base.weld/lib/runtime/weld-api-3.1.SP4.jar
A modules/org.openbravo.base.weld/lib/runtime/weld-core-impl-3.1.7.SP1.jar
A modules/org.openbravo.base.weld/lib/runtime/weld-environment-common-3.1.7.SP1.jar
A modules/org.openbravo.base.weld/lib/runtime/weld-jsf-3.1.7.SP1.jar
A modules/org.openbravo.base.weld/lib/runtime/weld-servlet-core-3.1.7.SP1.jar
A modules/org.openbravo.base.weld/lib/runtime/weld-spi-3.1.SP4.jar
A modules/org.openbravo.base.weld/lib/runtime/weld-web-3.1.7.SP1.jar
M legal/Licensing.txt
R modules/org.openbravo.base.weld/lib/runtime/cdi-api-2.0.SP1.jar
R modules/org.openbravo.base.weld/lib/runtime/javax.inject-1.jar
R modules/org.openbravo.base.weld/lib/runtime/jboss-annotations-api_1.3_spec-1.0.0.Final.jar
R modules/org.openbravo.base.weld/lib/runtime/jboss-interceptors-api_1.2_spec-1.0.0.Final.jar
R modules/org.openbravo.base.weld/lib/runtime/weld-api-3.1.Final.jar
R modules/org.openbravo.base.weld/lib/runtime/weld-core-impl-3.1.1.Final.jar
R modules/org.openbravo.base.weld/lib/runtime/weld-environment-common-3.1.1.Final.jar
R modules/org.openbravo.base.weld/lib/runtime/weld-jsf-3.1.1.Final.jar
R modules/org.openbravo.base.weld/lib/runtime/weld-servlet-core-3.1.1.Final.jar
R modules/org.openbravo.base.weld/lib/runtime/weld-spi-3.1.Final.jar
R modules/org.openbravo.base.weld/lib/runtime/weld-web-3.1.1.Final.jar
---
(0129559)
hgbot (developer)
2021-06-16 12:58

Repository: https://gitlab.com/openbravo/tools/platform/dependencies [^]
Changeset: cf9b6cbe81abe09c7cbabbea10a1104bb0943444
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 2021-06-16T10:57:45+00:00
URL: https://gitlab.com/openbravo/tools/platform/dependencies/-/commit/cf9b6cbe81abe09c7cbabbea10a1104bb0943444 [^]

ISSUE-45594: weld updated to 3.1.7

---
M build.gradle
---
(0129560)
hgbot (developer)
2021-06-16 12:58

Merge request merged: https://gitlab.com/openbravo/tools/platform/dependencies/-/merge_requests/2 [^]

- Issue History
Date Modified Username Field Change
2020-12-16 16:00 shuehner New Issue
2020-12-16 16:00 shuehner Assigned To => platform
2020-12-16 16:00 shuehner Modules => Core
2020-12-16 16:00 shuehner Triggers an Emergency Pack => No
2020-12-16 16:00 shuehner Relationship added depends on 0045593
2020-12-16 16:01 shuehner Note Added: 0124888
2020-12-16 16:24 shuehner Relationship added related to 0040840
2020-12-16 16:26 shuehner Note Added: 0124889
2021-02-16 11:42 shuehner Note Added: 0126124
2021-02-16 12:09 shuehner Note Edited: 0126124 View Revisions
2021-02-16 12:11 shuehner Target Version => PR21Q2
2021-02-22 12:57 shuehner Note Added: 0126264
2021-03-31 06:59 alostale Target Version PR21Q2 => PR21Q3
2021-06-08 08:51 alostale Status new => scheduled
2021-06-08 08:51 alostale Assigned To platform => alostale
2021-06-08 08:58 alostale Relationship added blocks 0045903
2021-06-08 15:26 hgbot Note Added: 0129200
2021-06-09 08:01 hgbot Note Added: 0129218
2021-06-11 17:45 shuehner Relationship added blocks 0047090
2021-06-16 12:57 hgbot Resolution open => fixed
2021-06-16 12:57 hgbot Status scheduled => closed
2021-06-16 12:57 hgbot Note Added: 0129556
2021-06-16 12:57 hgbot Fixed in Version => PR21Q3
2021-06-16 12:57 hgbot Note Added: 0129557
2021-06-16 12:58 hgbot Note Added: 0129559
2021-06-16 12:58 hgbot Note Added: 0129560


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker