HysterixCommand issue running in Google App engine

114 views
Skip to first unread message

Arun Menon

unread,
Feb 24, 2015, 4:54:40 AM2/24/15
to hystr...@googlegroups.com
I am trying to deploy a code where i have added Hysterix Command Objects. When i deploy, i get the following error .Looks like sun.misc.unsafe is not whitelisted in GAE...
Any work-arounds here ?....

Uncaught exception from servlet
java.lang.NoClassDefFoundError: sun.misc.Unsafe is a restricted class. Please see the Google App Engine developer's guide for more details.
at com.google.apphosting.runtime.security.shared.stub.sun.misc.Unsafe.<clinit>(Unsafe.java)
at com.netflix.hystrix.util.Striped64.getUnsafe(Striped64.java:341)
at com.netflix.hystrix.util.Striped64.<clinit>(Striped64.java:321)
at com.netflix.hystrix.util.HystrixRollingNumber$CumulativeSum.<init>(HystrixRollingNumber.java:446)
at com.netflix.hystrix.util.HystrixRollingNumber.<init>(HystrixRollingNumber.java:64)
at com.netflix.hystrix.util.HystrixRollingNumber.<init>(HystrixRollingNumber.java:67)
at com.netflix.hystrix.HystrixCommandMetrics.<init>(HystrixCommandMetrics.java:123)
at com.netflix.hystrix.HystrixCommandMetrics.getInstance(HystrixCommandMetrics.java:71)
at com.netflix.hystrix.HystrixCommand.<init>(HystrixCommand.java:263)
at com.netflix.hystrix.HystrixCommand.<init>(HystrixCommand.java:188)
at com.netflix.hystrix.HystrixCommand.<init>(HystrixCommand.java:170)
at com.espn.commands.GetUserCardCommand.<init>(GetUserCardCommand.java:16)
at com.espncricinfo.gnow.CreateNowCards.sendCard(CreateNowCards.java:398)
at com.espncricinfo.gnow.CreateNowCards.createTableCard(CreateNowCards.java:306)
at com.espncricinfo.gnow.CreateNowCards.processUsers(CreateNowCards.java:240)
at com.espncricinfo.gnow.CreateNowCards.process(CreateNowCards.java:134)
at com.espncricinfo.gnow.CreateNowCards.doGet(CreateNowCards.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:125)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.apphosting.utils.servlet.JdbcMySqlConnectionCleanupFilter.doFilter(JdbcMySqlConnectionCleanupFilter.java:60)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:254)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:146)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:527)
at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:437)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:444)
at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:220)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:308)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:300)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:441)
at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
at java.lang.Thread.run(Thread.java:724)


Matt Jacobs

unread,
Mar 27, 2015, 5:43:29 PM3/27/15
to hystr...@googlegroups.com
Arun -

Thanks for the report.  At the moment, there's no facility in Hystrix to avoid usage of sun.misc.Unsafe.  This sounds like a useful thing to do, but it hasn't been done yet.

Here's an example of the type of work that needs to get done: https://github.com/msgpack/msgpack-java/issues/194.

I've created a Github issue to track this.  https://github.com/Netflix/Hystrix/issues/734

-Matt
Reply all
Reply to author
Forward
0 new messages