Closed akrherz closed 2 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)
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.
GET /plugins/restapi/v1/users HTTP/1.1 Host: xx.xx.xx.xx:9090 User-Agent: curl/7.64.0 Accept: / Authorization: yyyyyyyyyyyyyyyyyyyy
2020.07.19 21:33:26 INFO [Jetty-QTP-AdminConsole-16529]: org.jivesoftware.openfire.plugin.rest.controller.UserServiceController - Get all users 2020.07.19 21:33:26 DEBUG [Jetty-QTP-AdminConsole-16529]: org.jivesoftware.openfire.user.DefaultUserProvider - Results: 6 2020.07.19 21:33:26 DEBUG [Jetty-QTP-AdminConsole-16529]: org.jivesoftware.openfire.user.DefaultUserProvider - getUsers results: admin,focus,jigasi,master2,testerprod,testerprod-2,. 2020.07.19 21:33:26 ERROR [Jetty-QTP-AdminConsole-16529]: com.sun.jersey.spi.container.ContainerResponse - Mapped exception to response: 500 (Internal Server Error) javax.ws.rs.WebApplicationException: javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
- with linked exception: [java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory]
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 :( :( :(
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.
Starting up current openfire master build on OpenJDK 11 yields