You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2020/06/11 18:44:58 UTC

[Bug 64518] New: Illegal reflective access by WebappClassLoaderBase$1 - embedded tomcat with resteasy

https://bz.apache.org/bugzilla/show_bug.cgi?id=64518

            Bug ID: 64518
           Summary: Illegal reflective access by WebappClassLoaderBase$1 -
                    embedded tomcat with resteasy
           Product: Tomcat 7
           Version: 7.0.104
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: michael.enke@wincor-nixdorf.com
  Target Milestone: ---

Created attachment 37309
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37309&action=edit
source+compiled class files and some jars to reproduce the problem

There is a bug report with title "Illegal reflective access by
WebappClassLoaderBase$1 in Java 13":
<a href="https://bz.apache.org/bugzilla/show_bug.cgi?id=63838">63838</a> which
is fixed.<br>
I found the same warning when using embedded tomcat 7 with resteasy servlet.
Attached source and run.bat to reproduce the problem.
Due to file size limitation of attachmed file I did not include the embedded
tomcat 7 release 104 jar files (which has to  be put into tomcat7 dir)
as well as resteasy-jaxrs-3.5.0.Final.jar (which has to be put int rest dir).

Output of starting run.bat:

C:\Temp\test>run
Juni 11, 2020 8:32:06 NACHM. org.apache.coyote.AbstractProtocol init
INFORMATION: Initializing ProtocolHandler ["http-bio-8080"]
Juni 11, 2020 8:32:06 NACHM. org.apache.catalina.core.StandardService
startInternal
INFORMATION: Starting service [Tomcat]
Juni 11, 2020 8:32:06 NACHM. org.apache.catalina.core.StandardEngine
startInternal
INFORMATION: Starting Servlet Engine: Apache Tomcat/7.0.104
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by
org.apache.catalina.loader.WebappClassLoaderBase$1
(file:/C:/Temp/test/tomcat7/tomcat-embed-core.jar) to method
java.lang.ClassLoader.registerAsParallelCapable()
WARNING: Please consider reporting this to the maintainers of
org.apache.catalina.loader.WebappClassLoaderBase$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal
reflective access operations
WARNING: All illegal access operations will be denied in a future release
...

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64518] Illegal reflective access by WebappClassLoaderBase$1 - embedded tomcat with resteasy

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64518

Michael Enke <mi...@wincor-nixdorf.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |michael.enke@wincor-nixdorf
                   |                            |.com

--- Comment #1 from Michael Enke <mi...@wincor-nixdorf.com> ---
Created attachment 37310
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37310&action=edit
the missing resteasy jar file from test.zip

Since the sile size is limited to 1000 KB I couldn't add this jar file into
test.zip

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64518] Illegal reflective access by WebappClassLoaderBase$1 - embedded tomcat with resteasy

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64518

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WONTFIX
                 OS|                            |All
             Status|NEW                         |RESOLVED

--- Comment #2 from Mark Thomas <ma...@apache.org> ---
If you run Tomcat in embedded mode on Java 9 onwards then you need to start it
with the same options to avoid those warnings.

https://github.com/apache/tomcat/blob/7.0.x/bin/catalina.sh#L322

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org