在Google App Engine上使用Spring Security时出现java.lang.NoClassDefFoundError [英] java.lang.NoClassDefFoundError on using spring security on google app engine
问题描述
我在Google应用中使用的是Spring Core框架4.1.6.RELEASE和Spring Security 4.0.0.RELEASE.但是,当我尝试在本地appservere中运行它时,会看到以下日志
I am using Spring Core framework version 4.1.6.RELEASE and Spring Security version 4.0.0.RELEASE in my google app. But when I try to run it in local appservere I see following log
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.filterChains': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: java.lang.reflect.Parameter is a restricted class. Please see the Google App Engine developer's guide for more details.
然后我检查了该java.lang.reflect.Parameter
类在哪个jdk版本中引入,发现它从1.8开始就存在.但是应用程序引擎仅支持Java 1.7.我如何找到基于1.7 JDK构建的spring框架版本.请建议
Then I checked that in which jdk version this java.lang.reflect.Parameter
class was introduced and found that it is there since 1.8. But app engine supports java 1.7 only. How could I find the spring framework versions which are build on 1.7 JDK. Please suggest
推荐答案
您必须下载JDK7,它将起作用.我遇到了同样的问题.
You have to download the JDK7 and it will work. I had the same problem.
这篇关于在Google App Engine上使用Spring Security时出现java.lang.NoClassDefFoundError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!