You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Rainer Jung <ra...@kippdata.de> on 2019/01/27 00:18:18 UTC

TC 9 plus Java 11 illegal reflective access during unit tests

Hi there,

FYI: during unit tests run (testing tcnative) for TC trunk I get the 
following warnings when testing with Java 11:

166 x WARNING: Illegal reflective access by 
org.apache.catalina.loader.WebappClassLoaderBase 
(file:/.../output/classes/) to field 
java.io.ObjectStreamClass$Caches.localDescs
   6 x WARNING: Illegal reflective access by 
net.sf.cglib.core.ReflectUtils$2 
(file:/.../cglib-2.2.2/cglib-nodep-2.2.2.jar) to method 
java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
   1 x WARNING: Illegal reflective access by 
org.apache.catalina.loader.WebappClassLoaderBase 
(file:/.../output/classes/) to field java.lang.Thread.target
   1 x WARNING: Illegal reflective access by 
org.apache.catalina.loader.WebappClassLoaderBase 
(file:/.../output/classes/) to field 
java.util.TimerThread.newTasksMayBeScheduled

in combination with

WARNING: An illegal reflective access operation has occurred
WARNING: Please consider reporting this to the maintainers of ...
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

Probably know to you and maybe not something to worry right now, but I 
don't know for which future version "will be denied in a future release" 
will become true.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: TC 9 plus Java 11 illegal reflective access during unit tests

Posted by Mark Thomas <ma...@apache.org>.
On 27/01/2019 00:18, Rainer Jung wrote:
> Hi there,
> 
> FYI: during unit tests run (testing tcnative) for TC trunk I get the
> following warnings when testing with Java 11:
> 
> 166 x WARNING: Illegal reflective access by
> org.apache.catalina.loader.WebappClassLoaderBase
> (file:/.../output/classes/) to field
> java.io.ObjectStreamClass$Caches.localDescs
>   6 x WARNING: Illegal reflective access by
> net.sf.cglib.core.ReflectUtils$2
> (file:/.../cglib-2.2.2/cglib-nodep-2.2.2.jar) to method
> java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
> 
>   1 x WARNING: Illegal reflective access by
> org.apache.catalina.loader.WebappClassLoaderBase
> (file:/.../output/classes/) to field java.lang.Thread.target
>   1 x WARNING: Illegal reflective access by
> org.apache.catalina.loader.WebappClassLoaderBase
> (file:/.../output/classes/) to field
> java.util.TimerThread.newTasksMayBeScheduled
> 
> in combination with
> 
> WARNING: An illegal reflective access operation has occurred
> WARNING: Please consider reporting this to the maintainers of ...
> 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
> 
> Probably know to you and maybe not something to worry right now, but I
> don't know for which future version "will be denied in a future release"
> will become true.

Yes, these results are expected. It might be worth starting a discussion
with the OpenJDK folks about alternative APIs for these.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org