JDK11 问题 An illegal reflective access operation has occurred

问题

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/C:/Users/Administrator/.gradle/caches/modules-2/files-2.1/com.google.protobuf/protobuf-java/3.0.0/6d325aa7c921661d84577c0a93d82da4df9fa4c8/protobuf-java-3.0.0.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
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

原因

caused by the use of internal JDK API in CGLIB, You may safely ignore this for the time being; a Spring Framework 4.3 based application will nevertheless run fine.
For full JDK 9+ support, please upgrade to Spring Framework 5.1+ / Spring Boot 2.1+. quoto

JDK9+对一些API进行了调整,但是老版本的软件运行还是会调用这些API,官方不建议这么做然后给出警告

解决方法

WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil ——代码第三行指出哪个依赖调用了这个API 升级它,或替换它即可
或者选择无视(不建议

可能有用的站点

https://github.com/gradle/gradle/issues/2995
https://github.com/spring-projects/spring-framework/issues/22674

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章