---
title: "Referenced file contains errors 错误解决方法"
author: "抛出异常的爱"
date: "2007-01-20T11:20:35Z"
tags: []
slug: "referenced-file-contains-errors"
draft: false
lastmod: "2007-01-20T11:20:35Z"
id: 48729
url: "https://loveexception.iteye.com/blog/48729"
---

如果你用了jdk5了之后发现
半个小时也建不好一个web 应用
或是eclipse中的web.xml有错了。。。


> Referenced file contains errors (http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd). For more information, right click on the message and select "Show Details..."
> 


那么是由于引用的

```
<web-app version="2.4"
xmlns="http://JAVA.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/xmlSchema-instance"
xsi:schemaLocation="http://JAVA.sun.com/xml/ns/j2ee
http://JAVA.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
```

</web-app>
出了问题

```

<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://JAVA.sun.com/dtd/web-app_2_3.dtd'>
<web-app></web-app>
```

或

```
<web-app version="2.4"
	xmlns="http://JAVA.sun.com/xml/ns/j2ee"
	xmlns:xsi="http://www.w3.org/2001/xmlSchema-instance"
	xsi:schemaLocation="http://JAVA.sun.com/xml/ns/j2ee http://JAVA.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> 

```