English 中文(简体)
为什么我的Eclipse请求“http://www.w3.org/2001/xml.xsd”,而且常常失败。
原标题:Why my Eclipse requests for "http://www.w3.org/2001/xml.xsd" and fails often
  • 时间:2011-10-11 07:06:01
  •  标签:
  • eclipse

I m using Eclipse JavaEE IDE edition Indigo Release (build id:20110615-0604) to develop Tomcat-based java web applications, and I ve no plan to write anything about Web Service.

However, when I created a new Java web project in Eclipse, it will automatically include a node named "JAX-WS Web Services" in the project explorer, which I don t find a way to exclude.

And more inconveniently: Everyday I first time launch my Eclipse and click to expand the project node in the project explorer, the whole Eclipse IDE will be stuck for a long while (about one or two minutes).

I thought it should be something wrong with the "JAX-WS Web Services" node. So I used Fiddler to track the requests and responses.

I found that when I click to expand the project node, Eclipse will request for:

  • (a) http: //java.sun.com/xml/ns/j2ee/web-app_2_4.xsd
  • (b) http: //java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd
  • (c) http: //www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd
  • (d) http: //www.ibm.com/software/info/webservices/xsd/j2ee_web_services_client_1_1.xsd
  • (e) http: //www-01.ibm.com/software/info/webservices/xsd/j2ee_web_services_client_1_1.xsd
  • (f) http://www.w3.org/2001/xml.xsd

And the last one (f) will last for a long time to retrieve, and have a high failure rate (HTTP 504). I believe this is the reason why Eclipse stuck.

I want to know: How to fix or avoid this problem?

感谢!

问题回答

您可能有一个XML Schema, 比如说:

<xsd:import namespace="http://www.w3.org/XML/1998/namespace"
            schemaLocation="http://www.w3.org/2001/xml.xsd"/>

如果是,下载xml.xsd,并在当地复制。 相应地改变进口,或许如:

<xsd:import namespace="http://www.w3.org/XML/1998/namespace"
            schemaLocation="xml.xsd"/>

或者,将进口改为目前版本的文件:

<xsd:import namespace="http://www.w3.org/XML/1998/namespace"
            schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>

Some have reported that this link is faster, but it is subject to becoming outdated.

也许在XML Catalog, Window > Pviss > XML >XML Catalog,或能够在Wow > Pviss > General > NetworkLink > Cache





相关问题
In Eclipse, why doesn t "Show In" appear for non-Java files?

If I have a *java file open, I can right click on the source, scroll down to "Show In (Alt-Shift-W)", and select Navigator. If I have an *xml, *jsp, or pretty much anything besides a Java source ...

Eclipse: Hover broken in debug perspective

Since upgrading Eclipse (Galileo build 20090920-1017), hover in debug no longer displays a variable s value. Instead, hover behaves as if I were in normal Java perspective: alt text http://...

Eclipse smart quotes - like in Textmate

Happy Friday — Does anyone know if eclipse has the notion of smart quotes like Textmate. The way it works is to select some words and quote them by simply hitting the " key? I m a newbie here so be ...

Indentation guide for the eclipse editor

Is there a setting or plugin for eclipse that can show indentation guides in the editor? Something like the Codekana plugin for visual studio (not so fancy is also OK). Important that it works with ...

Adding jar from Eclipse plugin runtime tab

I want to add .jar files for plugin from the Runtime tab of manifest file. When I use the Add... button, I can see only sub-directories of the plugin project. So if I want to add same .jar file to ...

How to copy multiple projects into single folder in eclipse

I have two projects, Project1 and Project2. Now i want to copy this projects into eclipse workspace but i want these projects to be in a single folder like below. Eclipse Workspace -> Project -> ...

Java: Finding out what is using all the memory

I have a java application that runs out of memory, but I have no idea which code is allocating the memory. Is there an application with which I can check this? I use Eclipse.

热门标签