与Spring 3.2.1.RELEASE和Spring security 3.1.3.RELEASE冲突。java.lang.NoSuchFieldError:NULL

与Spring 3.2.1.RELEASE和Spring security 3.1.3.RELEASE冲突。java.lang.NoSuchFieldError:NULL,spring,Spring,我得到的错误如下:Spring 3.2.1.发布和Spring安全性3.1.3.发布 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'yyyyProperties' defined in URL [jar:file:/D:/yyyy/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpweba

我得到的错误如下:Spring 3.2.1.发布和Spring安全性3.1.3.发布

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'yyyyProperties' defined in URL [jar:file:/D:/yyyy/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/usermanagement-webservice/WEB-INF/lib/core-config.jar!/config/applicationContext-core-config.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchFieldError: NULL
    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.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:657)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoSuchFieldError: NULL
    at org.springframework.expression.TypedValue.<clinit>(TypedValue.java:32)
    at org.springframework.expression.spel.support.StandardEvaluationContext.setRootObject(StandardEvaluationContext.java:88)
    at org.springframework.expression.spel.support.StandardEvaluationContext.<init>(StandardEvaluationContext.java:74)
    at org.springframework.context.expression.StandardBeanExpressionResolver.evaluate(StandardBeanExpressionResolver.java:124)
    at org.springframework.beans.factory.support.AbstractBeanFactory.evaluateBeanDefinitionString(AbstractBeanFactory.java:1303)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.evaluate(BeanDefinitionValueResolver.java:211)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:183)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1391)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1132)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
    ... 20 more

依赖项:列表中可以看到,您的spring表达式依赖项版本不正确:

  • org.springframework:spring表达式:jar:3.0.7.RELEASE:compile
只需将以下内容添加到您的POM中:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-expression</artifactId>
            <version>3.2.1.RELEASE</version>
        </dependency>
    </depdendencies>
</dependencyManagement>

org.springframework
弹簧式
3.2.1.1发布

您可以通过
dependencyManagement
这样更改可传递依赖项的定义。

尝试用最少数量的依赖项重现此错误。移除所有不需要重现问题的罐子。还有哪些JAR?我记不清了,但出于某种类似的原因,我不得不将spring版本降低到3.0.7.release或更接近3.0.7.release。1)请发布pom.xml。第2)节,在发生此错误之前您正在更改什么?注意,有一个输入错误-->
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-expression</artifactId>
            <version>3.2.1.RELEASE</version>
        </dependency>
    </depdendencies>
</dependencyManagement>