Fixing JBoss Seam XML Schema Errors in Eclipse

If you start developing with Jboss Seam in Eclipse you may get some weird errors like this:

cvc-elt.1: Cannot find the declaration of element 'components' (Resource: components.xml)
cvc-elt.1: Cannot find the declaration of element 'pages' (Resource: pages.xml)
Referenced file contains errors (http://jboss.com/products/seam/components-2.2.xsd)
Referenced file contains errors (http://jboss.com/products/seam/core-2.2.xsd)

Screenshot of Eclipse Problems

You can fix these errors easily by adding some User Sepcified Entries to the XML Catalog of Eclipse:

  1. Extract all XSD files from the JBoss Seam JAR file (jboss-seam-2.2.0.GA.jar for example) to your harddisk
  2. Open Window / Preferences / XML / XML Catalog
    Screenshot of Eclipse XML Catalog / User Specified Entries
  3. Add the first XSD file
    Screenshot of adding an Eclipse XML Catalog Entry
  4. Repeat the step for all other XSD files

After revalidating your project the errors should be fixed.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s