This feels like a classloader problem. Do you have multiple versions of the
json-simple JAR on the classpath? (Including any copies of those classes in
uber-JARs...)

On Mar 7, 2018 7:39 AM, "coopci" <bo.coo...@gmail.com> wrote:

> As subject suggests, http://localhost:8161/api/jolokia/  and
> http://localhost:8161/api/jolokia/read/org.apache.activemq:type=Broker,
> brokerName=localhost
> return a 500 page.
> I’ve tried several POST requests found in
> http://www.jakubkorab.net/2013/11/monitoring-activemq-via-http.html, also
> got this 500 page.
>
> I’m using ActiveMQ 5.14.5.
> JMS and JMX work well.
>
> Can I find any working example under domain name activemq.apache.org?
> http://localhost:8161/api/jolokia/read/org.apache.activemq:type=Broker,
> brokerName=localhost
> is found here: http://activemq.apache.org/rest.html
>
>
> HTTP ERROR 500
> Problem accessing /api/jolokia. Reason:
>     Server Error
>
> Caused by:
> java.lang.IllegalAccessError: tried to access method
> org.json.simple.JSONValue.escape(Ljava/lang/String;
> Ljava/lang/StringBuffer;)V
> from class org.json.simple.JSONObject
>         at org.json.simple.JSONObject.toJSONString(JSONObject.java:116)
>         at org.json.simple.JSONObject.toJSONString(JSONObject.java:101)
>         at org.json.simple.JSONObject.toJSONString(JSONObject.java:108)
>         at org.jolokia.http.AgentServlet.handle(AgentServlet.java:269)
>         at org.jolokia.http.AgentServlet.doGet(AgentServlet.java:221)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>         at org.eclipse.jetty.servlet.ServletHolder.handle(
> ServletHolder.java:808)
>         at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(
> ScopedHandler.java:143)
>         at
> org.eclipse.jetty.security.SecurityHandler.handle(
> SecurityHandler.java:553)
>         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.HandlerCollection.
> handle(HandlerCollection.java:110)
>         at
> org.eclipse.jetty.security.SecurityHandler.handle(
> SecurityHandler.java:553)
>         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:310)
>         at
> org.eclipse.jetty.server.HttpConnection.onFillable(
> HttpConnection.java:257)
>         at
> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
>         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://
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-
> f2341805.html
>

Reply via email to