powered by Jive Software

Getting 500 http error for restApi plugin

Hi all,

I am using openfire v4.16 build using eclipse, using restApi plugin v 1.2.5 and build using JDK 1.8.
While making restAPI call to URL “http:localhost:9090/plugins/restapi/v1/users” getting below error. Please help me to resolve the issue.

Error 500 Server Error

HTTP ERROR 500

Problem accessing /plugins/restapi/v1/users. Reason:

        <pre>    Server Error</pre>
    </p>
    <h3>Caused by:</h3>
    <pre>java.lang.AbstractMethodError: javax.ws.rs.core.UriBuilder.uri(Ljava/lang/String;)Ljavax/ws/rs/core/UriBuilder;
at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:119)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:651)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.jivesoftware.openfire.container.PluginServlet.handleServlet(PluginServlet.java:410)
at org.jivesoftware.openfire.container.PluginServlet.service(PluginServlet.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:226)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:165)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Thread.java:748)

Powered by Jetty://

I met the same problem.:joy:

Any update?. Required to resolve the issue immediately.

Was it working with a previous version of Openfire?
To better understand the problem, it would be very helpfull if you could provide your request (with payload, headers etc)

Hi, Thanks for the reply. Please check the attachment that I sending request using postman.
I did not checked for the old version of Openfire since I am new to Openfire testing with the latest version.

If you want to get the Users, you need to use “GET” instead of “POST”.
And remove the content type.

You can find Further documentation here:
https://www.igniterealtime.org/projects/openfire/plugins/restapi/readme.html#retrieve-users

I tried with get also but same response. Is there any problem with jersey jar file in restApi plugin.

Hey guys. Can I get any help for the above issue. Do I need to change Jersey library to v2.*?

I got the reason. The plugin can not run in the eclipse. It is ok if the openfire runs in a standalone application.

However, how to debug with the plugin with eclipse?:joy:

Also having the same problem; all requests generate a HTTP 500 Error; same issue is occurring with 1.3.0; last time the plugin worked was in October.I reverted back to version 1.2.4 and my api calls are functioning again.

Same here… All requests return error 500 :frowning: