management。MBeanServerFactory是一个受限制的类

时间:2022-10-26 20:33:58

I'm trying to make spring boot work with GAE, however when I run appengine:devserver the app throws:

我试着让spring引导与GAE一起工作,但是当我运行appengine:devserver应用程序抛出:

[INFO] Jun 03, 2014 11:43:26 AM com.google.apphosting.utils.jetty.JettyLogger warn
[INFO] WARNING: Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'endpointMBeanExporter' defined in class path resource [org/springframework/boot/actuate/autoconfigure/EndpointMBeanExportAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax.management.MBeanServerFactory is a restricted class. Please see the Google  App Engine developer's guide for more details.:
[INFO] java.lang.NoClassDefFoundError: javax.management.MBeanServerFactory is a restricted class. Please see the Google  App Engine developer's guide for more details.
[INFO]  at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
[INFO]  at org.springframework.jmx.support.JmxUtils.locateMBeanServer(JmxUtils.java:106)
[INFO]  at org.springframework.jmx.support.JmxUtils.locateMBeanServer(JmxUtils.java:86)
[INFO]  at org.springframework.jmx.export.MBeanExporter.afterPropertiesSet(MBeanExporter.java:413)
[INFO]  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$6.run(AbstractAutowireCapableBeanFactory.java:1602)
[INFO]  at java.security.AccessController.doPrivileged(Native Method)
[INFO]  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1599)
[INFO]  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
[INFO]  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
[INFO]  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
[INFO]  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
[INFO]  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
[INFO]  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
[INFO]  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
[INFO]  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703)
[INFO]  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
[INFO]  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)

How to I work-around this issue?

我如何解决这个问题?

2 个解决方案

#1


1  

I deployed this app yesterday to GAE (from master) and it's running fine (no sign even of the logger issue you were having). So what's the difference? I did have to make some changes to Boot master too, but never saw the class not found issues that you do.

我昨天将这个应用部署到GAE(来自master),它运行得很好(甚至没有您遇到的日志记录问题的迹象)。所以有什么区别呢?我也必须对Boot master做一些更改,但是从来没有看到类没有发现您所做的问题。

#2


0  

The line "java.lang.NoClassDefFoundError: javax.management.MBeanServerFactory is a restricted class. Please see the Google App Engine developer's guide for more details." in your error message is due to the Google app engine's restriction.

. lang线”。NoClassDefFoundError:management。MBeanServerFactory是一个受限制的类。在你的错误信息中是由于谷歌应用引擎的限制。

Reference

参考

App engine doesn't allow your application to access javax.management.* .

App engine不允许应用程序访问javax.management。*。

#1


1  

I deployed this app yesterday to GAE (from master) and it's running fine (no sign even of the logger issue you were having). So what's the difference? I did have to make some changes to Boot master too, but never saw the class not found issues that you do.

我昨天将这个应用部署到GAE(来自master),它运行得很好(甚至没有您遇到的日志记录问题的迹象)。所以有什么区别呢?我也必须对Boot master做一些更改,但是从来没有看到类没有发现您所做的问题。

#2


0  

The line "java.lang.NoClassDefFoundError: javax.management.MBeanServerFactory is a restricted class. Please see the Google App Engine developer's guide for more details." in your error message is due to the Google app engine's restriction.

. lang线”。NoClassDefFoundError:management。MBeanServerFactory是一个受限制的类。在你的错误信息中是由于谷歌应用引擎的限制。

Reference

参考

App engine doesn't allow your application to access javax.management.* .

App engine不允许应用程序访问javax.management。*。