У меня есть веб-приложение, работающее на Google App Engine (GAE) с использованием Java 7.
Я хочу обновить систему до Java 8, поскольку Java 7 устарела.
Обновлена версия Spring Framework до(5.0.6) и безопасность до (5.0.5)
При запуске появляется следующее исключение:
[INFO] 2018-06-11 09:52:34,592 main INFO [ContextLoaderListener] Java Version : 1.8.0_73-b02
[INFO] 2018-06-11 09:52:34,698 main INFO [ContextLoaderListener] starting TrackAndTraceServer::version:4.0.4-SNAPSHOT-unavailable
[INFO] Jun 11, 2018 9:52:34 AM com.google.appengine.tools.development.ApiProxyLocalImpl log
[INFO] INFO: javax.servlet.ServletContext log: Initializing Spring root WebApplicationContext
[INFO] 2018-06-11 09:52:34,760 main INFO [ContextLoader] Root WebApplicationContext: initialization started
[INFO] 2018-06-11 09:52:34,921 main INFO [CustomXmlWebApplicationContext] Refreshing Root WebApplicationContext: startup date [Mon Jun 11 09:52:34 UTC 2018]; root of context hierarchy
[INFO] 2018-06-11 09:52:35,077 main INFO [XmlBeanDefinitionReader] Loading XML bean definitions from ServletContext resource [/WEB-INF/beans.xml]
[INFO] 2018-06-11 09:52:35,187 main INFO [XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [dao-beans.xml]
[INFO] 2018-06-11 09:52:35,354 main INFO [SpringSecurityCoreVersion] You are running with Spring Security Core 5.0.5.RELEASE
[INFO] 2018-06-11 09:52:35,354 main INFO [SecurityNamespaceHandler] Spring Security 'config' module version is 5.0.5.RELEASE
[INFO] 2018-06-11 09:52:35,526 main INFO [HttpSecurityBeanDefinitionParser] Checking sorted filter chain: [Root bean: class [org.springframework.security.web.context.SecurityContextPersistenceFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 200, Root bean: class [org.springframework.security.web.header.HeaderWriterFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 500, Root bean: class [org.springframework.security.web.csrf.CsrfFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 700, <tagAuthenticationFilter>, order = 1000, <apiKeyAuthenticationFilter>, order = 1001, <authenticationFilter>, order = 1200, Root bean: class [org.springframework.security.web.savedrequest.RequestCacheAwareFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1700, Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.security.config.http.HttpConfigurationBuilder$SecurityContextHolderAwareRequestFilterBeanFactory#0; factoryMethodName=getBean; initMethodName=null; destroyMethodName=null, order = 1800, <rememberMeFilter>, order = 2000, Root bean: class [org.springframework.security.web.session.SessionManagementFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 2200, Root bean: class [org.springframework.security.web.access.ExceptionTranslationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 2300, <org.springframework.security.web.access.intercept.FilterSecurityInterceptor#0>, order = 2400]
[INFO] 2018-06-11 09:52:35,921 main ERROR [ContextLoader] Context initialization failed
[INFO] java.lang.NoClassDefFoundError: java.util.stream.Stream 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:50)
[INFO] at org.springframework.beans.factory.config.ConstructorArgumentValues.addArgumentValues(ConstructorArgumentValues.java:79)
[INFO] at org.springframework.beans.factory.config.ConstructorArgumentValues.<init>(ConstructorArgumentValues.java:62)
[INFO] at org.springframework.beans.factory.support.AbstractBeanDefinition.<init>(AbstractBeanDefinition.java:245)
[INFO] at org.springframework.beans.factory.support.RootBeanDefinition.<init>(RootBeanDefinition.java:229)
[INFO] at org.springframework.beans.factory.support.RootBeanDefinition.cloneBeanDefinition(RootBeanDefinition.java:404)
[INFO] at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1253)
[INFO] at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:1224)
[INFO] at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1210)
[INFO] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:414)
[INFO] at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:390)
[INFO] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:84)
[INFO] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694)
[INFO] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532)
[INFO] at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:409)
[INFO] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
- Является ли среда Spring с Java 8 несовместимой с GAE?
- Должен ли я перейти на загрузку Spring?