我尝试使用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)
如何解决此问题?
答案 0 :(得分:1)
我昨天将this app部署到了GAE(来自主人),并且运行正常(即使您遇到记录器问题也没有任何迹象)。那么区别是什么?我确实也必须对Boot master进行一些更改,但是从未看到过类没有找到的问题。
答案 1 :(得分:0)
错误消息中的行"java.lang.NoClassDefFoundError: javax.management.MBeanServerFactory is a restricted class. Please see the Google App Engine developer's guide for more details."
是由于Google应用引擎的限制造成的。
应用引擎不允许您的应用访问javax.management.*
。