igniterealtime / openfire-restAPI-plugin

Allows Openfire administration over a RESTful API.
http://www.igniterealtime.org/projects/openfire/plugin-archive.jsp?plugin=restAPI
Apache License 2.0
19 stars 53 forks source link

Java 11 Jaxb issue #25

Closed akrherz closed 2 years ago

akrherz commented 5 years ago

Starting up current openfire master build on OpenJDK 11 yields

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.sun.xml.bind.v2.runtime.reflect.opt.Injector$1 (file:/opt/openfire/plugins/restapi/lib/jaxb-impl-2.2.3-1.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int)
WARNING: Please consider reporting this to the maintainers of com.sun.xml.bind.v2.runtime.reflect.opt.Injector$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
RunningSquirrel commented 4 years ago

I also meet this error.

System Software Overview: System Version: macOS 10.15.5 (19F101) Kernel Version: Darwin 19.5.0

java version "9.0.1" Java(TM) SE Runtime Environment (build 9.0.1+11) Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

ErwanF76 commented 4 years ago

Hi

I got similar issue using OpenJDK15. Here below an extract of DEBUG traces at OpenFire side when executing a GET request to the RESTFUL API plug-in:


curl -v -X GET -H "Authorization: yyyyyyyyyyyyyyyyyyyy" http://xx.xx.xx.xx:9090/plugins/restapi/v1/users Note: Unnecessary use of -X or --request, GET is already inferred.

This is due to the deprecation then removal of java.xml.bind (JAXB) in release upper than JAVA 8:

One solution could be to integrate Jakarta XML bind: https://search.maven.org/artifact/jakarta.xml.bind/jakarta.xml.bind-api But JAVA package name is different (com.sun.xml.bind any more -> jakarta.xml.bind).

In my opinion, this issue blocks the possibility to use JVM greater than 8, that is really bad :( :( :(

guusdk commented 2 years ago

I suspect that this problem no longer occurs on Openfire 4.6.2 and later, as a result of https://igniterealtime.atlassian.net/browse/OF-2196. In my environment (Openfire 4.7.0-beta on Java 11), this I do not seem to have any issues. Please re-open this issue if you can prove me wrong.