---
title: "Referenced file contains errors (http://JAVA.sun.com/xml/ns/j2ee/web-app_2_5.xsd"
author: "hackpro"
date: "2014-06-20T09:19:42Z"
tags: []
categories: ["互联网"]
slug: "referenced-file-contains-errors-http-java-sun-com-xml-ns-j2ee-web-app-2-5-xsd"
draft: false
lastmod: "2014-06-20T09:20:22Z"
id: 2082823
url: "https://hackpro.iteye.com/blog/2082823"
---

Referenced file contains errors (http://JAVA.sun.com/xml/ns/j2ee/web-app_2_5.xsd). For more information, right click on the message in the Problems View and select "Show Details..."



```xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.5"
	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_5.xsd" metadata-complete="true">
</web-app>
```


jdk从1.5换到1.6就出现了
将url中的j2ee换成javaee就OK了，或者从别的正常的web.xml拷贝一分头过来
**<span style="color:red">j2ee=>javaee</span>**

```xml
<web-app version="2.5" 
    xmlns="http://java.sun.com/xml/ns/javaee" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" metadata-complete="true">	
	
```