如何在Google云平台上连接Mlab?

时间:2016-11-27 07:00:26

标签: google-app-engine deployment google-cloud-datastore gcp mlab

如何在谷歌云平台上连接mlab?我正在接受错误..

来自servlet的未捕获异常 java.lang.NoClassDefFoundError:java.lang.management.ManagementFactory是一个受限制的类。有关详细信息,请参阅Google App Engine开发人员指南。     在com.google.apphosting.runtime.security.shared.stub.java.lang.management.ManagementFactory。(ManagementFactory.java)     在org.springframework.context.support.LiveBeansView.registerApplicationContext(LiveBeansView.java:65)     在org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:779)     在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:485)     at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)     在org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)     在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)     在org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)     在org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)     在org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)     在com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:203)     在com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:176)     在com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:133)     在com.google.apphosting.runtime.JavaRuntime $ RequestRunnable.run(JavaRuntime.java:511)     在com.google.tracing.TraceContext $ TraceContextRunnable.runInContext(TraceContext.java:446)     在com.google.tracing.TraceContext $ TraceContextRunnable $ 1.run(TraceContext.java:453)     在com.google.tracing.CurrentContext.runInContext(CurrentContext.java:274)     在com.google.tracing.TraceContext $ AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:312)     在com.google.tracing.TraceContext $ AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:304)     在com.google.tracing.TraceContext $ TraceContextRunnable.run(TraceContext.java:450)     在com.google.apphosting.runtime.ThreadGroupPool $ PoolEntry.run(ThreadGroupPool.java:235)     在java.lang.Thread.run(Thread.java:745)

1 个答案:

答案 0 :(得分:0)

您使用的是不适用于App Engine Standard的库。您需要咨询您的提供商,看看是否有可以使用的App Engine Standard兼容库,或者查看使用App Engine Flex,Compute Engine或Container Engine等其他计算环境。

赠品是:java.lang.management.ManagementFactory is a restricted class. Please see the Google App Engine developer's guide for more details。正如您在JRE Class white-list中看到的那样 - App Engine Standard沙箱中不支持它。