Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039372Openbravo ERPA. Platformpublic2018-09-28 09:482018-10-11 10:52
alostale 
alostale 
normalminorhave not tried
closedfixed 
5
 
3.0PR18Q43.0PR18Q4 
caristu
Core
No
0039372: Illegal Access warning in ant tasks
When executing some ant tasks with a JDK >=9 an Illegal Access warning is seen.
The following flows are affected:
- install.source
- smartbuild
- update.database

Note there might be others that are also affected, but as they are not that common, and technically require a different and more complex solution (they are not executed in a different forked jvm where it's easy to set params), they will not fix within patch for this issue.
Until a proper fix is done by updating dependencies making those illegal accesses, open up the required modules with --add-open jvm argument in those tasks making use of it.

Note. Include the argument in an ant property (jvm.arg.line) so that:
  * By default, if JDK is 9+ required modules are opened
  * It is possible to overwrite that property in command line to, for example see all occurrences of this problem. Ie.:
ant generate.entities.quick -Djvm.arg.line='--illegal-access=debug'
would display a warning including stack trace on each occurrence.

---
[1] https://docs.oracle.com/javase/9/tools/java.htm#JSWOR624 [^]
No tags attached.
related to defect 0040649 closed alostale no need to open modules for reflection in build tasks 
blocks design defect 0039031 new Triage Platform Base Tracking issue: Remove illegal access warnings shown since java9 by updating affected jar libraries 
Issue History
2018-09-28 09:48alostaleNew Issue
2018-09-28 09:48alostaleAssigned To => platform
2018-09-28 09:48alostaleModules => Core
2018-09-28 09:48alostaleTriggers an Emergency Pack => No
2018-09-28 10:28alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17709#r17709
2018-09-28 10:28alostaleRelationship addedblocks 0039031
2018-09-28 11:23alostaleAssigned Toplatform => alostale
2018-09-28 11:27alostaleReview Assigned To => caristu
2018-09-28 11:27alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17710#r17710
2018-09-28 11:27alostaleTarget Version => 3.0PR18Q4
2018-09-28 11:33hgbotCheckin
2018-09-28 11:33hgbotNote Added: 0107065
2018-09-28 11:33hgbotStatusnew => resolved
2018-09-28 11:33hgbotResolutionopen => fixed
2018-09-28 11:33hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a55bab8b0e2fa7a738e1b03b4becbb67dedd2f66 [^]
2018-10-01 11:36hudsonbotCheckin
2018-10-01 11:36hudsonbotNote Added: 0107086
2018-10-11 10:52caristuNote Added: 0107247
2018-10-11 10:52caristuStatusresolved => closed
2018-10-11 10:52caristuFixed in Version => 3.0PR19Q1
2018-10-11 10:52caristuFixed in Version3.0PR19Q1 => 3.0PR18Q4
2019-04-19 08:35alostaleRelationship addedrelated to 0040649

Notes
(0107065)
hgbot   
2018-09-28 11:33   
Repository: erp/devel/pi
Changeset: a55bab8b0e2fa7a738e1b03b4becbb67dedd2f66
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Sep 28 11:29:31 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a55bab8b0e2fa7a738e1b03b4becbb67dedd2f66 [^]

fixed issue 39372: Illegal Access warning in ant tasks

  Fixed for most common build flows.

  Note --add-opens jvm argument can only be set in JDK >= 9, as miniumum supported
  is 8, it's enough checking it.

---
M build.xml
M src/build.xml
---
(0107086)
hudsonbot   
2018-10-01 11:36   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c83c34c74ee4 [^]
Maturity status: Test
(0107247)
caristu   
2018-10-11 10:52   
Code reviewed + tested OK.