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-02-22 12:57
ReportershuehnerView Statuspublic 
Assigned Toplatform 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget VersionPR21Q2
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 acknowledgedplatform Illegal Access warning in weld-core-impl-3.1.1.Final.jar using JDK12+ 
depends on feature request 0045593 newplatform Support JDK16 
Not all the children of this issue are yet resolved or closed.

-  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 [^]

- 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker