Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger-play2-util IllegalAccessError on health status #93

Closed
akkie opened this issue Dec 19, 2012 · 6 comments
Closed

Swagger-play2-util IllegalAccessError on health status #93

akkie opened this issue Dec 19, 2012 · 6 comments

Comments

@akkie
Copy link
Contributor

akkie commented Dec 19, 2012

I get the following exception if I try to get the health status of my application:

! @6cl8bmceg - Internal server error, for request [GET /admin.json/health] ->

play.core.ActionInvoker$$anonfun$receive$1$$anon$1: Execution exception [[IllegalAccessError: tried to access class sun.management.ManagementFactory from class com.wordnik.util.perf.HealthSnapshot$]]
    at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:134) [play_2.9.1.jar:2.0.4]
    at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:115) [play_2.9.1.jar:2.0.4]
    at akka.actor.Actor$class.apply(Actor.scala:318) [akka-actor.jar:2.0.2]
    at play.core.ActionInvoker.apply(Invoker.scala:113) [play_2.9.1.jar:2.0.4]
    at akka.actor.ActorCell.invoke(ActorCell.scala:626) [akka-actor.jar:2.0.2]
    at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:197) [akka-actor.jar:2.0.2]
    at akka.dispatch.Mailbox.run(Mailbox.scala:179) [akka-actor.jar:2.0.2]
    at akka.dispatch.ForkJoinExecutorConfigurator$MailboxExecutionTask.exec(AbstractDispatcher.scala:516) [akka-actor.jar:2.0.2]
    at akka.jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:259) [akka-actor.jar:2.0.2]
    at akka.jsr166y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:975) [akka-actor.jar:2.0.2]
    at akka.jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1479) [akka-actor.jar:2.0.2]
    at akka.jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104) [akka-actor.jar:2.0.2]
Caused by: java.lang.IllegalAccessError: tried to access class sun.management.ManagementFactory from class com.wordnik.util.perf.HealthSnapshot$
    at com.wordnik.util.perf.HealthSnapshot$.get(Health.scala:69) ~[common-utils_2.9.1-1.1.4.jar:1.1.4]
    at controllers.HealthController$$anonfun$getHealth$1.apply(HealthController.scala:36) ~[swagger-play2-utils_2.9.1-1.2.0.jar:1.2.0]
    at controllers.HealthController$$anonfun$getHealth$1.apply(HealthController.scala:34) ~[swagger-play2-utils_2.9.1-1.2.0.jar:1.2.0]
    at play.api.mvc.Action$$anon$1.apply(Action.scala:170) ~[play_2.9.1.jar:2.0.4]
    at play.core.ActionInvoker$$anonfun$receive$1$$anonfun$6.apply(Invoker.scala:126) ~[play_2.9.1.jar:2.0.4]
    at play.core.ActionInvoker$$anonfun$receive$1$$anonfun$6.apply(Invoker.scala:126) ~[play_2.9.1.jar:2.0.4]
    at play.utils.Threads$.withContextClassLoader(Threads.scala:17) ~[play_2.9.1.jar:2.0.4]
    at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:125) [play_2.9.1.jar:2.0.4]
    ... 11 common frames omitted

Ping works as expected.

@fehguy
Copy link
Contributor

fehguy commented Dec 19, 2012

Are you running Java 7?

@akkie
Copy link
Contributor Author

akkie commented Dec 20, 2012

@fehguy Yes I'm running Java 7. Is this incompatible?

@fehguy
Copy link
Contributor

fehguy commented Dec 26, 2012

there's a new api for that info with java 7, we'll get it updated shortly.

@agarbutt
Copy link

@fehguy i see the last time this issue was updated was about a month ago. Is there a chance that this has been resolved and not marked as so?

@fehguy
Copy link
Contributor

fehguy commented Jan 26, 2013

hi, still not resolved but will be.

@fehguy fehguy modified the milestone: v1.2.1 Sep 19, 2014
@fehguy fehguy added this to the v1.3.12 milestone Dec 20, 2014
@fehguy
Copy link
Contributor

fehguy commented Dec 21, 2014

Verified no longer an issue

@fehguy fehguy closed this as completed Dec 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants