Bug 2107520

Summary: An illegal reflective access operation has occurred from tomcat during start
Product: Red Hat Satellite Reporter: Jan Jansky <jjansky>
Component: InstallerAssignee: satellite6-bugs <satellite6-bugs>
Status: NEW --- QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.10.7CC: arsingh, ehelms, nmoumoul, redakkan
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Jansky 2022-07-15 10:54:05 UTC
Description of problem:
During every start of tomcat on Satellite 6.10.z i can see the WARNING about Illegal access as below

Jul 15 12:47:17 satellite.example.com server[6103]: Jul 15, 2022 12:47:17 PM org.apache.coyote.AbstractProtocol init
Jul 15 12:47:17 satellite.example.com server[6103]: INFO: Initializing ProtocolHandler ["http-bio-127.0.0.1-23443"]
Jul 15 12:47:17 satellite.example.com server[6103]: Jul 15, 2022 12:47:17 PM org.apache.catalina.startup.Catalina load
Jul 15 12:47:17 satellite.example.com server[6103]: INFO: Initialization processed in 1322 ms
Jul 15 12:47:18 satellite.example.com server[6103]: Jul 15, 2022 12:47:18 PM org.apache.catalina.core.StandardService startInternal
Jul 15 12:47:18 satellite.example.com server[6103]: INFO: Starting service Catalina
Jul 15 12:47:18 satellite.example.com server[6103]: Jul 15, 2022 12:47:18 PM org.apache.catalina.core.StandardEngine startInternal
Jul 15 12:47:18 satellite.example.com server[6103]: INFO: Starting Servlet Engine: Apache Tomcat/7.0.76
Jul 15 12:47:18 satellite.example.com server[6103]: Jul 15, 2022 12:47:18 PM org.apache.catalina.startup.HostConfig deployDirectory
Jul 15 12:47:18 satellite.example.com server[6103]: INFO: Deploying web application directory /var/lib/tomcat/webapps/candlepin
Jul 15 12:47:18 satellite.example.com server[6103]: WARNING: An illegal reflective access operation has occurred
Jul 15 12:47:18 satellite.example.com server[6103]: WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase$1 (file:/usr/share/java/tomcat/catalina.jar) to method java.lang.ClassLoader.registerAsParallelCapable()
Jul 15 12:47:18 satellite.example.com server[6103]: WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase$1
Jul 15 12:47:18 satellite.example.com server[6103]: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
Jul 15 12:47:18 satellite.example.com server[6103]: WARNING: All illegal access operations will be denied in a future release


Version-Release number of selected component (if applicable):
my lab satellite -> 
java-11-openjdk-11.0.15.0.9-2.el7_9.x86_64
java-11-openjdk-headless-11.0.15.0.9-2.el7_9.x86_64
java-1.8.0-openjdk-1.8.0.332.b09-1.el7_9.x86_64
java-1.8.0-openjdk-headless-1.8.0.332.b09-1.el7_9.x86_64
java-client-1.0-1.noarch
javamail-1.4.6-8.el7.noarch
javapackages-tools-3.4.1-11.el7.noarch
satellite-6.10.6-1.el7sat.noarch
satellite-cli-6.10.6-1.el7sat.noarch
satellite-common-6.10.6-1.el7sat.noarch
satellite-installer-6.10.0.7-1.el7sat.noarch
satellite-maintain-0.0.1-1.el7sat.noarch
tomcat-7.0.76-16.el7_9.noarch
tomcat-el-2.2-api-7.0.76-16.el7_9.noarch
tomcat-jsp-2.2-api-7.0.76-16.el7_9.noarch
tomcatjss-7.2.5-1.el7.noarch
tomcat-lib-7.0.76-16.el7_9.noarch
tomcat-servlet-3.0-api-7.0.76-16.el7_9.noarch

another satellite ->
java-11-openjdk-11.0.15.0.9-2.el7_9.x86_64
java-11-openjdk-headless-11.0.15.0.9-2.el7_9.x86_64
java-1.8.0-openjdk-1.8.0.332.b09-1.el7_9.x86_64
java-1.8.0-openjdk-headless-1.8.0.332.b09-1.el7_9.x86_64
java-client-1.0-2.noarch
javamail-1.4.6-8.el7.noarch
javapackages-tools-3.4.1-11.el7.noarch
satellite-6.10.6-1.el7sat.noarch
satellite-cli-6.10.6-1.el7sat.noarch
satellite-common-6.10.6-1.el7sat.noarch
satellite-installer-6.10.0.7-1.el7sat.noarch
satellite-maintain-0.0.1-1.el7sat.noarch
tomcat-7.0.76-16.el7_9.noarch
tomcat-el-2.2-api-7.0.76-16.el7_9.noarch
tomcat-jsp-2.2-api-7.0.76-16.el7_9.noarch
tomcatjss-7.2.5-1.el7.noarch
tomcat-lib-7.0.76-16.el7_9.noarch
tomcat-servlet-3.0-api-7.0.76-16.el7_9.noarch


How reproducible:

Start/Restart tomcat service.


Steps to Reproduce:
1. systemctl restart tomcat

Actual results:
Jul 15 12:47:18 satellite.example.com server[6103]: WARNING: An illegal reflective access operation has occurred
Jul 15 12:47:18 satellite.example.com server[6103]: WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase$1 (file:/usr/share/java/tomcat/catalina.jar) to method java.lang.ClassLoader.registerAsParallelCapable()
Jul 15 12:47:18 satellite.example.com server[6103]: WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase$1
Jul 15 12:47:18 satellite.example.com server[6103]: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
Jul 15 12:47:18 satellite.example.com server[6103]: WARNING: All illegal access operations will be denied in a future release

Expected results:
No Warnings (at least contain illegal word)

Comment 3 Nikos Moumoulidis 2022-07-29 11:11:02 UTC
If you want to suppress these warnings (which are benign), just add append the options '--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED' to the JAVA_OPTS property in /etc/tomcat/tomcat.conf.

Moving this to the installer component since that is where the tomcat configuration lives.