Translate

2016년 6월 6일 월요일

[GAE] 서비스 기동 시 'Problem accessing /. Reason' 발생하는 문제





OS: ubuntu 15.10 gnome
Tool: IntelliJ IDEA 2016.1.1 (#IU-145.597)
GAE: Google App Engine 1.9.34




문제

IntelliJ 에서 Spring 셋팅 후 GAE(Google App Engine) Dev Server 로 기동 시 아래와 같은 모습이 보여졌다.





HTTP ERROR 503

Problem accessing /. Reason:
    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 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.handler.MappedInterceptor#0': Cannot create inner bean '(inner bean)#63b1d4fa' of type [org.springframework.web.servlet.handler.ConversionServiceExposingInterceptor] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#63b1d4fa': Cannot resolve reference to bean 'org.springframework.format.support.FormattingConversionServiceFactoryBean#0' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.format.support.FormattingConversionServiceFactoryBean#0': Invocation of init method 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.

Caused by:

javax.servlet.UnavailableException: 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 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.handler.MappedInterceptor#0': Cannot create inner bean '(inner bean)#63b1d4fa' of type [org.springframework.web.servlet.handler.ConversionServiceExposingInterceptor] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#63b1d4fa': Cannot resolve reference to bean 'org.springframework.format.support.FormattingConversionServiceFactoryBean#0' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.format.support.FormattingConversionServiceFactoryBean#0': Invocation of init method 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.
 at org.mortbay.jetty.servlet.ServletHolder.makeUnavailable(ServletHolder.java:415)
 at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:458)
 at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263)
 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
 at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
 at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
 at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
 at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
 at org.mortbay.jetty.Server.doStart(Server.java:224)
 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
 at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:273)
 at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:283)
 at com.google.appengine.tools.development.AutomaticInstanceHolder.startUp(AutomaticInstanceHolder.java:26)
 at com.google.appengine.tools.development.AbstractModule.startup(AbstractModule.java:87)
 at com.google.appengine.tools.development.Modules.startup(Modules.java:105)
 at com.google.appengine.tools.development.DevAppServerImpl.doStart(DevAppServerImpl.java:258)
 at com.google.appengine.tools.development.DevAppServerImpl.access$000(DevAppServerImpl.java:47)
 at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:213)
 at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:211)
 at java.security.AccessController.doPrivileged(Native Method)
 at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:211)
 at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:277)
 at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
 at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:225)
 at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:216)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)

Powered by Jetty://








해결


인터넷을 찾아보니 두가지 방법이 나왔다.
1004lucifer
1. jetty 버전 업데이트
2. JAVA JDK 버전 변경


jetty 를 내가 직접 설정하여 쓰는게 아니다보니 나는 두번째 방법을 선택했다.





PS.
Maven 에 jetty를 설정한 경우라면 jetty 버전을 변경해 보거나
GAE를 command 로 실행시킨 경우라면 JAVA_HOME 을 변경하면 해결 할 수 있을 것 같다.





참고: http://stackoverflow.com/questions/9565273/google-app-engine-service-unavailable


댓글 없음 :

댓글 쓰기