How to deal with App Engine Devserver exception du

2019-09-18 03:40发布

Developing a Google App Engine app with Spring MVC, the following exception presents itself while running the dev server on 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.

This error does not present itself if I upload my app to Google App Engine's cloud server.

How to get around it?

2条回答
做个烂人
2楼-- · 2019-09-18 04:25

Well, that is not the answer most people would look for. Following is the solution to fix the problem.

use <runtime>java8</runtime> in appengine-web.xml

This will fix the problem. This doesn't require you to downgrade you java version from 1.8 to 1.7.

查看更多
相关推荐>>
3楼-- · 2019-09-18 04:27

Downgrading Java 1.8 to 1.7 fixed the issue.

查看更多
登录 后发表回答