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

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