首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在上使用Java 8的Spring框架没有启动

在上使用Java 8的Spring框架没有启动
EN

Stack Overflow用户
提问于 2018-06-11 10:01:54
回答 1查看 235关注 0票数 0

我使用Java 7在(GAE)上运行了一个web应用程序。

我想升级到Java 8,因为不推荐Java 7。

更新的Spring框架版本为( 5.0.6 ),安全性为(5.0.5)

当它启动时,我会得到这样的异常:

代码语言:javascript
复制
[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)
  1. 在GAE上,使用Java 8的Spring框架不兼容吗?
  2. 我应该迁移到Spring吗?
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-06-12 07:41:04

它使用的是测试appengine-web.xml文件,而不是不包括java8的产品。

谢谢你的暗示迈克E。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50795114

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档