【问题标题】:How to deal with App Engine Devserver exception due to FormatStyle restricted class?由于 FormatStyle 受限类,如何处理 App Engine Devserver 异常?
【发布时间】:2015-04-09 02:10:58
【问题描述】:

使用 Spring MVC 开发 Google App Engine 应用程序,在 OSX 上运行开发服务器时出现以下异常:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0':
Initialization of bean failed [...]    


nested exception is java.lang.NoClassDefFoundError:
java.time.format.FormatStyle is a restricted class. Please see the
Google  App Engine developer's guide for more details.

如果我将我的应用上传到 Google App Engine 的云服务器,则不会出现此错误。

如何解决?

【问题讨论】:

标签: google-app-engine spring-mvc


【解决方案1】:

将 Java 1.8 降级到 1.7 解决了这个问题。

【讨论】:

  • 嗨 Matoe,我遇到了同样的问题。在此期间您是否设法找到另一个解决方案?最好的问候
  • 请参阅下面的评论。在 appengine-web.xml 中使用 java8 将修复此错误。
【解决方案2】:

嗯,这不是大多数人会寻找的答案。以下是解决问题的解决方案。

使用 <runtime>java8</runtime> appengine-web.xml

这将解决问题。这不需要您将 java 版本从 1.8 降级到 1.7。

【讨论】:

    猜你喜欢
    • 2013-09-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-03-03
    • 1970-01-01
    • 2015-08-12
    • 2023-03-04
    • 1970-01-01
    相关资源
    最近更新 更多