Tomcatを起動するとこのエラーが発生します
2013-09-26 10:27:24,616 INFO [localhost-startStop-1] UrlRewriteFilter.(Log.java:227) - loaded (conf ok)
2013-09-26 10:27:24,657 DEBUG [localhost-startStop-1] LocaleFilter.(GenericFilterBean.java:172) - Initializing filter 'localeFilter'
2013-09-26 10:27:24,657 DEBUG [localhost-startStop-1] LocaleFilter.(GenericFilterBean.java:197) - Filter 'localeFilter' configured successfully
2013-09-26 10:27:24,693 DEBUG [localhost-startStop-1] SessionFilter.(GenericFilterBean.java:172) - Initializing filter 'sessionFilter'
2013-09-26 10:27:24,694 DEBUG [localhost-startStop-1] SessionFilter.(GenericFilterBean.java:197) - Filter 'sessionFilter' configured successfully
2013-09-26 10:27:24,728 INFO [localhost-startStop-1] ResponseOverrideFilter.(ResponseOverrideFilter.java:108) - Filter initialized. Response buffering is enabled
2013-09-25 19:13:15,856 ERROR [localhost-startStop-1] DispatcherServlet (FrameworkServlet.java:468) - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping': Initialization of bean failed; nested exception is java.lang.VerifyError: Cannot inherit from final class
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:532)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:289)
at org.springframework.web.servlet.DispatcherServlet.createDefaultStrategy(DispatcherServlet.java:810)
at org.springframework.web.servlet.DispatcherServlet.getDefaultStrategies(DispatcherServlet.java:779)
at org.springframework.web.servlet.DispatcherServlet.initHandlerMappings(DispatcherServlet.java:549)
at org.springframework.web.servlet.DispatcherServlet.initStrategies(DispatcherServlet.java:443)
at org.springframework.web.servlet.DispatcherServlet.onRefresh(DispatcherServlet.java:432)
at org.springframework.web.servlet.FrameworkServlet.onApplicationEvent(FrameworkServlet.java:773)
at org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:1063)
at org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:1060)
at org.springframework.context.event.GenericApplicationListenerAdapter.onApplicationEvent(GenericApplicationListenerAdapter.java:51)
Caused by: java.lang.VerifyError: Cannot inherit from final class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2888)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1172)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2436)
at java.lang.Class.getDeclaredMethods(Class.java:1793)
エラーはこのコードに由来することがわかりました
String code = request.getReader().toString();
GoogleTokenResponse tokenResponse = new GoogleAuthorizationCodeTokenRequest(TRANSPORT,
JSON_FACTORY, CLIENT_ID, CLIENT_SECRET, code,"postmessage").execute();
このコードは、リクエストスプリングを使用した関数呼び出し内にあります
更新 このコード部分をコメントすると、エラーは発生せず、アプリケーションは正常に動作します。google API と spring での呼び出しで何か競合が発生するのではないかと思います。
解決した
私はこの問題を解決しました.GoogleAuthorizzationCodeTokenRequest.executeの値を割り当てる前にGoogleTokenResponseを初期化し、エラーは消えました.