---
title: "One or more constraints have not been satisfied"
author: "zdc243"
date: "2016-02-18T10:56:30Z"
tags: []
categories: ["企业架构"]
slug: "one-or-more-constraints-have-not-been-satisfied"
draft: false
lastmod: "2016-02-18T10:56:30Z"
id: 2277118
url: "https://zdc243.iteye.com/blog/2277118"
---

**Eclipse启动web总是报错：**

```
严重: Error configuring application listener of class org.springframework.web.util.Log4jConfigListener
java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener...
```

 检查以为是缺少jar包，后来查看jar包没有缺少（commons-logging,log4j），排查了许久，找不到问题，最后去eclipse-problem中发现 One or more constraints have not been satisfied 这个错误，网上搜索是什么版本过高，一步一步排查发现pom.xml中设定了编译jdk为1.6，而项目中设定了编译的jdk版本确是1.7

```
	<artifactId>maven-compiler-plugin</artifactId>
	<version>2.5.1</version>
	<configuration>
		<source>1.6</source>
		<target>1.6</target>
		<meminitial>128m</meminitial>
		<maxmem>512m</maxmem>
		<fork>true</fork>
		<encoding>${project.build.sourceEncoding}</encoding>
	</configuration>
```

 

改过来就好了，唉，搞了老半天，根本不知道是这个问题引起的...