0
votes

How to connect mlab on google cloud platform? I am gettting error..

Uncaught exception from servlet java.lang.NoClassDefFoundError: java.lang.management.ManagementFactory is a restricted class. Please see the Google App Engine developer's guide for more details. at com.google.apphosting.runtime.security.shared.stub.java.lang.management.ManagementFactory.(ManagementFactory.java) at org.springframework.context.support.LiveBeansView.registerApplicationContext(LiveBeansView.java:65) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:779) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:485) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548) at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:203) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:176) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:133) at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:511) at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:446) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:453) at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:274) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:312) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:304) at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:450) at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:235) at java.lang.Thread.run(Thread.java:745)

1
'mlab' can mean many things, so you need to expand on your question with more information.Dan McGrath

1 Answers

0
votes

You are using a library that doesn't work on App Engine Standard. You need to check with your provider to see if there is an App Engine Standard compatible library you can use, or look at using a different compute environment like App Engine Flex, Compute Engine, or Container Engine.

The give-away is: java.lang.management.ManagementFactory is a restricted class. Please see the Google App Engine developer's guide for more details. As you can see from this JRE Class white-list - it isn't supported in the App Engine Standard sandbox.