IBM Support

Errors: 'src-resolve: Cannot resolve the name' and 'Referenced file contains errors'

Troubleshooting


Problem

When you import or create an xml schema file, .xsd, Eclipse™ might throw multiple errors. This file imports other files with the same namespace. These errors might occur on IBM® WebSphere® Portlet Factory or other Eclipse based products. These products have the .xsd validation function. The Eclipse versions are 3.2.x, 3.3 and 3.4.

Symptom

Errors that appear in the problems view:

  • src-resolve: Cannot resolve the name '<name>' to a(n) 'type definition' component.
  • Referenced file contains errors

Cause

A possible cause is that the xsd validator cannot localize types from the imported files.

Diagnosing The Problem

Verify the following things.

  • If all files for import are present and accessible on the accurate paths.
  • That you access none of the required files through a network connection, which can be irresponsive.
  • If importing files with the same namespace results in the errors in the Symptom section.

Resolving The Problem

You change an XML Schema Files editor preference to honor all schema locations.
When you import files with the same namespace, choose for 'honoring all schema locations' when you validate the files.

To do so, follow these steps.

  1. Click Window > Preferences.

  2. Locate XML> XML Schema Files in the tree view on the left.






    Then you see the XML Schema preferences on the right.

  3. Select the check box Validating files -> Honour all schema locations.

  4. Then click Apply and OK.

  5. Finally click Project > Clean... to activate the changes.
  6. Verify if this resolves the issue.
    If not, you verify if you satisfy to all the preconditions in Diagnosing the problem section of this document.

Related Information

[{"Product":{"code":"SSJNRR","label":"Rational Elite Support for Eclipse"},"Business Unit":{"code":"BU050","label":"BU NOT IDENTIFIED"},"Component":"Web Tools Platform","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"3.2.2;3.3;3.3.1;3.3.2;3.4","Edition":"All Editions","Line of Business":{"code":"","label":""}}]

Document Information

More support for:
Rational Elite Support for Eclipse

Software version:
3.2.2, 3.3, 3.3.1, 3.3.2, 3.4

Operating system(s):
Linux, Windows

Document number:
360953

Modified date:
19 August 2022

UID

swg21322528

Manage My Notification Subscriptions